StackOnly: How to start as standalone without card

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
ace16vitamine
Posts: 65
Joined: Fri Apr 13, 2018 1:53 pm

StackOnly: How to start as standalone without card

Post by ace16vitamine » Fri May 15, 2020 4:42 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7668
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: StackOnly: How to start as standalone without card

Post by FourthWorld » Fri May 15, 2020 5:30 pm

What is a stack without a card?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

ace16vitamine
Posts: 65
Joined: Fri Apr 13, 2018 1:53 pm

Re: StackOnly: How to start as standalone without card

Post by ace16vitamine » Fri May 15, 2020 5:49 pm

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?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7668
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: StackOnly: How to start as standalone without card

Post by FourthWorld » Fri May 15, 2020 6:33 pm

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.
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2993
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: StackOnly: How to start as standalone without card

Post by mwieder » Sat May 16, 2020 2:33 am

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5356
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: StackOnly: How to start as standalone without card

Post by jacque » Sat May 16, 2020 6:39 pm

Alternately, save the script as a normal stack and make the stack invisible. Or position the stack offscreen with its bottomRight at - 100,-100.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”