Jump to content

Search the Community

Showing results for tags 'pause'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 12 results

  1. Hello 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[0] / $state[1]) * 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[2] Then If $state[3] Then InetClose($hDownloadNo) $status = 1 else InetClose($hDownloadNo) $status = -1 endIf endIf EndIf endIf EndFunc ;==>SetProgress
  2. 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! <snip>
  3. Okey guys , here's the thing, My script is running fine, but when it's already running i cant turn it off or pause by clicking the on/off button unless i manually close it on my taskbar. What i wanted to happen is "if i click the ($switch = turn On and Off Button) to Off the script will STOP Running but not closing the entire GUI because i tried to use Exit and ExitLoop but it closes the entire GUI. and i don't want that to happen. BTW. I'm new in AutoIT and practice scripting hope somebody could help me Godbless. feel free to view my script Practice.au3
  4. So I have a lot of different functions in the little program I'm making. Most of them use the Do statement, such as finding images, clicking buttons, etc. The question I have is how would I be able to both 1) Create a hotkey to pause whatever I am doing at the moment. If I have to put something into every function in the program, I don't mind. 2) Create a hotkey to exit whatever I am doing and stop all loops or commands and bring back the main GUI?
  5. i want a script that "on the beginning of the program it pings to check if there is internet connectivity. if there is internet connectivity then it executes my code else if there is no internet it waits at background to detected internet connectivity then executes my code." Is this possible
  6. Hi All, I run multiple AutoIT scripts concurrently, is there a way of distinguishing between them? When I look under Details in task manager I just see a bunch of "AutoIt3.exe" processes. Under the processes tab I again just see a bunch of "AutoIt v3 Script" or "AutoIt v3 Script (32 bit)" applications. When I hover my mouse over the tray icon I can see the tooltip "AutoIt - Current Time.au3" but am not sure how to reference this. For example if I run a script called "Current Time.au3", how can I determine from another au3 script if this "Current Time.au3" script is running and grab it's handle (using WinGetHandle() or similar)? Following from that l'd even like to pause/resume the script, if that's possible.. Cheers!
  7. I wrote AutoIt programs for (too!!) many years! I just update to W10 then install a new machine. Want to write a script and found that whatever flag values MsgBox won't pause the script ( just display for 2 ~ 3 seconds) The same occurs with _ArrayDisplay Thanks for Any Clue
  8. Hello everyone! I present to you a way to automate DropBox, at least syncing... Sample: Donwload: DropBoxControl_(RedirectLink).html Usage: Ctrl + Q to exit. Ctrl + Pause to Pause/Resume DropBox! It can also use the following: #AutoIt3Wrapper_Run_Before="%scitedir%DropBoxControl.exe" /Pause #AutoIt3Wrapper_Run_After="%scitedir%DropBoxControl.exe" /ResumeJust copy the executable into the folder of the editor! I hope you enjoy! Regards, João Carlos.
  9. I'm trying to have my program stop outlook and another instant messaging program while it is in a certain mode. This is because people will be scanning barcodes in another room, but instead of having to close out of the programs, I was hoping to have autoit freeze or pause other programs while it is in scanning mode. I found this chunk of code which makes me feel like I am close, but not close enough to what I want to do. #Include <WinAPI.au3> $process = _WinAPI_OpenProcess("PROCESS_SUSPEND_RESUME", 1, "outlook.exe") DllCall("ntdll.dll", "Int", "NtSuspendProcess", "Int", $process) sleep(1000) DllCall("Kernel32.dll", "Int", "CloseHandle", "Int", $process) I don't have much code to start with, but if anyone has any thoughts, I would be grateful! Thanks in advance!
  10. Hi, been searching for a way to Pause a HotKeySet and it would seem that the Help File has one beautifully prepared. But it turns out that Pause does not stop the HotKeySet from working. Anyone know why? And/Or how to fix it? Thanks, Bill
  11. Alright I'm trying to figure out a way to pause my script from executing which uses a timer using the (_Timer_Init() and _Timer_Diff()) methods. Now I know that when I click on the autoit icon for my scipt in the tray that it pauses my script but it also has an opition to exit my script which I would like to disable while still having the pausing option available to the user. Any suggestions?
  12. Hi all, My first uploaded UDF So this is just an improvised version of the Sleep function. It allows the script to sleep, as normal, while still running code. This would be useful if you want your script to sleep for a long period of time, but for your GUI to still be fully functional. So, if you have your script sleep for 5 minutes, and want your GUI to close when you click on the close button, then this will allow you to do it. I've included the basic switch for the GuiGetMsg() function with the $GUI_EVENT_CLOSE in it, but left everything else out, so that you can customize and edit it to fit your needs. It takes two parameters: The first one is how long it should wait, in milliseconds, just like the regular sleep function. The second parameter is optional (has a default at 10), and is for how long it should pause while running through its while loop. Here it is: Func Sleep2($waitTime, $pauseTime = 10) Local $finishTime = $waitTime + (@YDAY * 86400000) + (@HOUR * 3600000) + (@MIN * 60000) + (@SEC * 1000) + @MSEC While 1 Local $currentTime = (@YDAY * 86400000) + (@HOUR * 3600000) + (@MIN * 60000) + (@SEC * 1000) + @MSEC If $currentTime >= $finishTime Then ExitLoop $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch Sleep($pauseTime) WEnd EndFunc If you want to test it, run this code- it shows a tooltip displaying the current milisecond we are at in the year, then pauses for 5 seconds, and displays the new current time right below it. $time = (@YDAY * 86400000) + (@HOUR * 3600000) + (@MIN * 60000) + (@SEC * 1000) + @MSEC ToolTip($time) Sleep2(5000) ToolTip($time & @CRLF & ((@YDAY * 86400000) + (@HOUR * 3600000) + (@MIN * 60000) + (@SEC * 1000) + @MSEC)) While 1 Sleep(30) WEnd Tell me what you think. If you want to download it as a file, here it is:
×
×
  • Create New...