Rank: Member
Groups: Approved
Joined: 12/6/2022(UTC) Posts: 12
Thanks: 5 times
|
Hey guys, Right now my script is executed on every action, that is great! Thanks Rob for That. What I would love it to execute an external script when a gesture is fired, even if there is no global or app action for it, can it be done?
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 430 time(s) in 363 post(s)
|
Download this: https://www.strokesplus.net/files/plugins/ExecuteOnGestureMatch.zipExtract it, then from the Plug-Ins section of S+, click Add Plug-In and browse to the DLL. Then in Global Actions > Load/Unload > Load script, put this script: Code:// Put in Global Actions > Load/Unload > Load script
function executeOnGesture() {
// Put your script here
// vv Remove this, just for demo
StrokesPlus.Console.Log(`Button:
${ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.Button.ToString()}
- Gesture: ${ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.GestureName}`,
"ExecuteOnGestureMatchWatcher");
// ^^ Remove this, just for demo
}
ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.ExecuteScript = "executeOnGesture();";
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Member
Groups: Approved
Joined: 12/6/2022(UTC) Posts: 12
Thanks: 5 times
|
Man, this is AWESOME, you are the best, THANK YOU so much for your support, it is Superb!!!! I'll test it and then I'll send you the results
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 430 time(s) in 363 post(s)
|
You're welcome!
I should note that it only executes when you draw a gesture with the primary or secondary stroke button is used.
|
|
|
|
Rank: Member
Groups: Approved
Joined: 12/6/2022(UTC) Posts: 12
Thanks: 5 times
|
Rob, I did all the steps, and the plugin is loading, I restarted the app, and all is good, but when the gestures are fired there's no message in the console, I left your code untouched just for testing. I tried with a lot of gestures BTW Maybe something is missing on my end? And a quick one, this code fires when a gesture is used independently if it has an action associated.? because if it IS associated with an action, it's already working with your previous instructions. Originally Posted by: Rob Download this: https://www.strokesplus.net/files/plugins/ExecuteOnGestureMatch.zipExtract it, then from the Plug-Ins section of S+, click Add Plug-In and browse to the DLL. Then in Global Actions > Load/Unload > Load script, put this script: Code:// Put in Global Actions > Load/Unload > Load script
function executeOnGesture() {
// Put your script here
// vv Remove this, just for demo
StrokesPlus.Console.Log(`Button:
${ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.Button.ToString()}
- Gesture: ${ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.GestureName}`,
"ExecuteOnGestureMatchWatcher");
// ^^ Remove this, just for demo
}
ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.ExecuteScript = "executeOnGesture();";
Edited by user Monday, March 13, 2023 7:35:15 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,382 Location: Tampa, FL Thanks: 28 times Was thanked: 430 time(s) in 363 post(s)
|
Every. Single. Time. I forget to tell folks to go to Options > Advanced and check the box for Enable Mouse Hook Event Subscription. Quote:And a quick one, this code fires when a gesture is used independently if it has an action associated.? Yes, it doesn't care about anything happening in the core S+ logic - just that a stroke button was pressed, a known gesture was drawn, and the stroke button was released.
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Member
Groups: Approved
Joined: 12/6/2022(UTC) Posts: 12
Thanks: 5 times
|
So great Rob, thank you again, all is working!!!! Thanks Thanks Thanks ... ... ... See you soon Rob, great job with this software, so needed, irreplaceable, this and autohotkey are the best!!! Originally Posted by: Rob Every. Single. Time. I forget to tell folks to go to Options > Advanced and check the box for Enable Mouse Hook Event Subscription. Quote:And a quick one, this code fires when a gesture is used independently if it has an action associated.? Yes, it doesn't care about anything happening in the core S+ logic - just that a stroke button was pressed, a known gesture was drawn, and the stroke button was released.
|
|
|
|
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