This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

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

 All Forums
 Lua Scripts
 General Action Scripts
 Right CTRL key acsendkeys problem
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jules

3 Posts

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

I have a similar problem to this one: http://www.strokesplus.com/forum/topic/540/acsendkeys-problem

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

Rob

USA
2615 Posts

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

http://www.strokesplus.com/forum/topic/599/small-annoyance-capslock-sensitive?SearchTerms=getkeystate

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

Jules

3 Posts

Posted - 07/10/2014 :  09:45:28  Show Profile
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)
acDelay(10)
end
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000