Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all 12506 articles
Browse latest View live

Regular express to array

$
0
0

Hi,

 

Anyone please help me getting some data from text line into an array by using regexp?

 

I have a line that looks like:

 11:05:40.839855 T2708 DBG Feat stats, sensor 78: BG, p=2000: c=10: 100%.

I need a one dimension array that has that elements values:

 

$aArray[0] = 6

$aArray[1] = '11:05:40.839855'

$aArray[2] = '78'

$aArray[3] = 'BG'

$aArray[4] = '2000'

$aArray[5] = '10'

$aArray[6] = '100'


Sending NMEA data with Teraterm

$
0
0

Hi,

I am trying to send NMEA sentences like these:

$GPGGA,171743.00,5141.11989,N,00117.59582,W,2,12,0.89,73.4,M,47.1,M,,0000*7$GPGGA,171744.00,5141.11992,N,00117.59581,W,2,12,0.89,73.5,M,47.1,M,,0000*7$GPGGA,171745.00,5141.11989,N,00117.59584,W,2,12,0.89,73.6,M,47.1,M,,0000*7$GPGGA,171746.00,5141.11988,N,00117.59586,W,2,12,0.89,73.6,M,47.1,M,,0000*7

 

using Teraterm send them via the serial port at one second intervals.

 

So far I've sent them with [send '$GPGGA,171743.00,5141.11989,N,00117.59582,W,2,12,0.89,73.4,M,47.1,M,,0000*7$' pause 1 send' GPGGA,171744.00,5141.11992,N,00117.59581,W,2,12,0.89,73.5,M,47.1,M,,0000*7']

 

This does send the sentences at 1second intervals, but does not work with the application I'm using.

 

I think, it might be something more complicated like carriage return or similar.

Is there an example for me to follow or similar please?

Camerart.

AutoIt "obfuscator" Missing

Subscript error

$
0
0

Hi. I know this question has been asked too many times to count, but I'm still asking. :idiot:

 

I am doing error checking (I thought) in my script, but yet I still get the infamous "Error: Subscript used on non-accessible variable" error on the script below. I have included it for your perusal. If someone could enlighten me as to where I'm missing something, I would appreciate it. The script fails in only certain situations (mostly on newly created VDI desktops), and runs fine most of the time. Thanks!

