Can LC application receive a shell command with parameters?

Michael Doub mikedoub at gmail.com
Thu Sep 11 11:27:42 EDT 2014


Bill, 

I think that you are going to have to use sockets to communicate between processes.   I would suggest the following:

1)  Allow your main app to accept an incoming socket requests.
2) write a small command line app that accepts the input from the command line, then sends that data to your main app via a socket.
3)  Who ever is using the shell, calls the cmd line app in 1) with your data.

Check out:
 http://lessons.runrev.com/m/4071/l/12924-how-to-communicate-with-other-applications-using-sockets
 http://revolution.byu.edu/internet/IntroToSockets.php

Hope this helps.

  Mike



On Sep 11, 2014, at 1:23 AM, Bill Vlahos <bvlahos at mac.com> wrote:

> Mike,
> 
> I’m not sure. I want to have a running application and then periodically a different application on the computer might send my app a text string.
> 
> Scenario
> A different application sends the command pathtomyapp 555-555-5555.
> 
> My application would have some way of receiving the command and then call a handler in my app to do a search..
> 
> I don’t see what my handler would look like in my app.
> 
> Thanks,
> Bill Vlahos
> 
> On Sep 10, 2014, at 10:57 AM, Michael Doub <mikedoub at gmail.com> wrote:
> 
>> Look up $ in the dictionary.   You can get access to all of the environment variables for command line apps.   Is that what you are looking for?
>> 
>> -= Mike
>> 
>> 
>> On Sep 10, 2014, at 1:24 PM, Bill Vlahos <bvlahos at mac.com> wrote:
>> 
>>> I want to have a different program pass a parameter (in this case a callerID phone number) to my LC application via a shell command to do a search in and bring up a person’s record.
>>> 
>>> How can I receive it and handle it?
>>> 
>>> Thanks,
>>> Bill Vlahos
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list