Just start by saying I'm not a scripting expert but trying to keep expanding my knowledge. I'm using python to manipulate some pdfs, excel, csv etc via execute command.
I've only used the %1 and %2 system variables for the input and output but I'd like to pass some Switch privatedata keys to the script but I'm not sure how like I do with javascript. Anyone able to help?
Passing switch variable in script
Passing switch variable in script
Color Science & Workflow Automation
- magnussandstrom
- Advanced member
- Posts: 365
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: Passing switch variable in script
That sounds like it would work, but really after to to actually write it. I'm going to for sure try this out! Thanks as always.magnussandstrom wrote: ↑Thu Mar 14, 2024 5:10 pm Maybe this is what you looking for?
https://www.enfocus.com/en/appstore/pro ... and-friend
Color Science & Workflow Automation
Re: Passing switch variable in script
I just figured it out and not sure why I spaced it, so posting for anyone else that is self-teaching.
variables are just passed in the command line in the execute command.
example: "path to your script" %1 %2 [PrivateData:Key="yourvalue"]
and then in the script they are done as:
argv[0] is reserved and shouldn't be used.
file_path = argv[1]
output_path = argv[2]
your variable in the script' = argv[3] since I'm on MacOS I Use sys.argv[]
and so on...
variables are just passed in the command line in the execute command.
example: "path to your script" %1 %2 [PrivateData:Key="yourvalue"]
and then in the script they are done as:
argv[0] is reserved and shouldn't be used.
file_path = argv[1]
output_path = argv[2]
your variable in the script' = argv[3] since I'm on MacOS I Use sys.argv[]
and so on...
Color Science & Workflow Automation