More Functionality in runScript

So I see from this thread:


that we’ll have global script modules in 7.7, which I am all for.

Additionally, I’d be happy to see an overloaded version of runScript() that looks something like this:

runScript("pythonFunctionName", *args)

Essentially, the ability to pass arguments as either enumerated arguments or as a list to a python function. And then on the Python end, the equivalent of command line arguments:


Probably to simplify things it would be runScript("functionName", list)

and the python function

def functionName(lst): someVar = lst[1] etc...

It would then be up to the Expression implementation actually construct the function call.


To explain why I want this feature… passing in arguments with the current runScript() function can be pretty convoluted, especially if they are coming from a tag. This would make that process cleaner and more readable.

1 Like

I’d like a way to pass in a window name/path into runScript without hard coding it.

Often I want to run a function in runScript that applies to a specific window, but there’s no way to refer to the window without hardcoding it in runScript or in the function. If the window name or path changes then it doesn’t work anymore.

@nmudge I think my suggestion would get you most of the way there. My args would usually take the form of a reference to a tag that is dynamically derived.