Hi folks.
Anyone know if it's possible to use Desktop.SendKey to send the key "Code"
Specifically the code not text
Ie.
Pressing down arrow Gives the Key.Code as 65364
I can't seem to send it back that way.
I could send a Key["DOWN"] but i'm trying to make a macro recorder and pressing keys gives a numeric code 65364 not a string like "DOWN"
According to wiki SendKeys sends the code and not the string and you need to use something like Key["DOWN"] to send the down code but if i try SendKeys tells me it wanted a string but got an integer.
Tia
Bruce
SendKey codes
- BruceSteers
- Posts: 1575
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
SendKey codes
If at first you don't succeed , try doing something differently.
BruceS
BruceS
- cogier
- Site Admin
- Posts: 1126
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: SendKey codes
I can't find the warning I was looking for, but I am sure it goes something like 'Don't use codes as GTK and QT use different code for the same key'.
- BruceSteers
- Posts: 1575
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: SendKey codes
Yes but for a macro recorder it shouldn't matter.
Code recorded at the time should match code sent back regardless of system differences right?
If at first you don't succeed , try doing something differently.
BruceS
BruceS