Rank: Newbie
Groups: Approved
Joined: 6/19/2022(UTC) Posts: 1 Thanks: 5 times
|
Is there a way to simply toggle enable/disable Strokesplus.net via a hotkey?
CTRL+SHIFT+WIN+Z was working with Strokesplus.com according to their website, but I cannot find the option for Strokesplus.net.
Clicking the tray icon works fine of course, but I'd really love a global hotkey, since my taskbar and hence the tray icon is not always visible due to my workflow.
Many thanks for this indispensable program, Rob :)
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 431 time(s) in 364 post(s)
|
You can make a Hot Key in S+ and set to whatever key combination you want, then use the script below (don't check Unregistered): Code:if(StrokesPlus.Configuration.Settings.CaptureEnabled) {
StrokesPlus.Program.Disable();
} else {
StrokesPlus.Program.Enable();
}
However, make sure you go to Options > Advanced and check the box: Keeps Registered Hot Keys Active When Disabled
|
2 users thanked Rob for this useful post.
|
|
|
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
Thanks RobI have used this script to toggle S+ until now. Code:if(StrokesPlus.StoredValues.Booleans.Get("ProgramDisableFlag")) {
StrokesPlus.StoredValues.Booleans.Set("ProgramDisableFlag", false);
sp.CreateTimer('sPlusEnableTimer', 100, -1, String.raw`sp.Enable();sp.DeleteTimer('sPlusEnableTimer');`);
}else{
StrokesPlus.StoredValues.Booleans.Set("ProgramDisableFlag", true);
sp.Disable();
}
It works fine. But I wanted to try the new way because it is neat. It is giving me the following error when S+ is toggled ON. Quote:Unable to register hot key Failed to register hotkey StrokePlus Gesture Hook Toggle Hotkey is likely already registered by another process unregistered is check OFF, and keep registered hot keys activewhen disabled is ON.
|
1 user thanked randomConstant for this useful post.
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 431 time(s) in 364 post(s)
|
Try adding sp.Sleep(500); to the end of the script above. When a hot key is pressed, S+ disables the hot key internally (for a few reasons) and re-enables the hot key after the script completes execution. The problem here is likely a race condition where sp.Enable() is going through and enabling any active hot keys which are not registered, while the hot key workflow is following up with its own logic that re-enables the hot key. If that does resolve it for you, that will confirm my suspicion and I'll see about getting the logic updated. Edit: Actually that may not make a difference, thinking about it again. I'll look around and see what I can find. Edited by user Thursday, June 23, 2022 1:53:52 PM(UTC)
| Reason: Not specified
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 431 time(s) in 364 post(s)
|
Try version 0.5.6.9 and see if you still get the error popup.
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Advanced Member
Groups: Translators, Approved Joined: 7/17/2021(UTC) Posts: 135
Thanks: 35 times Was thanked: 18 time(s) in 15 post(s)
|
Adding delays did not resolve the issue. Newer version (0.5.6.9) resolved the issue.Thanks Rob
|
2 users thanked randomConstant for this useful post.
|
|
|
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.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close