Script OneLayerOff

To use a python script (*.py) as a toolbar button:
Open button editor and type the following:

! _-RunPythonScript (

<paste the entire script here>

)

Then OK to exit the button editor.

To use a Python script via an alias:

Procedure 1 -
Save the script somewhere known.
In Options>Aliases, create a new alias with the following:

! _-RunPythonScript "<full path to your script including extension>"

Path example: "C:\Users\<username>\Documents\Myscripts\TestScript.py"

-or-

Procedure 2
Create a folder somewhere for all your Python scripts.
Open the Python script editor with the _EditPythonScript command
In Tools>Options>Files tab, set a path to the folder you just created, then OK. You can close the editor.
(you only need to do the above once)

Now in Options>Aliases, you can create your aliases without the full path, just the name will work:

! _-RunPythonScript "TestScript"

HTH, --Mitch