Jump to content

Recommended Posts

Posted

1 more thing if i have to while loops do i need to add $init = TimerInit() twice 4 each 1 or do i just have it at the top of my script?

$init = TimerInit()

While 1
    If TimerDiff($init) >  600000 Then
        Exit
    EndIf
    If WinActive("Untitled -") Then
        ExitLoop
    EndIf
    sleep(50)
Wend

sleep(10000)

$init = TimerInit() ;do i need this here or not?

While 1
    If TimerDiff($init) >  600000 Then
        Exit
    EndIf
    If WinActive("Untitled -") Then
        ExitLoop
    EndIf
    sleep(50)
Wend
Posted

wow sweet that was fast.

$init = TimerInit(10)

While TimerDiff($init) <  .. whatever value here for 10 minutes
    If WinActive("Untitled - Notepad") Then
        ExitLoop
    EndIf
Wend

so is that right if it dont find notepad withen 10 min it will end the loop?

Pardon my jumping in and going so far back up in your thread, but you said:

if it dont find notepad...

Do you want the script to wait for a notepad window to be active or just exist?

WinActive or WinExists

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

lolit dosnt really matter i just put the notepad in there just 4 a demo to see how this works

notepad was not part of my question lololololol

It matters as to which function I post in my code back to you. :-)

[size="1"][font="Arial"].[u].[/u][/font][/size]

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
×
×
  • Create New...