Thanks!
I think like you, Python is easy but powerful!!! At first glance, i thinked “No semicolons? No brackets? Indents do all the job??? Kidding me??” But I try it, try a bit more, try one more time and… “S..t, that works really fine!!”. I hope Adobe keep in mind your (our) request.
I’ll take a look to Textpad (very spartan!) and Sublime Text (edit all appearances of a variable name at once its a feature that I’m looking for in all editors I try). I have used Text Wrangler very few times at home (trying to find some data in hex files, years ago). Now I’m using Notepad++ and Geany (it runs Python natively too in a system console) at work, plus PyCharm Community Edition 2018 (very powerful, but a bit tricky to make python run -for me-) at home.
Back to my undo problem: only one function do the big stuff, and it’s called in a way like that:
if (case 1)
call_funct(list_of_parameters_1)
else if (case 2)
call_funct(list_of_parameters_2)
else
call_funct(list_of_parameters_3)
end if
I’m thinking about something like that:
if (case 1)
app.doScript(call_funct(list_of_parameters_1), ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, “My Undo”);
else if (case 2)
app.doScript(call_funct(list_of_parameters_2), ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, “My Undo”);
and so on, but I dont know if I can put params there, and I havent time today to try it. It’s possible to use app.doScript in this way?