AutoIt         
#Include <File.au3> #Include <Array.au3> #include <Date.au3> If $CmdLine[0] > 0 Then     If $CmdLine[1] = "DEBUG" Then         $Debug=1     Else         $Debug=0     EndIf Else     $Debug=0 EndIf Global Const $LOCAL_APPLICATION_DATA = 0x1C Global Const $APPLICATION_DATA = 0x1A Global Const $MY_RECENT_DOCUMENTS = 0x8 Func EmptyFolder($FolderToDelete, $SkipNewData = False, $FilesOnly = False)     If $FilesOnly Then         $AllFiles = _FileListToArray($FolderToDelete,"*",1)     Else         $AllFiles = _FileListToArray($FolderToDelete,"*",0)     EndIf     If @Error Then         If @Error <> 4 Then  ;-- This are no files found. Don't care about this error.             If $Debug Then                 ConsoleWrite("ERROR!! On folder " & $FolderToDelete & @CRLF & "Error code: " & @Error )                 MsgBox(262144,'Information','Folder: ' & $FolderToDelete & @CRLF & 'Error code: ' & @Error, 5)             EndIf         EndIf         Return     EndIf     If $Debug Then         ConsoleWrite("-->" & $FolderToDelete & @CRLF )         MsgBox(262144,'Information','Folder to delete: ' & $FolderToDelete, 5)     EndIf     If IsArray($AllFiles) Then         If $Debug Then             _ArrayDisplay( $AllFiles,$FolderToDelete)         EndIf         For $i = 1 To $AllFiles[0]             $crt = FileGetTime( $FolderToDelete & "\" & $AllFiles[$i], 1 )             If ($crt[2] = @MDAY And $crt[0] = @YEAR And $crt[1] = @MON) And $SkipNewData Then                 If $Debug Then                     ConsoleWrite( $FolderToDelete & "\" & $AllFiles[$i] & " --> Today's File, Skipping!" & @CRLF )                 EndIf                 ContinueLoop             EndIF             $delete = FileDelete($FolderToDelete & "\" & $AllFiles[$i])             If $Debug Then                 ConsoleWrite($FolderToDelete & "\" & $AllFiles[$i]& " =>"&$delete & @CRLF  )             EndIf             DirRemove($FolderToDelete & "\" & $AllFiles[$i], 1)         Next     EndIf EndFunc ;---------- Clear Firefox cache ; Get the path to the Firefox cache folder $FilePath = _FileFindSpecialFolder($LOCAL_APPLICATION_DATA, 0, 0) $FilePath = $FilePath & "\Mozilla\Firefox\Profiles\" $Search = FileFindFirstFile($FilePath & "*.default") $FilePath = $FilePath & FileFindNextFile($Search) & "\Cache" EmptyFolder ($FilePath, False, True) ;---------- Clear Chrome cache ; Get the path to the Chrome cache folder $FilePath = _FileFindSpecialFolder($LOCAL_APPLICATION_DATA, 0, 0) $FilePath = $FilePath & "\Google\Chrome\User Data\Default\" FileDelete($FilePath & "Cookies") FileDelete($FilePath & "Cookies-journal") FileDelete($FilePath & "Current Session") FileDelete($FilePath & "History") FileDelete($FilePath & "History-journal") $FilePath = $FilePath & "Cache" EmptyFolder ($FilePath, False, True) ; ---- Clear IE temporary files If $Debug Then     MsgBox(262144,'Information','Clearing IE Temp Files', 5) EndIf ShellExecuteWait("RunDll32.exe"," InetCpl.cpl,ClearMyTracksByProcess 8") ;ShellExecuteWait("RunDll32.exe"," InetCpl.cpl,ClearMyTracksByProcess 255") ; ---- Remove temporary files $FilePath = _FileFindSpecialFolder($LOCAL_APPLICATION_DATA, 0, 0) EmptyFolder ($FilePath & "\Temporary Internet Files\Content.IE5") EmptyFolder ($FilePath & "\Temporary Internet Files") EmptyFolder ($FilePath & "\History") EmptyFolder ($FilePath & "\Temp", True) ;;EmptyFolder ($FilePath & "\Application Data\Microsoft\Office\Recent") ; ---- Remove temporary files (XP) $FilePath = "C:\Documents and Settings\" & @Username & "\Local Settings\Temp" EmptyFolder ($FilePath, True) ; ---- Remove Windows directory temporary files EmptyFolder (@WindowsDir & "\Temp", True) ; ---- Remove recent documents ;$FilePath = _FileFindSpecialFolder($MY_RECENT_DOCUMENTS, 0, 0) ;EmptyFolder ($FilePath) ;---------- Clear Recycle Bin (we'll only do this on certain day(s)) If _DateDayOfWeek( @WDAY ) = "Monday" Then     FileRecycleEmpty() EndIf ; ------------------------------------------------------------------------------------------------------------------ ;=============================================================================== ; ; Function Name:    _FileFindSpecialFolder($Folder,[ $ListToArray = 0[, $Filter = 0]]) ; Description: ; Parameter(s):     $Folder      - The Special folder constant (i.e. $MY_COMPUTER) ;                                  You could also use an existing path (i.e. "C:\Program Files") ;                                  Or a ClassID (i.e. ::{20D04FE0-3AEA-1069-A2D8-08002B30309D} ) ;                   $ListToArray - (optional) Change the return value: ;                                             0 = Return the ClassID or Path to the special folder ;                                             1 = Return an array containing the files within the folder ;                   $Filter      - (optional) Filter out the array by: ;                                       1 = Files ;                                       2 = Folders ;                                       3 = Links ;                                       4 = ClassId's ;                                       0 = No Filter (default) ; Requirement(s):   None. ; Return Value(s):  Returns either: ;                       1) A string containing the CLASSID or Path corresponding to the Special folder ;                       2) An Array containing the list of files/folder/links within the special folder ;                   Returns -1 if there are no results ; Author(s):        _Kurt ; Note(s):          See http://www.microsoft.com/technet/scriptcenter/scripts/desktop/special/default.mspx?mfr=true for more info ; ;=============================================================================== Func _FileFindSpecialFolder($Folder, $ListToArray = 0, $Filter = 0) Local $oShell = ObjCreate("Shell.Application") $nPath = $oShell.NameSpace($Folder).Self.Path     If StringLeft($nPath,1) = ":" OR StringLeft($nPath,1) = ";" Then         SetError(2)     Else         SetError(1)     EndIf     If $nPath = "" Then $nPath = -1     If $ListToArray = 0 Then Return $nPath     $nNum = $oShell.NameSpace($Folder).Items.Count     Local $List[$nNum], $a = 0     For $i = 0 To $nNum-1         Select             Case $Filter = 0                 $List[$i] = $oShell.NameSpace($Folder).Items.Item($i).Path                 $a += 1             Case $Filter = 1                 If $oShell.NameSpace($Folder).Items.Item($i).IsFileSystem = True Then                     If NOT $oShell.NameSpace($Folder).Items.Item($i).IsFolder = True Then                         $List[$a] = $oShell.NameSpace($Folder).Items.Item($i).Path                         $a += 1                     EndIf                 EndIf             Case $Filter = 2                 If $oShell.NameSpace($Folder).Items.Item($i).IsFolder = True Then                     $List[$a] = $oShell.NameSpace($Folder).Items.Item($i).Path                     $a += 1                 EndIf             Case $Filter = 3                 If $oShell.NameSpace($Folder).Items.Item($i).IsLink = True Then                     $List[$a] = $oShell.NameSpace($Folder).Items.Item($i).Path                     $a += 1                 EndIf             Case $Filter = 4                 $b = $oShell.NameSpace($Folder).Items.Item($i).Path                 If StringLeft($b, 1) = ":" OR StringLeft($b, 1) = ";" Then                     $List[$a] = $oShell.NameSpace($Folder).Items.Item($i).Path                     $a += 1                 EndIf         EndSelect     Next     If $a = 0 Then         $List = -1     Else         ReDim $List[$a]     EndIf     Return $List EndFunc

