How do you pass parameters to a command? I want to do something like (Pseudocode):
"C:\Program Files (x86)\FLAC\flac64.exe" -6 -V <openmultipleitemsoneatatime>
so I can assign it to a custom button.
When applied to a .wav audio file, this command will convert it into a .flac audio file.
I have successfully assigned it to a "openwith" "multipleinstance" user command and a kb shortcut, I would like to create a 'script' so I can assign this to a button. All my efforts have failed because the parameters don't get passed correctly -- I get an error message that says "Failed to open -6"
Thank you.
Simple Parameter passing
-
highend
- Posts: 14942
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Simple Parameter passing
Code: Select all
run """C:\Program Files (x86)\FLAC\flac64.exe"" -6 -V ""<openmultipleitemsoneatatime>"""you'll have to use a foreach loop.
One of my scripts helped you out? Please donate via Paypal
-
ramiro9
- Posts: 4
- Joined: 23 Aug 2011 20:18
Re: Simple Parameter passing
Your answer provided me with the quotes and escape marks I was missing. Thank you for your assistance!
My final button script:
openwith """C:\Program Files\FLAC\flac.exe"" <curitem> /-6 /-V", m
It processes multiple items with multiple instances.
My final button script:
openwith """C:\Program Files\FLAC\flac.exe"" <curitem> /-6 /-V", m
It processes multiple items with multiple instances.
-
highend
- Posts: 14942
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Simple Parameter passing
In general it's better to use two double quotes around variable names in openwith / run commands (to ensure that everything works ok if it contains spaces).
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club