Hello, @diz-hydron and All,
Well, @diz-hydron, I suppose you could begin with this very simple script, named diz.py
def player_1(m):
return str(int(m.group(1)) + X1) + ', ' + str(int(m.group(2)) + Y1)
def player_2(m):
return str(int(m.group(1)) + X2) + ', ' + str(int(m.group(2)) + Y2)
editor.rereplace('"player1": \\[\K(-?[0-9]+), (-?[0-9]+)', player_1);
editor.rereplace('"player2": \\[\K(-?[0-9]+), (-?[0-9]+)', player_2);
Before running the script, of course, change the X1, Y1, X2 and Y2 values for true positive or negative integers ( e.g. +7 or -3 )
It should work nicely with your text posted here
In a next step, it would be better to enter the different values with, for instance, the notepad.prompt python command and assign the 4 typed numbers to the X1, X1, X2 and Y2 variables…
Best Regards,
guy038