Hi,
I am new to LiveCode and really I have not done programming in 15 years (even though that is what my degree is in). I work for a company where main development is done in Germany but there are certain features that our customer base here in the USA needs or wants. I have two in mind but one big one would be to create an application that is command line driven. We have a scripting engine in our own software which can drive these. So the script would execute something like: myapp.exe arg1 arg2 and so on.
I know one of the beautiful parts of LiveCode is how easy it creates GUI's , etc. but I want a Gui-less app.
Thanks..
Bruce
Can LiveCode create a command line or console application
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10
- Joined: Wed Apr 18, 2012 9:58 pm
Re: Can LiveCode create a command line or console applicatio
Bruce-
Yep. I do this fairly often. There are a few tricks to it, but it works well if you follow them.
In the openStack handler on the first card I hide the stack. Set the hideconsolewindows to true if you're going to be issuing shell commands in the app, or else you'll see a bunch of windows popping up and disappearing. Read the commandline arguments in the startup handler and either process them there or do some preprocessing and then deal with them later on.
And the engine eats some commandline options on its own as well. There's an old message attached to a bug report that details what they are - I'll try to dig it up and post it here.
Yep. I do this fairly often. There are a few tricks to it, but it works well if you follow them.
In the openStack handler on the first card I hide the stack. Set the hideconsolewindows to true if you're going to be issuing shell commands in the app, or else you'll see a bunch of windows popping up and disappearing. Read the commandline arguments in the startup handler and either process them there or do some preprocessing and then deal with them later on.
And the engine eats some commandline options on its own as well. There's an old message attached to a bug report that details what they are - I'll try to dig it up and post it here.
Re: Can LiveCode create a command line or console applicatio
Found it.
Code: Select all
[-d[isplay] displayname]
[-f[iles] (disable access to files and processes)
[-g[eometry] ={+-}<xoffset>{+-}<yoffset>]
[-i[nput] fd] read commands from fd (0 is stdin) or named pipe
[-m[map]] (don't memory map files)
[-n[opixmaps]] (draw direct to screen)
[-p[ointerfocus]] (use active focus)
[-s[haredoff]] (don't use shared memory server extension)
[+s[haredon]] (use shared memory server extension)
[-u[i]] (don't create graphical user interface)
[-v[isualid] n] (use visual id n as listed from xdpyinfo)
[-w[indowid] n] (watch window id n for commands)
-
- VIP Livecode Opensource Backer
- Posts: 10
- Joined: Wed Apr 18, 2012 9:58 pm
Re: Can LiveCode create a command line or console applicatio
Thanks. Looks like I will have to get out the checkbook. 
