# RunScript vs RunPythonScript inside commands problem

**URL:** <https://discourse.mcneel.com/t/runscript-vs-runpythonscript-inside-commands-problem/93871>\
**Category:** Rhino Developer\
**Created:** [December 19, 2019, 4:18am UTC](https://discourse.mcneel.com/t/runscript-vs-runpythonscript-inside-commands-problem/93871 "2019-12-19T04:18:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Jarek](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jarek/32/511212_2.png) [@Jarek](https://discourse.mcneel.com/u/Jarek)\
**Post date:** [December 19, 2019, 6:18pm UTC](https://discourse.mcneel.com/t/runscript-vs-runpythonscript-inside-commands-problem/93871/4 "2019-12-19T18:18:46Z")

</div>

I could not find this documented in Help file, but at least on Windows version, this works (per @Helvetosaur detailed post). But NOT if inside a running command ☹

_To run a python script (_.py) from a toolbar button:\*  
Right-click in a blank space in any toolbar and choose “New Button”.  
In the button editor that opens, in the "Command area, type the following:

```auto
! _-RunPythonScript (

<paste the entire script here>

)

```

Then OK to exit the button editor. When you click the button, the script should run. Make sure to save your workspace file.

> [@Running Python scripts from aliases or toolbar buttons](https://discourse.mcneel.com/t/running-python-scripts-from-aliases-or-toolbar-buttons/47290):
>
> First, [here is some basic info from the Rhino developer docs.](http://developer.rhino3d.com/guides/rhinopython/python-running-scripts/) Following are some more detailed instructions. They are platform-specific. For Windows Rhino users: To run a python script (\*.py) from a toolbar button: Right-click in a blank space in any toolbar and choose “New Button”. In the button editor that opens, in the "Command area, type the following: ! \_-RunPythonScript ( \<paste the entire script here\> ) Then OK to exit the button editor. When you click the button, the script sh…

---

_[View the full topic](https://discourse.mcneel.com/t/runscript-vs-runpythonscript-inside-commands-problem/93871)._