Using a gui button to control togglepause

$
0
0

I want to start my script paused and when I click the pause button I want it to unpause the script. I would also like the pause button to say unpaused when the script is not paused.

AutoIt         
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $Paused $Paused = $Paused #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 377, 280, 192, 114) $Input1 = GUICtrlCreateInput("10", 24, 40, 49, 21) $Input2 = GUICtrlCreateInput("", 24, 72, 49, 21) $Input3 = GUICtrlCreateInput("", 24, 104, 49, 21) $Input4 = GUICtrlCreateInput("", 24, 136, 49, 21) $Input5 = GUICtrlCreateInput("23", 24, 168, 49, 21) $Input6 = GUICtrlCreateInput("", 240, 40, 49, 21) $Input7 = GUICtrlCreateInput("", 240, 72, 49, 21) $Input8 = GUICtrlCreateInput("", 240, 104, 49, 21) $Input9 = GUICtrlCreateInput("", 240, 136, 49, 21) $Input10 = GUICtrlCreateInput("", 240, 168, 49, 21) $Pause = GUICtrlCreateButton("Pause", 24, 216, 97, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### TogglePause() While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case $Pause             TogglePause()         Case $GUI_EVENT_CLOSE             Exit     EndSwitch WEnd Func TogglePause()                    ;<==========================Here     $Paused = Not $Paused     While $Paused         Sleep(100)         ToolTip('Paused', 0, 0)     WEnd     ToolTip("") EndFunc

_IEFormElementSetValue

$
0
0

I think I may know the answer to this but figure I will ask just in case there is a way around it

 

 

I am navigating to a page where I need to input a path to a file.  I have gone through the process to get to the final page but I can't get the file name in the box.  At the very end I get a browser "securuty" error.  

 

What I think is tripping me up is this

 

16793641932_368680d57f.jpg

 

The document box is grayed out......if I am doing this manually I have to browse to the file.  Assuming it is this that is tripping me up is there a way around it?

 

 

 

here is what I get from the debugger

 

0061: 0-0: Local $form4 = _IEFormGetObjByName($oIE,"docEntry") ;
0062: 0-1: Local $filebox = _IEFormElementGetObjByName($form4, "attachedDoc")
0063: 0-1: _IEFormElementSetValue($Filebox, "c:xxx.xls")
--> IE.au3 T3.0-1 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidObjectType (Browser securuty prevents SetValue of TYPE=FILE)
0067: 4-1: Exit

_Startup() - Create Startup entries in Registry Help

$
0
0

Hi,

 

How come there is a _StartupRegistry_Install and on the Return line a _StartupRegistry_Uninstall? Am I not understanding this correctly or is this a typo? I have also noticed that if $iRunOnce is set to 1 or 2 it creates the value in RunOnceEx

 

http://www.autoitscript.com/forum/topic/124508-startup-create-startup-entries-in-the-startup-folder-or-registry/

; #FUNCTION# ==================================================================================================================== ; Name ..........: _StartupRegistry_Install ; Description ...: Creates an entry in the 'All Users/Current Users' registry. ; Syntax ........: _StartupRegistry_Install([$sName = @ScriptName[, $sFilePath = @ScriptFullPath[, $sCommandline = ''[, ;                  $fAllUsers = False[, $iRunOnce = Default]]]]]) ; Parameters ....: $sName               - [optional] Name of the program. Default is @ScriptName. ;                  $sFilePath           - [optional] Location of the program executable. Default is @ScriptFullPath. ;                  $sCommandline        - [optional] Commandline arguments to be passed to the application. Default is ''. ;                  $fAllUsers           - [optional] Add to Current Users (False) or All Users (True) Default is False. ;                  $iRunOnce            - [optional] Always run at system startup (0), run only once before explorer is started (1) ;                                         or run only once after explorer is started (2). Default is 0. ; Return values .: Success - True ;                  Failure - False & sets @error to non-zero ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _StartupRegistry_Install($sName = @ScriptName, $sFilePath = @ScriptFullPath, $sCommandline = '', $fAllUsers = False, $iRunOnce = 2)     Return __StartupRegistry_Uninstall(True, $sName, $sFilePath, $sCommandline, $fAllUsers, $iRunOnce) EndFunc   ;==>_StartupRegistry_Install

Wrapper and Aut2Exe

$
0
0

Hi!

 

My issue is a little hard to explain, but let's try...

 

I'm developing a improved version of Supercoe's ChunkVNC, a remote support software that used UltraVNC and AutoIT to make a friendly interface for "users".

 

I have three modules in the system:

Client - User interface
Viewer - Help Desk side
Compiler - Generate the Client and Viewer based on the server address, port and some other parameters.

 

I implemented the Resources UDF(link) to the client module. My issue is, the Compiler module use the Aut2Exe tool to compile the "client.au3" to "client.exe". As Zedna stated:
 

 

Notes:
* to compile all script examples you must have installed Scite4AutoIt3 --> you must compile script by F7 from full Scite
* for using #AutoIt3Wrapper_Res_File_Add directive you must have AutoIt3Wrapper at least version 2.0.1.22 (it's part of latest Scite4AutoIt3)

 

So... is there any way I can use this UDF, compiling the source using the Aut2Exe instead of SciTE4?


Login website

$
0
0

Hi guys, 

 

I'm trying to login into a website but i cannot seem to find a way to "click" into the login button.

 

I can submit the info (user and password) but cannot click on the button

 

html code

 

<input type="submit" value="Login" class="submit">

 

Any help ?

determine(MUI)

Click toolbar button

$
0
0

Hello, (first post)  :bye:

 

This question has been asked a thousand times, but I can't get it to work. 

I'm trying to click a button on a toolbar. Here's the summary of the toolbar:

