mooboo 0 Posted May 30, 2004 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+aFunc First()SplashOff ( )$First = PixelGetColor( 10 , 100 )endfuncI 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
CyberSlug 6 Posted May 30, 2004 Body of script after HotKeySet: While 1;loop forever sleep(100) WEnd (You can also add a hotkey to exit the script as shown in the AutoIt documentation for HotKeySet.) 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 0 Posted May 30, 2004 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+aWhile 1;loop forever sleep(100)WEndFunc First()SplashOff ( )msgbox (0, "h", "Hh");$First = PixelGetColor( 10 , 100 )endfunc Share this post Link to post Share on other sites
CyberSlug 6 Posted May 30, 2004 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 0 Posted May 30, 2004 You are one smart cookie! Works perfect now!!! Share this post Link to post Share on other sites