Shell argv

Mike Bonner bonnmike at gmail.com
Mon May 8 14:45:05 EDT 2017


Seems to me, if its the compiled version, you shouldn't need to use "open"
at all.

a simple
get shell("path/to/executable argument1 argument2")
If I understand what I read about "open" enough, it expects a file, that
will be opened in another app, like in Marks example.  (whatever.c opens
xcode)

If you want to experiment with open, you could try the following..

open -a /path/to/your/app /path/to/a/dummy/file/to/open --args arg1 arg2

I'm guessing that if you can format this right, it'll report the name of
the dummy file, and arg1 and arg2 as you expect.

But since you just want to pass arguments to your compiled program, I am
pretty sure you just need to use shell() and call it directly with the
arguments as part of the call.


On Mon, May 8, 2017 at 12:05 PM, JB via use-livecode <
use-livecode at lists.runrev.com> wrote:

> That is a typo.
>
> In fact I tried every way and every
> place within the open script and if
> it is written different the code is not
> executed and I get and error.
>
> JB
>
>
> > On May 8, 2017, at 10:57 AM, Mark Wieder via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> >
> > On 05/08/2017 10:36 AM, JB via use-livecode wrote:
> >
> >> The file executes properly and the message is printed
> >> showing I did not enter any arguments even though I
> >> did try to and then it prints the file name and path like
> >> I told it to from argv[0].
> >>
> >> JB
> >
> > In your original post you said "-args". The correct syntax is "--args"
> (with two dashes rather than one), so if that's not a typo in your original
> email, try correcting that and see what happens.
> >
> > --
> > Mark Wieder
> > ahsoftware at gmail.com
> >
> > _______________________________________________
> > 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