>>>> ToolsBar <<<<
1: 57600
2: 57601
3: 57603
4: 0
5: 32785
6: 0
7: 32771
8: 32772
9: 32781
10: 32788
which seems strange considering that there are 14 buttons on the toolbar???
 
I have this:
 
#include <GuiToolbar.au3>
#include <GuiConstantsEx.au3>
 
local $hWnd = WinWait("PCCut - PCCut1","",10)
_GUICtrlToolbar_ClickIndex($hWnd,10,"left",True)
ControlClick($hWnd,"","[ID:32788]")
 
but it doesn't work. What am I doing wrong?

 

How to put a browse pulldown for a box to hold a target filepath?

$
0
0

I hope I can explain this without confusing things too much, I have a new script I created which I can dump a filepath into and then AI populates a search utility with that path.  But I'm finding that it would be much more helpful if there were a browse button beside that button so that I could choose instead to travel to the folder via AI itself rather than do it through Windows Explorer and copying the path and then coming back to the script and dumping it there.

 

But I've come to realize that I've never done this before and my googles search aren't turning up relevant AI help in this regard, probably (I'm guessing) because I don't know what to call what I'm trying to do.  Guess it's one of those things everyone knows about so much that it's not mentioned (everyone but me knows about ... <g>).

 

What is this called when you add a button to navigate Windows Explorer that then takes the folder you select?

 

Thank you!!

How to write the script to expand a for loop description?

$
0
0

Hi,

 

I want to write a AutoIt script to translate the following strings format, can someone help me?

 

Thanks.

 

FROM:

forloop param1 {2 3} param2 {9 10} {

    The result is output1=$param1 output2=$param2
}
 
TO:
The result is output1=2 output2=9
The result is output1=2 output2=10
The result is output1=3 output2=9
The result is output1=3 output2=10
 

Help to write multiple files from an array

$
0
0

How would one use  _FileCreate and an array to create multiple files?

#Include <Array.au3> #include <File.au3> Global $Array1[226] = ["2020bb", "2020bba", "2020bbh", "3countb", "alpham2", "androdun", "aodk", "aof2a", "aof2", "aof3", "aof3k", "aof", "bakatono", "bangbead", "bjourney", "blazstar", "breakers", "breakrev", "bstars2", "bstars", "burningf", "burningh", "crsword", "ct2k3sp", "cthd2003", "ctomaday", "cyberlip", "diggerma", "doubledr", "eightman", "fatfursa", "fatfursp", "fatfury1", "fatfury2", "fatfury3", "fbfrenzy", "fightfev", "fightfva", "flipshot", "fswords", "galaxyfg", "ganryu", "garoubl", "garou", "garouo", "garoup", "ghostlop", "goalx3", "gowcaizr", "gpilots", "gururin", "irrmaze", "janshin", "jockeygp", "joyjoy", "kabukikl", "karnovr", "kf10thep", "kf2k2mp2", "kf2k2mp", "kf2k2pla", "kf2k2pls", "kf2k3bla", "kf2k3bl", "kf2k3pcb", "kf2k3pl", "kf2k3upl", "kf2k5uni", "kizuna", "kof10th", "kof2000n", "kof2000", "kof2001h", "kof2001", "kof2002", "kof2003", "kof2k4se", "kof94", "kof95a", "kof95", "kof96h", "kof96", "kof97a", "kof97pls", "kof97", "kof98k", "kof98n", "kof98", "kof99a", "kof99e", "kof99n", "kof99p", "kof99", "kog", "kotm2", "kotmh", "kotm", "lans2004", "lastblad", "lastbld2", "lastbldh", "lastsold", "lbowling", "legendos", "lresort", "magdrop2", "magdrop3", "maglordh", "maglord", "mahretsu", "marukodq", "matrim", "miexchng", "minasan", "mosyougi", "ms4plus", "ms5pcb", "ms5plus", "mslug2", "mslug3b6", "mslug3", "mslug3n", "mslug4", "mslug5", "mslug", "mslugx", "mutnat", "nam1975", "ncombata", "ncombat", "ncommand", "neobombe", "neocup98", "neodrift", "neogeo", "neomrdo", "ninjamas", "nitd", "overtop", "panicbom", "pbobbl2n", "pbobblen", "pbobblna", "pgoal", "pnyaa", "popbounc", "preisle2", "pspikes2", "pulstar", "puzzldpr", "puzzledp", "quizdai2", "quizdais", "quizkof", "ragnagrd", "rbff1", "rbff2h", "rbff2k", "rbff2", "rbffspec", "ridheroh", "ridhero", "roboarma", "roboarmy", "rotd", "s1945p", "samsh5sh", "samsh5sn", "samsh5sp", "samsho2", "samsho3a", "samsho3", "samsho4", "samsho5b", "samsho5h", "samsho5", "samsho", "savagere", "sdodgeb", "sengokh", "sengoku2", "sengoku3", "sengoku", "shocktr2", "shocktra", "shocktro", "socbrawl", "sonicwi2", "sonicwi3", "spinmast", "ssideki2", "ssideki3", "ssideki4", "ssideki", "stakwin2", "stakwin", "strhoop", "superspy", "svcboot", "svcpcba", "svcpcb", "svcplusa", "svcplus", "svcsplus", "svc", "tophunta", "tophuntr", "tpgolf", "trally", "turfmast", "twinspri", "tws96", "viewpoin", "vlinero", "vliner", "wakuwak7", "wh1h", "wh1", "wh2j", "wh2", "whp", "wjammers", "zedblade", "zintrckb", "zupapa"] $File = "E:\FightCade\config\games\cps.ini" $Read = ClipPut(FileRead($File)) _FileCreate ( $Array1 )

