Running script from a button

Hi,

Did anything change?
How can I run a script from a button?

The window is different from here:

There’s no dropdown list with “Macro”. What am I missing?

What I do is copy my script in Command field with:


-_RunPythonScript(
#my script goes here
)

Result:
image

There must be a space before (
-_RunPythonScript ()

1 Like

Thanks for the reply.

Yes I did that, but instead of running the script it opens a window for me to select the script.

Is that how it should be?

Ah, never mind
I fixed it. just put the path to the script insdead of the code :smiley:

-_RunPythonScript ("C:\pathTo\PythonSciprt.py")

Space is important :slight_smile: I wonder why though.

Great.
You don’t have to put the path between quotation marks
-_RunPythonScript (C:\pathTo\PythonSciprt.py)

I think you do if you have spaces in the path :wink:

1 Like