Hello,
I am trying to setup a button script to pass the path of the currently selected file to a python script for it to be processed.
Python script is at: C:\Users\user_name\PythonScripts\RightClick\RunCompsClean.py
I'm using the sys.argv[1] to get the path on the script side.
my script works when I run it from the cmd prompt.
itempath (currently selected file) = C:\Users\user_name\comps.csv
I've tried using:
run ' "C:\Users\user_name\PythonScripts\RightClick\RunCompsClean.py" "<curitem>" ';
I know this syntax is wrong. What is the correct syntax? Thanks in advance
Button to run python script with file selected
-
- Site Admin
- Posts: 60357
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Button to run python script with file selected
Try this:
Code: Select all
run quote("C:\Users\user_name\PythonScripts\RightClick\RunCompsClean.py") . ' ' . quote("<curitem>");
FAQ | XY News RSS | XY Twitter