Sign in to follow this  
Followers 0
JLC123

SplashOff via HotKey

3 posts in this topic

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
EndFunc

EDIT: This is a cut and paste from previous post


Two wrongs don't make a right, but three lefts do

Share this post


Link to post
Share on other sites



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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0