Jump to content

Misunderstanding Sleep?


Guest rgoodwin
 Share

Recommended Posts

Guest rgoodwin

Ok I made this VERy simple script, to clicka button every 2 hours, but for some reason it keeps trying to do it very frequently (or at the very least keeps popping up the traytip often). I'm probably missing something simple s please go easy on me! :-)

Opt("WinTitleMatchMode",2)

Opt("MouseCoordMode",0)

while 5

If ProcessExists("newsleecher.exe") Then

WinActivate("NewsLeecher v1.0 beta 30 (RC1)")

WinWaitActive("NewsLeecher v1.0 beta 30 (RC1)")

WinSetState("NewsLeecher v1.0 beta 30 (RC1)", "", @SW_MAXIMIZE)

MouseClick("Left",464,195,2,0)

TrayTip("Retrieving","Downloading Newsleecher Headers",5,10)

Sleep(7200000)

EndIf

Wend

Link to comment
Share on other sites

  • Developers

Ok I made this VERy simple script, to clicka button every 2 hours, but for some reason it keeps trying to do it very frequently (or at the very least keeps popping up the traytip often). I'm probably missing something simple s please go easy on me! :-)

Opt("WinTitleMatchMode",2)

Opt("MouseCoordMode",0)

while 5

If ProcessExists("newsleecher.exe") Then

  WinActivate("NewsLeecher v1.0 beta 30 (RC1)")

  WinWaitActive("NewsLeecher v1.0 beta 30 (RC1)")

  WinSetState("NewsLeecher v1.0 beta 30 (RC1)", "", @SW_MAXIMIZE)

  MouseClick("Left",464,195,2,0)

  TrayTip("Retrieving","Downloading Newsleecher Headers",5,10)

Sleep(7200000)

        EndIf

       

Wend

<{POST_SNAPBACK}>

looks ok to me....

maybe put in a msgbox to see if the script is actually looping ??

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I don't assume this works. You can always try and see.

Opt("WinTitleMatchMode",2)
Opt("MouseCoordMode",0)
$Title = "NewsLeecher v1.0 beta 30 (RC1)"
while 1
    If ProcessExists("newsleecher.exe") Then
    
      WinActivate($Title, "")
      WinWaitActive($Title, "")
    
      WinSetState($Title, "", @SW_MAXIMIZE)
      MouseClick("Left", 464, 195, 2, 0)
    
      TrayTip("Retrieving","Downloading Newsleecher Headers", 10, 0)
      Sleep(2 * 60 * 60 * 1000)
    EndIf
Wend
Link to comment
Share on other sites

Guest rgoodwin

looks ok to me....

maybe put in a msgbox to see if the script is actually looping ??

<{POST_SNAPBACK}>

I keep seeing the TrayTip pop back up quickly so it's definitely looping (or a TrayTip bug)...

I don't assume this works. You can always try and see.

Opt("WinTitleMatchMode",2)
Opt("MouseCoordMode",0)
$Title = "NewsLeecher v1.0 beta 30 (RC1)"
while 1
    If ProcessExists("newsleecher.exe") Then
    
      WinActivate($Title, "")
      WinWaitActive($Title, "")
    
      WinSetState($Title, "", @SW_MAXIMIZE)
      MouseClick("Left", 464, 195, 2, 0)
    
      TrayTip("Retrieving","Downloading Newsleecher Headers", 10, 0)
      Sleep(2 * 60 * 60 * 1000)
    EndIf
Wend

<{POST_SNAPBACK}>

I'll try it!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...