Ah, yes, I happened to run across that piece of code
There is nothing wrong with that one line, is there?
Are you passing in variables?
Arguments for the main function? Yep -- one, in an array. It seemed the correct way to do it ... ¿Non?
(Ah -- I'm gonna have to sign off now, as it's well past the midnite hour. I'll sleep on it.)
OK, Jongware, you know this...what's the smallest possible script you can create that still demonstrates the problem. Share!
Me, share? Never!
Oh okay then.
Check Harbs' reference to FiddleScript -- one of the options it has is to put a lightweight wrapper around the script you're fiddling with that enables "Undo" for your very own thing. The screenshot shows the code for that wrapper.
This works through "doScript" -- the first argument is the main function you want to call, and the last one is the name of the function as it should appear in the Undo menu. The rest is, well, "required stuff". As I found out, you are not supposed to Mess With The Required Stuff.
It's the next morning and I am a bit groggy from the DST change (-1h since last weekend).
But -- I am happy to say that the error does occur on Windows as well. "Happy", oh yeah, because -- well, what didya mean with "passing arguments"? As in, Fiddlescript does not do that and it works, and I do that and it does not work? ... So I took out the argument and now it seems to work.
Yup. That's what I meant.
I don't know why, but passing and returning arguments with doScript gets me nervous...