StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Surenpahlav  
#1 Posted : Wednesday, May 6, 2020 11:25:41 AM(UTC)
Surenpahlav

Rank: Member

Reputation:

Groups: Approved
Joined: 3/24/2020(UTC)
Posts: 27

Thanks: 2 times
I'm trying to send keys like "^f14" etc. to some apps. In old S+ i just used for example: "acSendControlDown() acSendKeys("{F16}") acSendControlUp()" and it worked. In the new S+ I tried doing it though steps, but it misfired randomly, so I tried doing it via script but I can't seem to make it work. Doing the variation of sending "control up, control down" makes the modifier get stuck on down state, so that didn't work. I tried doing via VK keys, but I'm not sure how exactly. I tried these and neither of them worked, giving errors:

sp.SendKeys('^{F14}');
sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_F14]);
Rob  
#2 Posted : Friday, May 8, 2020 5:17:25 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,359
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 419 time(s) in 356 post(s)
This would be the correct line for Ctrl+F14:
Code:
sp.SendModifiedVKeys([vk.LCONTROL], [vk.F14]);

You could also try the control separately:
Code:
sp.SendControlDown();
sp.Sleep(50);
sp.SendVKey(vk.F14);
sp.Sleep(50);
sp.SendControlUp();


I don't have any apps that accept Ctrl+F14 that I know of, so I cannot test it - but neither of the above throw errors.
thanks 1 user thanked Rob for this useful post.
Humphries on 4/15/2021(UTC)
Surenpahlav  
#3 Posted : Friday, May 8, 2020 5:23:30 PM(UTC)
Surenpahlav

Rank: Member

Reputation:

Groups: Approved
Joined: 3/24/2020(UTC)
Posts: 27

Thanks: 2 times
Thanks a lot.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.