Launching a subprocess under OSX?
paul at researchware.com
Thu Dec 29 22:09:25 CET 2016
On 12/29/2016 3:23 PM, Phil Davis wrote:
> Hi Paul,
> In the Mac world, I find that if my app starts a true command-line
> tool (like SOX or FFMPEG or mediainfo) with 'open process' or
> 'shell()', all is well - no indication of its execution is visible to
> the user of my app. Of course those tools are designed to be
> command-line only - no bundle, no built-in UI.
> If, on the other hand, my app launches a document with Word, I do see
> Word active in the Dock. And Word is a regular app bundle, unlike the
> command-line tools I mentioned.
> Don't know if there is a definite relationship between the helper
> app's internal structure and its visibility in the Dock when running,
> but I thought I would at least share my experience.
> Maybe there's a setting you can fiddle with in the helper app's plist
> that would make it run invisible? (Sounds like a potential can of
> worms but it might work)
The helper app in question is another LiveCode standalone. I am
performing some complex text manipulations from a tool built under
LC4.6.4 and a version of the tool built under LC6.7.11. Due to the
changes to the field object introduced in LC5.5, it is necessary to load
certain text into a helper app built under LC464 to obtain the original
position (start and end character positions from selectedChunk() and do
some processing on them to adjust them to be positionally accurate in
the same files opened into a field under LC6711.
This all works fine under Windows 7 to 10. It works under OSX as well,
but having the App pop to the front is visually not good from an UI
perspective. You response has given me an idea. I suspect I need to
launch the helperapp with the -ui switch to have it run as a command
line tool under OSX. I'll give that a try.
More information about the use-livecode