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 : Wednesday, June 21, 2023 4:46:24 PM(UTC)
JPS

Rank: Member

Reputation:

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

Thanks: 5 times
Hello guys, I'm executing this script on

> ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.ExecuteScript

This is the script:

Code:

function executeOnGesture() {
    var columns = 3;
	var rows = 3;
        try{
            var columns = 3;
            var rows = 3;
            var regionCol = 1
            var regionRow = 1
            var region = sp.GetRegionFromPoint(sp.ForegroundWindow().Rectangle, sp.GetCurrentMousePoint(), columns, rows);
            if(!(region == null)) {
                regionCol = region.Column
                regionRow = region.Row
            }
            sp.Run('c:\\prg\\scripts\\bin\\sp.ahk ' + ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.GestureName + " " + ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.Button.ToString() + " " + regionCol + " " + regionRow)
      } catch(e) {
            sp.MessageBox( e, "Error")
        }
        //sp.Run('c:\\prg\\scripts\\bin\\sp.ahk ' + "none" + " " + ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.GestureName + " " + "global"  + " " + ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.Button.ToString() + " " + region.Row + " " + region.Column)
  
}
ExecuteOnGestureMatch.ExecuteOnGestureMatchWatcher.ExecuteScript = "executeOnGesture();";


Can you tell me if it's posible to send more data to my script, for example: the modifier(alt/ctrl/windows key), The command that has been executed, if any, etc.
And I'm having this issue where region.Column is "Right"

Thank you!
Rob  
#2 Posted : Wednesday, July 12, 2023 1:59:53 PM(UTC)
Rob

Rank: Administration

Reputation:

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

Thanks: 28 times
Was thanked: 419 time(s) in 356 post(s)
You could do it via some of the other built-in script calls, but they wouldn't be nearly as efficient.

Ideally, you would update the plug-in's code to look capture those extra things:

https://forum.strokesplus.net/posts/t8589-Always-execute-external-script
thanks 1 user thanked Rob for this useful post.
JPS on 7/17/2023(UTC)
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.