Re: What is Macintosh equivalent of relaunch handler?

2019-03-30 Thread hh via use-livecode
To summarize some of the previous advices and to show beginners how easy it is to use applescript: -- begin commandline osascript -e 'tell application "LiveCode" activate do script "put the internet date" end tell' --end commandline (include the last char which is cr)

Re: What is Macintosh equivalent of relaunch handler?

2019-03-29 Thread Neville Smythe via use-livecode
Bill: I agree sockets is the way go for communication between apps. AppleScript is great but can be frustrating until you get the hang of it. The recipe for setting up socket communication is briefly: . write a small unix shell script which your LC app installs [one caveat: the client must

Re: What is Macintosh equivalent of relaunch handler?

2019-03-29 Thread Mark Waddingham via use-livecode
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

Re: What is Macintosh equivalent of relaunch handler?

2019-03-29 Thread Bill Vlahos via use-livecode
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

Re: What is Macintosh equivalent of relaunch handler?

2019-03-29 Thread Phil Davis via use-livecode
Or another approach might be to open the invisible app as a process in the UI app. On 3/29/19 10:50 AM, Phil Davis via use-livecode wrote: Hi Bill, It sounds like this is your scenario: You have an app with UI that is running, and you want it to occasionally send/receive info to/from another

Re: What is Macintosh equivalent of relaunch handler?

2019-03-29 Thread Phil Davis via use-livecode
Hi Bill, It sounds like this is your scenario: You have an app with UI that is running, and you want it to occasionally send/receive info to/from another invisible 'helper' app. Is that correct? If so, can you use sockets in your environment? That would be a simple way to get the interaction

Re: What is Macintosh equivalent of relaunch handler?

2019-03-29 Thread Bill Vlahos via use-livecode
Doing this on startup works perfectly but I don’t see how my app can get notification any other way while it is running. I’ve tried openCard, preOpenCard, openStack, preOpenStack, and resumeStack but no luck. Bill > On Mar 29, 2019, at 12:14 AM, Richard Gaskin via use-livecode > wrote: >

Re: What is Macintosh equivalent of relaunch handler?

2019-03-29 Thread Richard Gaskin via use-livecode
Bill, I wonder if the reopen Apple event will do what you need: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/SAppsHandleAEs.html#//apple_ref/doc/uid/20001239-BBCBCIJE -- Richard Gaskin Fourth World Systems Software

Re: What is Macintosh equivalent of relaunch handler?

2019-03-29 Thread Richard Gaskin via use-livecode
Bill Vlahos wrote: >> On Mar 28, 2019, at 2:54 PM, Richard Gaskin wrote: >> >> Bill Vlahos wrote: >> > I want my application to be able to catch parameters sent to it via >> > the command line. >> >> Ah, much simpler problem. >> >> macOS is a certified Unix. It works just like Linux. >> >> On

Re: What is Macintosh equivalent of relaunch handler?

2019-03-28 Thread Bill Vlahos via use-livecode
Richard, GetOpt looks exactly like what I want. The docs specify on startup is only sent when the application is opened. This won’t work for me as I want to catch command line parameters ongoing while my application stays open. What would the syntax be if I want to catch 3 items some of which

Re: What is Macintosh equivalent of relaunch handler?

2019-03-28 Thread Richard Gaskin via use-livecode
Bill Vlahos wrote: > I want my application to be able to catch parameters sent to it via > the command line. Ah, much simpler problem. macOS is a certified Unix. It works just like Linux. On startup, you can check $# for the number of args passed in the command line, or $1, $2, etc. to get

Re: What is Macintosh equivalent of relaunch handler?

2019-03-28 Thread Martin Koob via use-livecode
Here is probably a better link to the Apple Documentation for the LiveCode documentation. https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/SAppsHandleAEs.html#//apple_ref/doc/uid/20001239-1117769 It has a higher level

Re: What is Macintosh equivalent of relaunch handler?

2019-03-28 Thread Martin Koob via use-livecode
Sorry there was a typo in the second link. It should be: https://developer.apple.com/documentation/coreservices/appleevent It picked up a period at the end. Martin Koob Martin Koob via use-livecode wrote > I checked the LiveCode dictionary in my hot off the press PDF version to > see > if

Re: What is Macintosh equivalent of relaunch handler?

2019-03-28 Thread Martin Koob via use-livecode
I checked the LiveCode dictionary in my hot off the press PDF version to see if there was more info on what data request AppleEvent data could give. I found a reference to For more information about Apple events, see Apple Computer's technical documentation, Inside Macintosh: Interapplication

Re: What is Macintosh equivalent of relaunch handler?

2019-03-28 Thread Bill Vlahos via use-livecode
Mark, That is unfortunate. The 3rd party middleware tool I’m using to send command line parameters doesn’t support AppleEvents. It only supports sending command line parameters. Please consider adding a feature that will let me catch the command line parameters for Mac apps like relaunch does

Re: What is Macintosh equivalent of relaunch handler?

2019-03-28 Thread Mark Waddingham via use-livecode
Hi Bill, I want my application to be able to catch parameters sent to it via the command line. The relaunch handler does that for Windows applications and also doesn’t open another instance of the application. You are correct that Mac apps run in a single instance by default and that is the

Re: What is Macintosh equivalent of relaunch handler?

2019-03-28 Thread Bill Vlahos via use-livecode
Sorry if I wasn’t clear. I want my application to be able to catch parameters sent to it via the command line. The relaunch handler does that for Windows applications and also doesn’t open another instance of the application. You are correct that Mac apps run in a single instance by default

Re: What is Macintosh equivalent of relaunch handler?

2019-03-27 Thread Richard Gaskin via use-livecode
Bill Vlahos wrote: > I want to receive command line parameters in my application. > > The relaunch pCommandLineArguments works perfectly in Windows apps. > > What is the equivalent handler for MacOS X apps? There's no direct equivalent because Mac apps run in a single instance by default. If

What is Macintosh equivalent of relaunch handler?

2019-03-27 Thread Bill Vlahos via use-livecode
I want to receive command line parameters in my application. The relaunch pCommandLineArguments works perfectly in Windows apps. What is the equivalent handler for MacOS X apps? Thanks, Bill Vlahos ___ use-livecode mailing list