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

Notification

Icon
Error

Options
Go to last post Go to first unread
JPS  
#1 Posted : Tuesday, March 7, 2023 8:46:16 PM(UTC)
JPS

Rank: Member

Reputation:

Groups: Approved
Joined: 12/6/2022(UTC)
Posts: 12

Thanks: 5 times
Hello guys.

Is it possible to execute an external script on any gesture?
For now what I'm doing is executing that script on every gesture one by one, like this:
Screenshot

and this is my autohotkey v2 script (only for testing)

#SingleInstance Force
cmd := A_Args[1]
gestureName := A_Args[2]
appName := A_Args[3]

MouseGetPos(&xpos, &ypos)
msg(cmd . ' x:' . xpos . ' y:' . ypos . ' g:' . gestureName . ' app:' . appName, 4, 20, 1, 1)

if (cmd == 'media-next' and appName == 'Global' and ypos > 1000)
send('{Media_Next}')
if (cmd == 'media-prev' and ypos > 1000 and appName == 'Global')
send('{Media_Prev}')
Rob  
#2 Posted : Tuesday, March 7, 2023 9:52:46 PM(UTC)
Rob

Rank: Administration

Reputation:

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

Thanks: 28 times
Was thanked: 415 time(s) in 354 post(s)
Assuming you want to execute a script in conjuction with an existing, defined S+ action:

Global Actions > Settings > After Action > Source: Custom

If you want any defined Applications to also execute that same script, you can set that via:

(Application name) > Before/After Automation > After Action > Source: Inherit from Global Actions

...or select Custom to have a different script execute.




Or are you simply looking to execute AHK on any gesture even if it's not defined as an action in S+?
thanks 1 user thanked Rob for this useful post.
JPS on 3/8/2023(UTC)
JPS  
#3 Posted : Wednesday, March 8, 2023 12:00:13 PM(UTC)
JPS

Rank: Member

Reputation:

Groups: Approved
Joined: 12/6/2022(UTC)
Posts: 12

Thanks: 5 times
Thank you, Rob, worked like a charm!!! I'm so happy with this software, especially in combination with AutoHotkey, the best!
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.