More > JRiver Media Center 32 for Mac

Links: Opening External Program

<< < (3/7) > >>

zybex:
You may need --args:
https://ss64.com/mac/open.html

Test the open command first on a terminal window to see what works there.

If MC can run the //usr//bin//open, shoudn't it be able to run //bin//bash directly too as it's just another executable? Sorry for dumb questions, I'm not a Mac guy.

Edit: From google on how to run a script (don't forget to escape //slashes):
open -a Terminal ~/test.sh --args -arg1 -arg2 --whatever 123
or
open -a /Applications/Utilities/Terminal.app ~/test.sh --args -arg1 -arg2 --whatever 123

MrBiff:
From a shell command, this works:


--- Code: ---open -a textedit
--- End code ---

From MC's Links,  this does nothing:


--- Code: ---Program Paths: //usr//bin//open
Parameters: -a textedit

--- End code ---

From the command line, this works and opens test.txt


--- Code: ---open /System/Applications/TextEdit.app /tmp/test.txt
--- End code ---

From MC's Links, this opens TextEdit:


--- Code: ---Program Paths: //usr//bin//open
Parameters: //System//Applications//TextEdit.app

--- End code ---

But this does nothing:


--- Code: ---Program Paths: //usr//bin//open
Parameters: //System//Applications//TextEdit.app //tmp//test.txt

--- End code ---

zybex:
Right, looks like a bug in argument splitting, or on how they're given to the target process.

bob:
I just implemented this.
It was kind of a pain in the $$ but it's done the right way.
It will be in the next build.

zybex:
Thanks Bob :)
Does it handle quoted args?
arg1 "arg2 with spaces" arg3 ...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version