Page 1 of 1
Running an app without human intervention (no buttons)
Posted: Wed Jun 08, 2016 2:14 pm
by horacapp
Hi
How can i run an app without human intervention (no buttons)?
After compilation, when I double click the app, the app start, run and finish without pressing any button.
Thank you
Re: Running an app without human intervention (no buttons)
Posted: Wed Jun 08, 2016 3:01 pm
by dunbarx
Hi.
Make a new stack. Save it. In the card script:
Code: Select all
on opencard
repeat with y = 1 to 10
revSpeak y
wait 60
end repeat
end opencard
Now close the stack and reopen it.
Craig Newman
Re: Running an app without human intervention (no buttons)
Posted: Thu Jun 09, 2016 2:07 pm
by Mikey
Also, you can set the loc of the stack to be somewhere off-screen. There are some other tricks, as well, but start with these two.
Re: Running an app without human intervention (no buttons)
Posted: Thu Jun 09, 2016 2:14 pm
by dunbarx
Mike.
I see what you are getting at, but I think the OP wanted an automatically initialized and running stack that required no user action, not a stack that simply was never seen.
But we might need to hear back to really know...
Craig
Re: Running an app without human intervention (no buttons)
Posted: Thu Jun 09, 2016 2:19 pm
by Mikey
Yes, I get that. I was just trying to answer the next question, before it might be asked. The one after that, I expect, would be how to have the app run completely facelessly, but I figured I would leave that for someone else to jump for. Besides, I didn't want to start the debate over why you didn't suggest on startup or on openStack or on preopenstack etc., or worse, why you used on instead of command.
(ducks)
Re: Running an app without human intervention (no buttons)
Posted: Thu Jun 09, 2016 2:31 pm
by dunbarx
Fires low to catch ducking LC'er.
I am old-fashioned, and use "on" everywhere. Just a habit. I suppose for readability and communal commonality I ought to change.
But know that system messages (like the three you mentioned) all generally should use "on", and only custom ones use "command". I did suggest "openCard", after all.
The ones you mentioned would work as well, and if you wanted to both hide and set the loc offscreen, "preOpenStack" would have been better. But remember, I was not hiding anything.
Craig
Re: Running an app without human intervention (no buttons)
Posted: Thu Jun 09, 2016 4:48 pm
by FourthWorld
FWIW LC apps can be launched from the command line by adding a -ui flag.
Re: Running an app without human intervention (no buttons)
Posted: Thu Jun 09, 2016 6:10 pm
by richmond62
Why does "Running an app without human intervention" make me
start thinking about computer viruses?
Re: Running an app without human intervention (no buttons)
Posted: Thu Jun 09, 2016 6:39 pm
by Mikey
no idea, but I have several daemons that I run on various machines that are written in LC, and given that on at least two of those machines, I have to fight with Norton with each new version, I would say that the malware checkers are on to us...