StrokesPlus Forum
StrokesPlus Forum
Home | Profile | Register | Active Topics
Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 Lua Scripts
 General Action Scripts
 Right CTRL key acsendkeys problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  


3 Posts

Posted - 07/05/2014 :  07:59:30  Show Profile  Reply with Quote
Hi Rob

I have a similar problem to this one:

I am sending some text to the current window on CTRL+k hotkey. To prevent the CTRL key from modifying the intended text I am using acSendControlUp() before acSendKeys. This works when the left CTRL key is being pressed but not the right CTRL key. I have tried acSendKeyUp("{VKEY 163}"), acSendKeyUp("{VKEY 162}") & acSendKeyUp("{VKEY 17}") with no success.

I've considered using a 'while-do' delay loop but can see no way of determining if a given key (RCTRL in this case) is being pressed.

I am using Win8.1 64-bit.

Any thoughts?

Edited by - Jules on 07/05/2014 17:23:08


2605 Posts

Posted - 07/08/2014 :  23:22:22  Show Profile  Visit Rob's Homepage  Reply with Quote
Have you tried using GetKeyState as described in this post (of course, for CTRL and not CAPS Lock):

P.S. I've been going through a lot of life transitions and will be getting back to S+ in the near future; so I apologize to all for my less than normal involvement.
Go to Top of Page


3 Posts

Posted - 07/10/2014 :  09:45:28  Show Profile  Reply with Quote
That post worked thanks. I replaced VK_CAPITAL = 0x14 with VK_CONTROL = 0x11 in the Global Lua; & the action I'm using to wait for either left or right Control key to be released is:

local iCtrl = aGetKeyState(VK_CONTROL)
while iCtrl <= -100 do
iCtrl = aGetKeyState(VK_CONTROL)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000