hi all !
i want to write a small set of utilities that should run in the background without a gui like
classic console applications in windows.
is there a possibility to do that with livecode.
thank you in advance,
harald
run application in background without a gui
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 16
- Joined: Mon May 09, 2011 3:01 pm
Re: run application in background without a gui
I think you can do that using the "-ui" command line parameter. Another approach is to hide the ui stack immediately when the app starts. On windows an app without windows does not show up in the start bar, but I am not sure if it's possible to hide the app icon from the dock on mac os ox (maybe there's some way using shell scripting, or maybe something in the plist files).
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: run application in background without a gui
Yes, very doable. I've recently been adding CLI support to some of my apps for admins who need to execute them across their network, and it works great.
Like BVG said, passing "-ui"as an argument to the standalone will cause it to run without a GUI, and you can get the other arguments passed to it by checking the environment variables "$0", "$1", "$2", etc. You can find the number of arguments passed with "$#".
CLI in LC is easy and fun. Feel free to post back here if you run into any snags, as I'm sure we can help you find solutions for just about anything you'd encounter with this.
Like BVG said, passing "-ui"as an argument to the standalone will cause it to run without a GUI, and you can get the other arguments passed to it by checking the environment variables "$0", "$1", "$2", etc. You can find the number of arguments passed with "$#".
CLI in LC is easy and fun. Feel free to post back here if you run into any snags, as I'm sure we can help you find solutions for just about anything you'd encounter with this.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: run application in background without a gui
As an alternative, I don't even bother with the "-ui" commandline argument for standalones, I just use
Note: the startup handler will only be called from a standalone application environment and won't affect your development work.
Code: Select all
on startup
hide this stack
end startup
-
- VIP Livecode Opensource Backer
- Posts: 16
- Joined: Mon May 09, 2011 3:01 pm
Re: run application in background without a gui
thank you for the fast answer, both works 
