hoppy Posted April 4, 2006 Share Posted April 4, 2006 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 More sharing options...
=sinister= Posted April 4, 2006 Share Posted April 4, 2006 Can you please post your script so we can see what we can do with it? Link to comment Share on other sites More sharing options...
Evil_Has_Survived Posted April 4, 2006 Share Posted April 4, 2006 (edited) try sleep(.......) expandcollapse popupGlobal $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 April 4, 2006 by Evil_Has_Survived Thanks in advance Link to comment Share on other sites More sharing options...
herewasplato Posted April 5, 2006 Share Posted April 5, 2006 ...How can I pause the script untill the desktop is loaded?...WinWait("Program Manager") [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
hoppy Posted April 5, 2006 Author Share Posted April 5, 2006 Thanks, I'll give these things a shot when I'm back from work. Link to comment Share on other sites More sharing options...
MHz Posted April 5, 2006 Share Posted April 5, 2006 HKCU\...\RunOnce starts when the desktop is running.HKLM\...\RunOnce starts before the desktop is running and wait for each entry to finish. Link to comment Share on other sites More sharing options...
hoppy Posted April 5, 2006 Author Share Posted April 5, 2006 just what i needed thanks m8 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now