sendkeys syntax for a CBT
-
aurumdigitus
- Posts: 1075
- Joined: 30 May 2008 21:02
- Location: Lake Erie
sendkeys syntax for a CBT
Want to create a toolbar button to press and hold Shift but can't make it work. Have tried the obvious sendkeys "{SHIFT}"; without success. Can any coder out there help?
-
jupe
- Posts: 3478
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: sendkeys syntax for a CBT
Others may have alternative methods for you, but one suggestion I thought of is using an external command line tool NirCmd, I always have this on my computer because I use it all the time for various things and it should work in this situation, something like this:
Be sure to create an opposing way to release the shift button too, or add down to left click & up to right click CTB actions, or something similar.
For more info:
http://nircmd.nirsoft.net/sendkey.html
Code: Select all
run "nircmd.exe sendkey shift down";Code: Select all
run "nircmd.exe sendkey shift up";http://nircmd.nirsoft.net/sendkey.html
-
aurumdigitus
- Posts: 1075
- Joined: 30 May 2008 21:02
- Location: Lake Erie
Re: sendkeys syntax for a CBT
Will have to think this over before trying. Have heard some bad things about Nirsoft utilities.
Does this work on your system?
In any case thank you for your reply.
Does this work on your system?
In any case thank you for your reply.
-
jupe
- Posts: 3478
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: sendkeys syntax for a CBT
It does exactly what you wanted, I tested it, although I can't understand a situation where you would want the Shift key held down for an extended amount of time.
I have been using Nirsoft utilities for at least a decade and thoroughly recommend them, I have never heard anything bad about them during that time either, and have only had positive experiences. It is IMO an immensely powerful utility for its 120kb size, but it is entirely up to you.
I have been using Nirsoft utilities for at least a decade and thoroughly recommend them, I have never heard anything bad about them during that time either, and have only had positive experiences. It is IMO an immensely powerful utility for its 120kb size, but it is entirely up to you.
XYplorer Beta Club