Page 1 of 1

StackOnly: How to start as standalone without card

Posted: Fri May 15, 2020 4:42 pm
by ace16vitamine
Dear all,

I have developed a StackOnly script to run some DB selects etc. in the background from the OS as "Service".

But... If I create a standalone application only from this stack it is not working, seems that the "on openstack" Handler is not starting. But why? I can see the process in the Windows Process List. My idea is to create a application without Card that only the process is running in background if I start the application. I have this problem only if I create the standalone application, in livecode the handler is starting etc.

Stef

Re: StackOnly: How to start as standalone without card

Posted: Fri May 15, 2020 5:30 pm
by FourthWorld
What is a stack without a card?

Re: StackOnly: How to start as standalone without card

Posted: Fri May 15, 2020 5:49 pm
by ace16vitamine
Its a script. But how can I start the script? in the openstack handler I have timer to run some actions every x minutes.

Or can I hide a complete card that it is not shown in the taskbar?

Re: StackOnly: How to start as standalone without card

Posted: Fri May 15, 2020 6:33 pm
by FourthWorld
ace16vitamine wrote:
Fri May 15, 2020 5:49 pm
Its a script.
If you're referring to a script-only stack, it may greatly simplify things to appreciate that there is only one difference between that and a normal stack: the storage format.

Once loaded, a stack is a stack. And every stack has at least one card.
But how can I start the script? in the openstack handler I have timer to run some actions every x minutes.
Given that the only difference between a script-only stack and a normal stack is the storage format, and that openStack is indeed expected to be triggered when a stack opens, I don't have a quick answer. But I would like to find one. Do you have a simple example you can share where we can examine what's happening?
Or can I hide a complete card that it is not shown in the taskbar?
By default LC apps have a GUI, and GUI apps normally appear in the task bar. However, you can run an application made in LiveCode facelessly if you launch it from the command line with a -ui flag, e.g.:

Code: Select all

./myapp -ui
The -ui flag tells the engine to bypass GUI init, so it can run with no visible user interface.

Re: StackOnly: How to start as standalone without card

Posted: Sat May 16, 2020 2:33 am
by mwieder
If you load a .livecodescript file as an argument from the command line the openStack handler does indeed get called.

Code: Select all

~/<pathTo>LiveCode<version> xyzzy.livecodescript

Re: StackOnly: How to start as standalone without card

Posted: Sat May 16, 2020 6:39 pm
by jacque
Alternately, save the script as a normal stack and make the stack invisible. Or position the stack offscreen with its bottomRight at - 100,-100.

Re: StackOnly: How to start as standalone without card

Posted: Mon Jun 08, 2020 8:31 pm
by ace16vitamine
Thanks all. The -ui Option is enough for us.

Regs
Stef