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

Notification

Icon
Error

Options
Go to last post Go to first unread
shoichit  
#1 Posted : Tuesday, July 11, 2023 11:13:16 PM(UTC)
shoichit

Rank: Newbie

Reputation:

Groups: Approved
Joined: 1/31/2021(UTC)
Posts: 8
United States
Location: Liberty Lake

Thanks: 4 times
Was thanked: 1 time(s) in 1 post(s)
Hi

Thank you for providing such a great tool and helping us by making our life easier. I have two questions regarding the Sendkeys function.

1) I have one line script attached to a stroke. This is simply to move down to another tab in Google chrome. It switches to the next tab when it is done.

Quote:
sp.SendKeys ("^{PgDn}");


It was working fine until today when I updated the strokeplus, V0.5.7.4. When I do the stroke, it shows the name of the action so S+ is running it at least.
When I manually press Ctrl+Page Down, it does what is expected. Please let me know what could be happening here.

Another note is that another stroke with the following command still works.

Quote:
sp.SendKeys("^t");



2) What do I have to mimic "Ctrl+2" key press? This is to specify the second tab from the left by stroking. I tried below but didn't work.


Quote:
sp.SendKeys("^2");


Thank you in advance!

Rob  
#2 Posted : Wednesday, July 12, 2023 12:55:49 PM(UTC)
Rob

Rank: Administration

Reputation:

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

Thanks: 28 times
Was thanked: 423 time(s) in 359 post(s)
Ctrl Page Down works fine for me.

In general, I recommend using the Insert Hotkey button at the top of the script window, since this uses a more direct SendInput method as opposed to Microsoft SendKeys.

Click Insert Hotkey, then press the key combination, and it will insert the command at the current location:
Code:
//Control+Page Down
sp.SendModifiedVKeys([vk.LCONTROL], [vk.NEXT]);

//Ctrl 2:
sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_2]);

shoichit  
#3 Posted : Wednesday, July 12, 2023 4:37:51 PM(UTC)
shoichit

Rank: Newbie

Reputation:

Groups: Approved
Joined: 1/31/2021(UTC)
Posts: 8
United States
Location: Liberty Lake

Thanks: 4 times
Was thanked: 1 time(s) in 1 post(s)
Thank you for your prompt reply. I didn't know "Insert Hotkey" it is much easier because I don't have to find out the key names like "{PgDn}".

I figured out what the issue was. It was MS PowerToys. I set up a keyboard key switch between Ctrl and Capital keys using the tool. I revised the code as below and it works as expected. Thank you for your help.

Code:
sp.SendModifiedVKeys([vk.CAPITAL], [vk.NEXT]);
Users browsing this topic
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.