Need help about ImageSearch

$
0
0

Hj .I would ImgaeSearch In only  a applicaton . Anybody help me.


Autoit go to website and give information

$
0
0

Hello.

 

I'm new to autoit and i need some help please.

 

 

I want to create a script, where, when i click in a button, it will go to a website, copy the information i want, and give me the information in the GUI, without opening the browser.

 

 

So, i create a GUI

 
AutoIt         
#include <MsgBoxConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Kassadin", 266, 92, 460, 286) $Label1 = GUICtrlCreateLabel("Information from website", 32, 32, 84, 17) $Button1 = GUICtrlCreateButton("Generate", 160, 24, 65, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             Exit          Case $Button1             GotoWebsite()     EndSwitch WEnd Func Gotowebsite()

The function i want, is that it would go to this website: https://10minutemail.net/

 

And then would copy the random e-mail that generated and change the $Label1 to the random e-mail generated.

But all this, wihtout opening my browser, i know it's possible to get information from a website without actually opening the browser, i already seen scripts like that, please someone help me :)

 

Thank you for your time and i'm sorry for my bad english.

 

I want to click on save and then ok button while using downloadfile method in autoit to download file

$
0
0

 I want to click on save and then  ok button while using downloadfile method in autoit to download file-

downloadFile -target "" -remoteIP " -remoteUserName  -remotePassword  -action "Save" -file "" -browserName "firefox" }
 

 

If I use above command it is going to "Save" , but after that since there is no action as "Ok", my code is not able to click on OK

_ArrayDelete - variable type after removing last element?

$
0
0

Hi!

 

Recently, I changed from AutoIt 3.3.8.1 to 3.3.12.0. One of my older scripts broke at an _ArrayDelete statement.

 

3.3.8.1

- deleting the last element results in an empty string variable, so IsArray($ar) = false

 

 

3.3.12.1

- deleting the last element seems to result in an empty array variable, because now IsArray($ar) = true (and btw. _ArrayDisplay shows an empty array)

 

Is that correct? When did that happen?

 

Regards,

Holger

 

_IEAction not working

$
0
0

Hello.

 

 

Website code:

<span class="button_middle">Acesso</span>

My code:

Local $button = _IEGetObjByName ($oIE, "Acesso") _IEAction($button , "Click")
 
 
I'm trying to make it click on the button but it isn't working. Any help pls? :)

question background

$
0
0

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 :D

 

 

PS: Why my name is not remain as I put it? It always changing to this default one! - " Solved"

Viewing all 12506 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>