Welcome Guest

Pages: 1
Run External Script does not accept additional parameters
elpitoPostMay 10, 2015, 05:02
Newbie
Posts: 1
Registered:
May 10, 2015, 08:46
Normal topicRun External Script does not accept additional parameters

I have a problem adding additional parameters in Run External Script. Probably I misunderstand the help description, but in the custom parameters the second, or more variable parameter is not working.

My example:
Run External Script scriptname.sh(custom) --> Variable 9 Stop on error
The first parameter is file
The second is a variable (variable 0)
I have defined the variable 0, but the parameter is not given to script

I listed all parameter in a log file of the shell script ($1, $2), but the second parameter was always empty.

Is this a bug? Or, do I misunderstand the usage?

Thanks

2MR2PostMay 10, 2015, 07:06
Avatar photo
Administrator
Posts: 2084
Registered:
August 23, 2012, 19:27
Normal topicRe: Run External Script does not accept additional parameters

I ran this script:

#!/bin/sh
echo $1 $2 $3 $4 $5 $6 $7 $8 $9

with this action:

Set Variable 0 to "V0"
Set Variable 1 to "V1"
Set Variable 2 to "V2"
Set Variable 3 to "V3"
Set Variable 4 to "V4"
Set Variable 5 to "V5"
Set Variable 6 to "V6"
Run External Script /Users/barry/Downloads/testscript.sh(custom) --> Variable 9
Dump snapshot variables.

A snapshot of the Run External settings is attached.

I run it against a single file and copy the results from the Dump statement. Here's what I get:

v0: V0
v1: V1
v2: V2
v3: V3
v4: V4
v5: V5
v6: V6
v7:
v8:
v9: /Users/barry/temp/Test·File.mp3·V0·V1·V2·V3·V4·V5·V6·/Users/barry/temp

Remember that unless you are executing the action in grouped mode, the external script will be run once for each selected file. If you specify the Once option it will only be run once but the result is only saved to the first selected file.

Image

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.021 seconds.