Jump to content

Search the Community

Showing results for tags 'sleep'.

  • 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 21 results

  1. I have a script that reads the last 7 lines of an active log file. By active I mean that the file is being written while the script runs. How can I make the script to 1- keep reading the last 7 lines till a specific text appears. 2- Once the specific text appears, then get out of the loop and proceed to other tasks Thank You
  2. I have a script which executes sleep for a couple of hours then carries out instructions. Does the running AutoIt script prevent the computer from entering sleep mode during this time? If not, is there something I can add to the AutoIt script to keep the computer awake? Grateful for advice.
  3. TL;DR: Anyway to bypass built in sleep on TrayGetMsg() and GUIGetMsg() ? I'm currently working on a project that does some heavy array/ GDI+ processing, which depending what I have it do can take between 4s - 1min. During this time, I'd like to have the Tray icon (mainly, possibly also the GUI) for the program be responsive, so that if someone wanted to change actions or exit the script during this, they can without closing the process. Currently I have my TrayGetMsg and GUIGetMsg captures in my main program loop, working great, and once I go into the array/ GDI+ functi
  4. I have script Like This : Opt("TrayAutoPause",0) $var = Ping("www.google.com") If not @error Then WinActivate ( "testapp") ControlClick ( "testapp", "", "[Savetest]") ControlSend ( " :: Gujarat TPDS - eFPS :: Version - 2.2.0.0 - [eFPS Bill]", "", "[NAME:btnSavebyFP]", "{enter}") WinWait(":: Aadhar/EID/Verification Number Entry ::") ControlClick(":: Aadhar/EID/Verification Number Entry ::", "", "[NAME:btnNext]") If WinExists ("Aadhar : Length Check") Then ControlClick("Aadhar : Length Check", "", "[CLASS:Button; INSTANCE:1]") ControlSend(":: Aadhar/EID/Verifi
  5. How can i add sleep command using internet speed. If my internet speed is 40-50Kbps then sleep for 5 seconds, If my internet speed is 30-40Kbps then sleep for 4 seconds, If my internet speed is 20-30Kbps then sleep for 3 seconds. *Sleep command used bitween my costom script, Example, RunWait("rasdial /disconnect", "", @SW_HIDE) ; Stop connect from start Sleep(5000) RunWait("rasdial Internet", "", @SW_HIDE) ; Connect again
  6. Hi there, I did a short script to simulate mouse click when pixel change is detected on a small section of the screen. I recorded the screen many times to see the accuracy of the script and it seems though response time varies widely. Here's the script $checksum = pixelchecksum (400,250, 402,252) While $checksum = pixelchecksum (400,250, 402,252) Sleep (50) Wend Sleep (300) Mouseclick("left", 450,300, 1, 0) Counting from the pixel change to the mouse click, i get response times anywhere between 370ms and 550ms. I've tried running au3 and exe, chang
  7. Update 2017-04-21: Added a timeout My previous attempt of checking that the function is valid was not working. Added a 1 time function call before entering the While loop to test the function. Now sets error to $SLEEP_UNTIL_INVALID_CALL if the function supplied is does not exist or invalid arguments supplied Added an @Error value $SLEEP_UNTIL_TIMEOUT_REACHED, set when the condition was not met but timeout reached Update 2017-04-25: Thanks to @jguinchfor letting me know about Execute(). Greatly simplified the loop (didn't know that Execute would execute a function ca
  8. I have automated an install process by using the below code. Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc $win1 = "Text 1" $win2 = "Text 2" _WinWaitActivate($win1,"WARNING: This progra") Send("{ALTDOWN}n{ALTUP}");Send("{SPACE}") _WinWaitActivate($win1,"I DISAGREE and &do n") Send("{UP}n") _WinWaitActivate($win1,"Customer Information") Send(&qu
  9. I'm going to build a new function that I have been unable to find. PLEASE CORRECT ME. It will tweak the internal AutoIt functions giving me the ability to trash stuff I do not want to spin around. Get it? Please throw me whatever you got and I will put it togeather. Ship it now. My supersleep() will be in here somewhere. It's on another thread.
  10. I have a light bulb which I can turn on and off using UDP commands (I already have that working in AutoIt). What I would like to do is run a script before the computer goes to sleep to turn it off, and after it resumes to turn it on. I've already got the latter working, but not the former. I tried Task Scheduler with the kernel power log, but the command doesn't get executed until the computer resumes from sleep. I've tried some things using WM_POWERBROADCAST, but so far I haven't got that to work either. Here's what I've got so far: Global Const $WM_POWERBROADCAST = 0x218 Global Const $PBT
  11. When sleep is set to 500 and above it's causing the event that follows it to output 3 commands. In the following example the down keystroke is sent 3 times! Sleep(500) Send("{DOWN}",0) In the following example the down keystroke is sent once. Sleep(400) Send("{DOWN}",0) Why is it doing this? How do I stop sleep interfering with the event that follows it?
  12. 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 jus
  13. Hello guys, suddenly i'm having a problem with Sleep() func. When i give it less time like Sleep(2000), works, but when i tell it to sleep longer like Sleep(1000*60*3), it won't work... in fact is a surprise because it used to work perfectly.. anyone knows how to help? SugarBall
  14. I'm writing a small prog that will run in the background and sound an alarm if a certain Gmail message arrives in an otherwise unused account. My inclination is to use a simple While/WEnd loop with a 5 minute Sleep between checking for messages, but I've seen examples here of somewhat similar background tasks that employ AdlibRegister so I'm curious which method is the most reliable and least impactful on the CPU. Below are two simple scripts that begin to do what I want and represent how I think this could be handled. While/WEnd with Sleep #include <CheckMail.au3> Global $aReturn Glo
  15. I'm looking possible ways to optimize sleep time in a script which has multiple sleep times for save, refresh etc. The sleep duration varies from 5 secs to 17 secs time to time (depending upon the record, computer performance etc). Currently I set max sleep duration. ie sleep(17000). I'm looking possible ways to dynamically change sleep duration rather than fixed maximum duration. Note: winwait is not helpful in my script. Thanks in advance for your responses
  16. Is there some way to sleep only progress bar functionality, not whole program? example: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 421, 209, 243, 159) $close = GUICtrlCreateButton("Close", 153, 112, 119, 33) $Button1 = GUICtrlCreateButton("Run", 23, 112, 119, 33) $Progress1 = GUICtrlCreateProgress(88, 40, 257, 33) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $close Exit Case $Button1 For $i = 0 To 100
  17. Hello, I noticed on several installations that the Sleep statment causes CPU issues when the customer hardware is a powerfull one. For example: While 1 Sleep(5000) Wend Shall cost 0% CPU But is the hardware is fast the Sleep(5000) costs 3 % CPU when included into a loop. So, if 50 users start this script concurrent it overkill the CPU (which is not good of course). In such cases, the workaround I am using is to set a much longuer delay fo such specific case, but this is not a good solution because the script behavior is unpredictable. Can you help me on that specific pro
  18. How can I stop any function that is running and restart main function? My program keeps stacking points to go back, isn't it? How can I fix it? HotKeySet("{F8}", "StartStop") HotKeySet("{ESC}", "Quit") Global $status = -1, $cont Tray() Main() Func Main() $cont = 0 While 1 If $status = 1 Then Cont100() Switch TrayGetMsg() Case $ExitTray Exit Case $OptionsTray MsgBox(0, "Options", "Options") EndSwitch WEnd EndFunc Func Cont100() While $cont < 100 SplashTextOn("", $cont+1, 100, 50, 0
  19. I have a script that monitors network up/down time and when my laptop is set to hibernate or sleep, then later started up again, my script counts all of the hibernate/sleep time as down time. If I could get notification when going into hibernate/sleep mode and when it resumes normal mode, I could stop looking until normal mode is resumed. Is there an API that does this, or perhaps an event I could register a handler for? Andy
  20. Hello, I have this simple script which automates google translate. #include <IE.au3> $oIE = _IECreate("http://translate.google.com/#en|fr|") $oForm = _IEFormGetObjByName($oIE, "text_form") $oText = _IEFormElementGetObjByName($oForm, "text") _IEFormElementSetValue($oText, "Hello") Sleep(3000) $id = _IEGetObjById($oIE, "result_box") $oText1 = _IEPropertyGet($id, "innertext") MsgBox(0,"Translate",$oText1) What i want to do it to remove the Sleep(3000) that there is in the script. But removing it the script doesnt works because the message box appears before geting the value of the in
  21. 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
×
×
  • Create New...