Jump to content
Sign in to follow this  
mooboo

Wait for hotkey?

Recommended Posts

mooboo

SplashTextOn("Configure", "Please load program and go to the main screen. When you are there, press F1", -1, -1, -1, -1, 4, "", 5)

HotKeySet("+a", "First")  ;Shift+a

Func First()

SplashOff ( )

$First = PixelGetColor( 10 , 100 )

endfunc

I want to do a pixel check once the user hits Shift+a. But, when I run this script, it just exits real fast. How can I make the script wait for the user to press Shift+a?

Share this post


Link to post
Share on other sites
mooboo

Doesn't work. If I press the hotkey, nothing happens.

Here is the script I am using....

SplashTextOn("Configure", "Please load program and go to the main screen. When you are there, press F1", -1, -1, -1, -1, 4, "", 5)

HotKeySet("+a", "First")  ;Shift+a

While 1;loop forever

sleep(100)

WEnd

Func First()

SplashOff ( )

msgbox (0, "h", "Hh")

;$First = PixelGetColor( 10 , 100 )

endfunc

Share this post


Link to post
Share on other sites
CyberSlug

:D I also missed this the first time: You cannot simple letters as hotkeys, so a-z and A-Z will not work. Use Ctrl or Alt with a letter instead.

By the way,

HotKeySet("A", "foo")

HotKeySet("+a", "foo")

HotKeySet("+A", "foo")

are all equivalent; and all will fail.


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
mooboo

You are one smart cookie! :D Works perfect now!!!

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  

×