Can LC application receive a shell command with parameters?
Mike Bonner
bonnmike at gmail.com
Fri Sep 12 14:49:47 EDT 2014
Another option is to have a text file that is periodically checked by your
running app. Poke a command string into the file, when next your app
checks the file, it grabs the string and does whatever you need, while
clearing out the file. Might want to use a file lock system also so that
if 1 app is actively reading or writing to the file, they wait their turn.
Another thing I've seen done would be to have a folder with multiple files
(perhaps named by seconds?) so that every so often, you check the folder
for files, sort the file list by time (if that matters) and process them.
Still might need a file lock by the app that sends the command so that the
receiving app knows to wait for the file to be completed, but this might
work well for a batch processing type of system. (depends on what you're
doing of course.)
On Fri, Sep 12, 2014 at 9:17 AM, Andre Garzia <andre at andregarzia.com> wrote:
> Bill,
>
> This is a shot in the dark but if you're doing that on Mac OS X then I
> think you may be able to use AppleEvents. I don't know if they are still
> supported.
>
> Cheers
> andre
>
> On Thu, Sep 11, 2014 at 2: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
> >
>
>
>
> --
> http://www.andregarzia.com -- All We Do Is Code.
> http://fon.nu -- minimalist url shortening service.
> _______________________________________________
> 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