Distinguishing CLI from GUI

Warren Samples warren at warrensweb.us
Mon Jun 13 17:27:50 CDT 2011


On Monday, June 13, 2011 12:54:04 PM Richard Gaskin wrote:
> Warren Samples wrote:
> > It seems to be working here although certain letters seem not to be
> > usable. For example -s does not work. I can get an answer dialog to
> > return "-h" when used as a cl flag and the app will do something if
> > there is a variable $x which equals -h.
> > 
> > as a silly example, this script does exactly what it looks like it
> > should:
> > 
> > on openstack
> > 
> >     answer $0 && $1 && $2 && $3 && $4 && $5
> >     if $1 is "-h" then answer "hooboy, it works"
> > 
> > end openstack
> > 
> > using this command: '/myApp -h a-param -o some-param' answers "/myApp -h
> > a-param -o some-param" and then answers "hooboy, it works".
> > 
> > openSUSE 11.4 with Bash.
> 
> Curious.
> 
> Are you able to get those args when running faceless?
> 
> I haven't, but at least the windowID trick seems to be a reasonable for
> around for the moment.
> 
> --
>   Richard Gaskin
> 

This simple script:

on openStack
  put $0 && $1 && $2 && $3 into url "file:/home/warren/Documents/launchtestLOG.txt"
    if $3 is "-h" then get shell("opera")
end openStack

seems to work as expected with and without -ui. Using this command: ''launchTest -ui -Q some-param -h" 
launches Opera and creates the file with this line: "launchTest -Q some-param -h".


Warren




More information about the use-livecode mailing list