Jump to content

Recommended Posts

Posted

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.

Posted (edited)

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
Posted

HKCU\...\RunOnce starts when the desktop is running.

HKLM\...\RunOnce starts before the desktop is running and wait for each entry to finish.

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...