Author |
Topic |
|
Alex22
Ukraine
19 Posts |
Posted - 09/05/2013 : 14:14:04
|
I just start program and have fatal issue with emulation of "ctrl" button. I can`t execute none action with this key. I tried for "copy" this acSendKeys("^c") and this acGetClipboardText() and this acSendKeys("{VKEY 11}{VKEY 43}") and nothing! What do I do wrong? PS ctrl+c and other hotkey with "ctrl" on hardware keyboard works well. |
|
Rob
USA
2615 Posts |
Posted - 09/05/2013 : 14:26:39
|
Is it only CTRL+C [ acSendKeys("^c") ] that doesn't work? Or is it all hotkeys with the CTRL key that do not work?
Does it fail with a message? Or simply doesn't do anything and the desired item isn't on the clipboard?
Do you have any other types of utilities running? |
|
|
Alex22
Ukraine
19 Posts |
Posted - 09/05/2013 : 14:56:06
|
>Is it only CTRL+C [ acSendKeys("^c") ] that doesn't work? Or is it all hotkeys with the CTRL key that do not work? All hotkeys. I tried "paste", "undo", "browser jornal". >Does it fail with a message? Or simply doesn't do anything and the desired item isn't on the clipboard? Just do nothing. >Do you have any other types of utilities running? I use gestures in FF (All-in-one gestures), clipboard manager (Spartan), Key switcher (autoswitch language locale). But even when all of them turn off, I have the same result. I meets this problem with some other application. New versions of Spartan Clipboard couldn't emulate ctrl+v (so I use old 7.1 version, and it's alright). AutoclipX send "c/v" instead "ctrl+c/v". But XMouseButtonControl useful for copy/paste with mouth buttons, may be it work on other principles, then emulation ctrl+c. |
Edited by - Alex22 on 09/05/2013 14:57:03 |
|
|
Alex22
Ukraine
19 Posts |
Posted - 09/05/2013 : 15:05:02
|
|
|
|
Alex22
Ukraine
19 Posts |
Posted - 09/06/2013 : 09:10:43
|
It was the day of experiments. I download several free portable gestures progs and try to use them. Starting with trying copy and paste something, I finish at this point. StrokeIt and MouseWrangler have same dramatic trouble with ctrl key as StrokePlus. I thought something wrong with my PC, but wait a minute, ancient gMote works well! I don't understand, what it's difference from another ones, may be there is alternative way to emulate stroking the keys. But gMote is not developing application and it is very, very simply. A few basic windows function and keystroking. Neither mouth wheel nor rocker gestures support. Different action for the same figure with different modifier? Oh, please... User's script support? Ha-ha-ha! So, I would find the answer how to use StrokePlus on my PC. |
Edited by - Alex22 on 09/06/2013 09:12:04 |
|
|
Rob
USA
2615 Posts |
Posted - 09/06/2013 : 09:15:45
|
There must be something specific about your system or configuration since I have not heard of this problem before. The fact that other programs have a similar issue confirms it.
I am not certain how to assist you since I cannot reproduce the problem on my computer. However, I will continue to think of possible suggestions. |
|
|
Alex22
Ukraine
19 Posts |
Posted - 09/07/2013 : 10:02:26
|
The problem is solved!! It was not ctrl issue, it was the letters issue. First I detect, that couldn't send any letters (with or without ctrl) but num keys OK. Experimenting with ASCII codes, I accidentally input "\223" (ASII code of Cyrillic letter "ß" placed on "Z" keyboard's button) and - voila - "Z" sent to AkelPad window. So, I understand why this program works well on my wife's laptop - she set US locale by default. Now I have alternative: change locale by default (and say good-buy to portability - in Ukraine almost nobody use US locale by default) or use Cyrillic analog of buttons name in hotkey. It's much better then nothing, but if it possible could you eliminate this issue with Cyrillic locale? As far as I understand, it's not impossible, because some other similar programs (gMote and Just Gestures) works indifferent to locale. |
|
|
Rob
USA
2615 Posts |
|
Alex22
Ukraine
19 Posts |
Posted - 09/16/2013 : 12:10:14
|
Is there way to use scancodes instead VKEY or ASCII codes? In AutoHotKey this method solve problem with ununicode symbols. http://www.script-coding.com/AutoHotkey/AhkRussianEng.html quote: For the first variant, add the following line immediately above the first line (or beneath it, it does not matter):
^!ÿ:: ; Define a Ctrl+Alt+z hotkey
For the second variant, instead of the first line include the following one:
^!sc02C:: ; Define a Ctrl+Alt+z hotkey
Defining a hotkey with the help of a scan code (sc) is, certainly, far more universal. That is why I recommend this very method to you.
|
|
|
Rob
USA
2615 Posts |
Posted - 09/16/2013 : 13:43:37
|
Possibly, I'll have to look into the send keys code when I get some time; I copied that code from a Code Project solution, so I'm not intimately familiar with the inner workings. |
|
|
Noesis
25 Posts |
Posted - 09/17/2013 : 08:45:33
|
Alex just wanted to check that you were sending the correct key codes.
You're first post indicated ^c you were using VKey 11 Vkey 43. Using AHK's key history, the c key does in fact report c as VK 43 however, that is a hexadecimal value, i.e. for acSendkeys you need to use the decimal value i.e. c should be {VKEY 67}. As far as the vkey 11 is concerned, I'm not sure where that comes from as for me it should be either 162 or 163 (A2 or A3 hex value from AHK's key history window) - for left or right control key respectively. - hence my suspicion that perhaps you've been trying incorrect codes ? |
|
|
Alex22
Ukraine
19 Posts |
|
Rob
USA
2615 Posts |
Posted - 09/17/2013 : 13:47:41
|
As I mentioned earlier, the SendKeys code wasn't mine originally and when I slapped together the help guide, I put the link to the VKEY codes on MSDN as a quick reference, but failed to mention (or notice at the time) that the SendKeys code is expecting a decimal number, not the hexadecimal equivalent.
The MSDN link gives you the correct codes, but in hex. The chart below is a quick reference, look for the hex number from the MSDN page and locate the decimal value. The decimal number is what SendKeys is expecting. You'll notice the hex value 43 is equivalent to a decimal value of 67.
http://ascii.cl/conversion.htm |
|
|
Noesis
25 Posts |
Posted - 09/18/2013 : 03:07:42
|
Some other options if you're like me and prefer not to look at tables if it can be avoided, is to use windows calculator (programmer view) for the conversions (at least in Win7, I assume the Win8 version will also work ?).
Also, if you are running AutoHotkey as well, you can use the "KeyHistory" window to view the codes of typed keys locally (Just remember if you use this method, the values reported are still in hex). |
|
|
HarryS
11 Posts |
Posted - 08/11/2014 : 07:40:38
|
Numpad enter and enter can't be separated by vkey, they have the same code 0D. But with scancode they can be separated 11C and 01C. I use numpad enter for an autohotkey script, tried to launch it with a strokesplus gesture but it woulnd't work, worked around it by adding another hotkey.
But yeah, scancode is more versatile. |
|
|
|
Topic |
|