Jump to content

Runonce


Recommended Posts

I've got a script that's started with runonce, but some parts start to soon.

How can I pause the script untill the desktop is loaded?

I'm unable to find something to wait for .

Any ideas?

Thanks for your intrest.

Link to comment
Share on other sites

try

sleep(.......)

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage");Shift-Alt-d

;;;; Body of program would go here;;;;
If WinExists("........") Then
    HotKeySet("{......}", ".....")
Else
    MsgBox(64, "Info", "....................!")
    Exit(0)
EndIf

Func Close()
    Send("{....}")
EndFunc

While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message.")
EndFunc

$val = RunWait("Notepad.exe", "C:\WINDOWS", @SW_MAXIMIZE)
; script waits until Notepad closes
MsgBox(0, "Program returned with exit code:", $val)

ProcessWait("notepad.exe")

not really sure what your doing though try one of thoughs

Edited by Evil_Has_Survived
Thanks in advance
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...