Hi Guys.
I wrote a lot of autoit scripts in last year and I saw something very annoying.
For example when I search some words in a big file. For example in this little function who can rename variables from a .au3 file.
AutoIt
Func testme($m) Local $file = FileRead($m),$newfile = $file Local $arfile = 0, $i = 0, $line = 0,$variables = 0, $j = 0, $test = 0 _FileReadToArray($m, $arfile) If $arfile[0] = "" Then Return 0 EndIf For $i = 1 To $arfile[0] Step +1 $line = StringSplit($arfile[$i], " =,()[]") If Not @error Then For $j = 1 To $line[0] Step +1 $test = StringSplit($line[$j], "$") If Not @error Then _ReplaceStringInFile($newcopy, $line[$j], $varsign & FORMULAVARIABLES()) EndIf Next EndIf Next Return 1 Endfunc Func FORMULAVARIABLES() Local $v1 = Chr(Random(Asc("A"), Asc("Z"), 1)) & Chr(Random(Asc("A"), Asc("Z"), 1)) & Random(1000, 100000, 1) & Chr(Random(Asc("A"), Asc("Z"), 1)) & Random(1000, 100000, 1) Return $v1 EndFunc
All works good but if I apply this on a big file with 20k lines for example and it took like 1 minute (too much time)
Now my question. Is any method to make jobs with autoit to run in background like a backgroundworker,without makeing the form to freeze?
If exist already a topic with this and i didnt found it then please excuse me and post a link to there. I am new here and I wasn't so patient to read all stuffs
PS: Why my name is not remain as I put it? It always changing to this default one! - " Solved"