I need help making a script!
Posted: 21 Sep 2017, 21:02
I need help making a script that holds SHIFT&W and taps CTRL&V!
I would also like the enable key to be F1!
I would also like the enable key to be F1!
Let's help each other out
https://www.autohotkey.com/boards/
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=37338
Holy SHIFT! I should let you rewrite the manuals for all of my home devicesExaskryz wrote:Have you checked the Tutorial?
F1 will be your Hotkey. If you'd like to disable it (end when it's holding Shift and W), check out doing a toggle. This will also show you how to tap the Ctrl+V (Send ^v): (Note: The first link is from the old forums, the second link is on these forums) http://www.autohotkey.com/board/topic/6 ... re-thread/ or https://autohotkey.com/boards/viewtopic.php?f=7&t=11952
To hold down a key, specify the key name and the down state like this in the Send command: Send {w down}. Shift would be Send {shift down}. Notably, you miiight be able to get away with using Send {W down} as you need shift to produce a capital W most of the time (unless CapsLock is on), but whatever your target program is may not recognize Shift and W are down. Now I will note that if you have Shift held down, AHK will keep it down even when you do Ctrl+V, resulting in a final key combination of Shift+Ctrl+V which you may not want. So you may need to release Shift before you press Ctrl+V. You can release a held down key with Send {Shift up} -- change the down to up. You might be able to use Send {Shift DownTemp} (see the documentation on Send), but it may release Shift when you try to hold down the W key. I'll be exploring it myself to see if I can get it to work.
Edit: I couldn't manage to utilize the {Shift Downtemp}, because once you call any key after it, Shift is released and never pressed down again. So you may as well do a manual release. Whenever you call for Ctrl+V, release Shift and put it back down like this: Send {Shift up}^v{Shift down}. This may not be perfect though depending on your use case and implementation.
Someone will hopefully correct me if there is a better way to accomplish what you like, assuming Shift+Ctrl+V is undesirable for you.