Drew Posted July 24, 2009 Share Posted July 24, 2009 How might I go about having it set to where: When I press !s ( ALT + s ) , it will hold down the shift key ( indefinitely ) until I press the hotkey again. I have the entire script written except the key-down part of the function , I can't find anything but SendKeyDownDelay() <-- Doesn't do exactly what I'm looking for. Is there another function that I seem to be missing? Or some method I could use to go about it another way? Link to comment Share on other sites More sharing options...
UnknownWarrior Posted July 24, 2009 Share Posted July 24, 2009 (edited) How might I go about having it set to where: When I press !s ( ALT + s ) , it will hold down the shift key ( indefinitely ) until I press the hotkey again. I have the entire script written except the key-down part of the function , I can't find anything but SendKeyDownDelay() <-- Doesn't do exactly what I'm looking for. Is there another function that I seem to be missing? Or some method I could use to go about it another way? Do Send("{SHIFT}") Until _IsPressed("53") And _IsPressed("12") Thats how I'd do it anyways XD Edited July 24, 2009 by UnknownWarrior Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted July 24, 2009 Share Posted July 24, 2009 Here's how I would do it. Code : HotKeySet ('!s','_Toggle'); Alt+S Global $Toggle = False While 1 Sleep (15) If $Toggle <> False Then Send ('{SHIFTDOWN}') Send ('{SHIFTUP}') EndIf WEnd Func _Toggle () If $Toggle = False Then $Toggle = True Else $Toggle = False EndIf EndFunc Hope it helps! - John Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 24, 2009 Share Posted July 24, 2009 HotKeySet("!s", "keyon") HotKeySet("!+s", "keyoff") While 1 Sleep(10) WEnd Func keyon() Send("{SHIFTDOWN}") EndFunc Func keyoff() Send("{SHIFTUP}") EndFunc The problem is that shift is being held, so you need to handle a hot key for shift held down too. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted July 24, 2009 Share Posted July 24, 2009 (edited) Would the keyoff hotkey (!+s) be called with just '!s' if the shift key is already being held down? How would this affect the callability of the keyon hotkey?<br> Edited July 24, 2009 by snowmaker - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 24, 2009 Share Posted July 24, 2009 Yes, but you are wanting the script to hold shift for you. 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