any suggestion to track down, why a script is freezing after a longer run time?
This is a general question, I've checked the common mistakes, I've made so far (inside a loop doing fileopen() without fileclose(), runwait() for progs, that don't terminate, infinite recursive loops etc.)
This script stops just after several days of running...
Is there a direct way to "count" the amount of MEM and handles, a autoit script is using itself, or by child processes?
Can we pause and resume the download in the InetGet function?
If is possible, what is the solution please?
I used this code To manage the download
#include <INet.au3> func _downloader($name, $linc, $filepath, $RTLF = false, $link = false) global $downloader = GUICreate("downloader", 400, 200, -1, -1, $WS_CLIPCHILDREn, $RTLF, $link) global $path = $filePath $labelTxt = GUICtrlCreateLabel("downloading " & $name, 50, 10, 200, 20) global $labelTxt0 = GUICtrlCreateLabel("downloaded size 0 MB " & "OF 0 MB", 50, 60, 300, 20) global $Progress = "" global $sText = "" For $i = 1 To Random(5, 20, 1) ; Return an integer between 5 and 20 to determine the length of the string. $sText &= Chr(Random(65, 122, 1)) ; Return an integer between 65 and 122 which represent the ASCII characters between a (lower-case) to Z (upper-case). next global $labelTxt2 = GUICtrlCreateInput("0%", 50, 80, 50, 20) _GUICtrlEdit_SetReadOnly(-1, true) GUIStartGroup("") global $beep = GUICtrlCreateCheckBox("use the progress beep notification", 150, 120, 200, 20) GUIStartGroup("") $button = GUICtrlCreateButton("Cancel', 130, 150, 180, 25, 0x01) $iIndex = 0 global $Target global $url GUIStartGroup("") global $Progress = GUICtrlCreateProgress(50, 90, 150, 20) global $Target = $filepath global $url = $linc global $path = $filepath global $hDownloadNo = _RSMWare_GetData($url, $Target) global $status = false AdlibRegister("SetProgress") global $onprogress = false, $curent = false GUISetState(@sw_Show) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $button $asc = MsgBox(4132,"exit download?","if you click yes the downloading will be cancel, do you want to cancel it ?") if $asc = 6 then AdlibUnRegister("SetProgress") GUIDelete() If $hDownloadNo <> 0 Then InetClose($hDownloadNo) exitLoop endIf EndSwitch if $status = -1 then $status = 0 $hDownloadNo = _RSMWare_GetData($url, $Target) $onprogress = false $curent = false elseIf $Status = 1 then $status = $path GUIDelete() AdlibUnRegister("SetProgress") exitLoop endIf WEnd return $status endFunc Func _RSMWare_GetData($url, $Target) Local $hDownload = InetGet($url, $Target, 1, 1) Return $hDownload EndFunc ;==>_RSMWare_GetData Func SetProgress() Local $state If $hDownloadNo <> 0 Then $state = InetGetInfo($hDownloadNo) If @error = 0 Then $infor = "downloaded size " & Round(Execute(InetGetInfo($hDownloadNo, $INET_DOWNLOADREAD) / 1048576), 2) & " MB of " & Round(Execute(InetGetInfo($hDownloadNo, $INET_DOWNLOADSIZE) / 1048576), 2) & " MB " $onprogress = Round(Ceiling(($state / $state) * 100)) if not (InetGetInfo($hDownloadNo, $INET_DOWNLOADSIZE) = 0) then if $onProgress <= 0 then $onProgress = 0 GUICtrlSetData($Progress, $onProgress) GUICtrlSetData($labelTxt0, $infor) GUICtrlSetData($labelTxt2, $onProgress & "%") if _isChecked($beep) then if $onprogress > $curent then beep((100 + $onprogress * 20), 100) $curent = $onprogress endIf endIf endIf If $state Then If $state Then InetClose($hDownloadNo) $status = 1 else InetClose($hDownloadNo) $status = -1 endIf endIf EndIf endIf EndFunc ;==>SetProgress
Hello forum users!
At some point I had a need to restart my script. Is it possible to do this with autoit or do I need to connect additional scripts like .cmd or .bat?
For example: i have only script.au3 and it's running. Wich code shoud i use to exit from the script and start it again?
I recently installed AutoIT(the most recent version) on my work computer and everytime I try to use Koda to generate code for a GUI Koda freezes....nothing can be clicked on and I have to use task manager to end the task. It doesn't seem to matter if I open a file or if I try with a fresh design. It also freezes if I try to change any settings within Koda
I've tried uninstalling everything AutoIT related and reinstalling and restarting the computer. No matter what it still does it
Is there a setting somewhere that could be causing this?
This is a personal project to log into several facebook accounts and send a message to a specific person on their birthday. I need to stop a script in a few different ways for several different reasons. For example, it might start sending the email to the wrong account, it might do something other than send a message, it might fail to logout of one account, etc.
1) Pause the script at it's exact location with a resume feature in case I need to put it on hold while I do another task.
2) Pause the script at it's current location with the option to start over or execute another part of the script (example in GUI with multiple buttons).
Also, is there a way to interact with menus? If I log into facebook how can I force it to go straight to sending a message to the proper person? I tried automating a mouseclick but the window opens in different places. I also tried searching for specific text and I couldn't get any information from the windows info tool on the facebook page.
Also, how do I get my code in here to show like it does in my editor? (scite)
Thanks for looking at it, and any help/suggestions I sgreatly appreciated!