Search the Community
Showing results for tags 'Wait'.
-
Hi everyone. I want to ask about this : I want it runs from 1 to 100 and It opens 10 firefox profiles then access youtube. After I close a firefox window, the loop runs and wait for another window close until loop ends I have a loop like this. Func launch() Local $from = Int(GUICtrlRead($input1)) Local $to = Int(GUICtrlRead($input2)) If $to <> "" Then While $from <= $to Local $profile = $to _RunDos("start firefox.exe -p " & $profile & " -no-remote youtube.com") $to=$to+1 WEnd Else Local $profile = $to _RunDos("start firefox.exe -p " & $profile & " -no-remote youtube.com") EndIf EndFunc Is there any solution? Thank you!
-
Hi guys I have a script that runs for about 20 seconds. If Outlook.exe is not already open, and I open it while the script is running, I want Outlook to wait until the script is done, and then open. Is it possible to set an application in some sort of idle state until the script is done? I want to avoid it from just closing Outlook, and open it again. Thanks David
-
I've written a bot that is loading down pictures from a website. Basically, it opens the website, saves the picture via context menu, and hits a button for loading the next pic. Unfortunately, the pics and my internet connection aren't always the same and it takes longer to load at times. Right now I've got a sleep(3000) in my code, but it isn't very efficient. I waste time if it loads faster than 3000ms, and the program fails if it takes more than 3000ms. So I wanted to make a function that waits until the picture has loaded, and then saves it. I don't know if that causes any problems with possible functions, but it isn't the tab that's loading. The loading circle doesn't appear. It's something on the website. I've adapted to program to chrome, so I'd have to rewrite it partially for the IE functions, so it'd be nice if there was a solution for chrome. --- Thanks!
-
Hello. I'd like to ask a question about AutoIt basics, as I was deeply thinking about creating a script, I got stuck at some questions such as: The Sleep function stops the script completely (it stops everything, if the script repeats an action every 5 seconds and there is a Sleep(1000), will it repeat once per 6 seconds in real time)? Can there be multiple loops working simultaneously depending on IFs or Switches? (loops controlling keyboard, deducing things from imagesearch etc.) If there can be multiple loops working in one moment (multiple actions), does Sleep stop the whole script or just one of the loops? Thanks for responses.
-
Hi, im testing the performance of my portal IE9 with the installed IE9... The test is this: 1) Open browser 2) Navigate to a webpage 3) Wait until its full loaded 4) Close browser My problem is step 3... I cannot use _IECreate function because i cannot select portal IE9... How can i wait (without using winwait, sleeps, or something like that) until is full loaded? Thanks
- 7 replies
-
- wait
- internet explorer
-
(and 1 more)
Tagged with:
-
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: