On 2019-03-29 19:57, Bill Vlahos via use-livecode wrote:
The existing application can do 2 things.
It can send command line parameters
It can send a formatted URL
I can either catch the command line parameters - which is what I’ve
been asking for or write the application to be a server responding to
a URL sent to localhost.
The latter seems overly complicated and could introduce latency which
I don’t want.
What you want requires some sort of IPC (inter process communication)
and local sockets are highly efficient on UNIX based OSes (being part of
the kernel) so I wouldn't worry about latency (not unless you manage to
find it being an issue!).
You can do what you want with AppleScript (see the 'osascript' command
line tool - or have your app's on startup handler check for arguments
which mean send to main app, use do as applescript then exit) - and have
your app respond to apple events with an 'on appleEvent' handler.
(AppleEvents probably use sockets underneath...)
Or, indeed, you could try using the httpd library which is one of the
script libraries introduced in 9.0 (IIRC). See httpdStart in the
dictionary - its *really* easy to use :)
Warmest Regards,
Mark.
--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode