JLC123 Posted November 19, 2004 Share Posted November 19, 2004 I used the code to pull up a splash at the begining of my script with info the user needs. It works fine, but doesn't move on when [esc] is pressed. It kills not only the splash but the entire program. So, I removed the "EXIT 0" line but then [esc] kills the splash and the script hangs, have to kill it in the tray. What am I doing wrong?FileInstall("C:\temp\splash.bmp", $destination) SplashImageOn("Fall", $destination,355,328,-1,-1,1) HotKeySet("{ESC}", "kill") While 1 Sleep(100) WEnd Func kill() SplashOff() Exit 0 EndFuncEDIT: This is a cut and paste from previous post Two wrongs don't make a right, but three lefts do Link to comment Share on other sites More sharing options...
CyberSlug Posted November 19, 2004 Share Posted November 19, 2004 Maybe you could use a global flag? I don't know if I fully understand your problem based on your code fragment Global $ESC_PRESSED = 0 FileInstall("C:\temp\splash.bmp", $destination) SplashImageOn("Fall", $destination,355,328,-1,-1,1) HotKeySet("{ESC}", "kill") While Not $ESC_PRESSED Sleep(100) WEnd SplashOff() Func kill() $ESC_PRESSED = 1 EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
JLC123 Posted November 19, 2004 Author Share Posted November 19, 2004 Well, for someone who didn't fully understand the problem, you sure knew how to fix it! Thanks! (now, I'll have to go look up global flags) Two wrongs don't make a right, but three lefts do 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