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

Notification

Icon
Error

Options
Go to last post Go to first unread
icceeeee  
#1 Posted : Wednesday, August 3, 2022 5:36:59 PM(UTC)
icceeeee

Rank: Newbie

Reputation:

Groups: Approved
Joined: 9/5/2021(UTC)
Posts: 6

Thanks: 2 times
Hey Rob, really loving your software, don't know what I would do without it!

This is a bit of a niche problem I'm trying to figure out.

I recently bought a Microsoft Surface Touch Tablet, and I'm experimenting with S+ on it.

Here's the two threads that are the most relevant on the forum:

Make hotkeys work only in specific programs
App Specific Shortcuts

Basically, I'm trying to create specific hotkeys for difference applications with the Surface Pen.

The Surface Pen has an erase button with three Hotkeys: WIN + F18, F19, F20 (Single press, double press, and hold).

Here's an example script for WIN + F19 (which isn't working):

Code:
if(sp.ForegroundWindow().Title.indexOf("- Obsidian") > -1) {
    sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_E]);
}


Here's another example:

Code:
if(sp.ForegroundWindow().ExecutableName == "Obsidian.exe") {
    sp.SendModifiedVKeys([vk.LCONTROL], [vk.VK_E]);
} else {
    // Otherwise send F1 for any other app
    sp.SendVKey(vk.F1);
}


Any ideas on what could be going on? The whole Surface Pen setup is a little clumsy, so it's possible this is a Microsoft problem.

Thanks!
Rob  
#2 Posted : Wednesday, August 3, 2022 8:37:42 PM(UTC)
Rob

Rank: Administration

Reputation:

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

Thanks: 27 times
Was thanked: 381 time(s) in 330 post(s)
Are you able to confirm whether S+ is seeing the hotkey being pressed at all?

e.g. is you just put this as the script and see if it shows up in the S+ Console > User tab?
Code:
StrokesPlus.Console.Log("pressed");
thanks 1 user thanked Rob for this useful post.
icceeeee on 8/4/2022(UTC)
icceeeee  
#3 Posted : Thursday, August 4, 2022 9:27:04 AM(UTC)
icceeeee

Rank: Newbie

Reputation:

Groups: Approved
Joined: 9/5/2021(UTC)
Posts: 6

Thanks: 2 times
Okay just tried it, doesn't register at all. I might stick to AHK for this one, that's how I've gotten it to work so far.

Thanks for your help Rob.
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.