Can i prevent a script to be shown in history when ran from a button?

Hi guys, when I put a pyton script in a button with !_-RunPythonScript ( ) the entire script ends up in the “history” and is printed to the prompt, can I prevent that?

Hmm. Save the script to a .py file ?

Or put NoEcho in the first line of your script - see the help here

Yeah, in some cases that could work as a workaround.
I could also compile it to a plugin, but I want to have them embedded in a button so it is easy to just drop the toolbar into Rhino and everything works.

Hello, did you see my other reply whilst your were replying ?

1 Like

Thanks, that works, I put it before “RunRhinoScript” and then of course “NoEcho” is printed :slight_smile:
But I can live with that!

1 Like