Can we send the command-line params from a second program launch to the running process? Mac has a single-process lock so no risk of multiple instances running. But how can we get the params of the subsequent launch attempts?
I am also still trying to figure out how to do file associations.
Any help is hugely appreciated.
Passing Command-Line Params to Running Instance [RESOLVED]
Passing Command-Line Params to Running Instance [RESOLVED]
Last edited by coder14 on Sun Dec 18, 2016 11:07 am, edited 1 time in total.
Re: Passing Command-Line Params to Running Instance
Found out that the file associations are stored in the app's plist file. Tried editing the bundle icon and "LSIsAppleDefaultForType" manually and it works. Any way to do this through PureBasic code?
Still need help for getting the command line params from subsequent launches of the app.
Still need help for getting the command line params from subsequent launches of the app.
Re: Passing Command-Line Params to Running Instance
OK! After the app is compiled the plist file can be be opened and edited from inside the bundle. File associations DONE! (Hope I'm not missing any important steps??)
Now still struggling with the command line params from subsequent launches. HELP!
Now still struggling with the command line params from subsequent launches. HELP!
Re: Passing Command-Line Params to Running Instance
A solution for the benefit of other readers:coder14 wrote:Still need help for getting the command line params from subsequent launches of the app.
http://www.purebasic.fr/english/viewtop ... 49#p497749
Thank you Fred.