Info Posted July 8, 2009 Share Posted July 8, 2009 HotKeySet("{F1}","sdown") HotKeySet("{F2}","sup") Func sdown() Send("{shiftdown}") EndFunc Func sup() Send("{shiftup}") EndFunc While 1 WEnd When I press the F1 the shift key is indeed pressed, but when I try releasing it with F2 it's still pressed Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 8, 2009 Share Posted July 8, 2009 That's because your script is holding shift. You'll have to put a hotkey on shift+F2. Or use shift+F1 and it will become a toggle. Link to comment Share on other sites More sharing options...
herewasplato Posted July 8, 2009 Share Posted July 8, 2009 Info,You need a sleep in that While/Wend loop.And I need a sleep too.....HotKeySet("{F1}", "sdown") HotKeySet("+{F1}", "sup") Func sdown() Send("{shiftdown}") EndFunc ;==>sdown Func sup() Send("{shiftup}") EndFunc ;==>sup While 1 Sleep(99) WEnd^^^what Richard Robertson said [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 8, 2009 Share Posted July 8, 2009 He doesn't need a sleep, but it certainly would help the processor. Link to comment Share on other sites More sharing options...
Info Posted July 8, 2009 Author Share Posted July 8, 2009 I really hate this... this help file simply says that {SHIFTDOWN} "Holds the SHIFT key down until {SHIFTUP} is sent" yet, after I sent {SHIFTUP}, it seems to still be down... Now I have no idea how to put this on my script T_T Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 8, 2009 Share Posted July 8, 2009 That's correct. It was actually your hotkey that wasn't being fired. Your hotkey was set up to turn off shift when F2 is pressed alone. Since shift was being held down, F2 was never being pressed alone. Plato's code will work for you. Link to comment Share on other sites More sharing options...
Info Posted July 8, 2009 Author Share Posted July 8, 2009 Thanks for explaining, now I got it to work 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