I'm trying to piece together a script that toggles Shift on and off (up and down) when the button at the end of a Surface Pen is pressed.
My current script is as follows:
#F20::
Sleep, 100
Send, {Shift down}
KeyWait, #F20
Send, {Shift up}
return
It throws an invalid parameter error at the fourth line. Removing the space did nothing.
If it's relevant, the first line threw the same error with a space in, or seemed to.
Please contribute any insight into a solution or the nature of these Pen keys that you may have. It will be greatly appreciated. Thanks!
Surface Pen button -> toggle Shift Topic is solved
Re: Surface Pen button -> toggle Shift
You can use a toggle variable.
Code: Select all
toggleShift := false
;variable must be set in auto execution section! (At the top of the script)
#F20::
Sleep, 100
if !toggleShift
Send, {Shift down}
else
Send, {Shift up}
toggleShift := !toggleShift
return
"Nothing is quieter than a loaded gun." - Heinrich Heine
Re: Surface Pen button -> toggle Shift Topic is solved
Please don’t open multiple topics with the same question. If you are posting as a guest you will have to wait for the topic approval and duplicating topics will only result in extra work for the moderation team, but not in a faster approval.
The time it takes the moderation team to check posts is depending on the current activity, so there are no guarantees. Consider registering an account. Once your account is approved you can post topics without waiting time.
Greetings,
Alibaba
The time it takes the moderation team to check posts is depending on the current activity, so there are no guarantees. Consider registering an account. Once your account is approved you can post topics without waiting time.
Greetings,
Alibaba
"Nothing is quieter than a loaded gun." - Heinrich Heine
Who is online
Users browsing this forum: Bing [Bot], sachalamp and 421 guests