Re: command line examples
Thanks for everyones help on this. I am getting closer. But I am still not able to get all the way there. My end goal is a server application that can run without a user logged in to the machine. The server application should be able to handle requests ether over HTTP or just plain sockets. I have been experimenting a bit with Andre's RevOnRockets HTTP server, but I have not yet been able to make it work as a stand-a-lone, with or without a UI. Todd Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
Hello Todd On 6 May 2011, at 22:52, Todd Geist wrote: Hello, I had nice long chat with Richard Gaskin yesterday. Amongst the myriad of topics we discussed was how to build simple apps that could be started from the command line and run silently in the back ground. I have been trying to do a little R and D on this idea, but I am stymied by the fact that I can't even get an app to launch via the command line. I have searched the docs and searched on line, and It seems as though this can be done. But I can't find any really documentation on it, or any examples. I have an standalone called served.app What is the terminal command that will launch it? Are there special messages sent to the stack when it is launched this way? What are the options that can be passed? I have heard a rumor that there is an option -ui, but I have not as yet seen proof of it's existence. Does anyone have any examples or articles on how this is done? Once you have created the standalone, you need to do the following: 1. Select served.app in the finder. 2. Right-click and select Show Package Contents 3. You will find a file called served that finder describes as a Unix executable. 4. Copy the file to the folder from which you want to run it. 5. Open terminal 6. Change to the folder (in 4 above). 7. ./served -ui I found out how to do this from a post on the RunRev Forums from R.Robert Hope this is what you were looking for. Regards Peter ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
I just stumbled on something that would make me sad. It seems that maybe command line mode has been removed in anything after version 4. Id this is true then I think it is very sad. Can anyone confirm this? Todd On Fri, May 6, 2011 at 7:52 AM, Todd Geist t...@geistinteractive.comwrote: Hello, I had nice long chat with Richard Gaskin yesterday. Amongst the myriad of topics we discussed was how to build simple apps that could be started from the command line and run silently in the back ground. I have been trying to do a little R and D on this idea, but I am stymied by the fact that I can't even get an app to launch via the command line. I have searched the docs and searched on line, and It seems as though this can be done. But I can't find any really documentation on it, or any examples. I have an standalone called served.app What is the terminal command that will launch it? Are there special messages sent to the stack when it is launched this way? What are the options that can be passed? I have heard a rumor that there is an option -ui, but I have not as yet seen proof of it's existence. Does anyone have any examples or articles on how this is done? Thanks Todd Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
Hi Todd, you have to use open on Mac os x E.g. open 'served.app'would open the application served.app. If your are not in the folder, where the application resides you can use also paths open /whateverfolder/served.app HTH Matthias Am 06.05.2011 um 16:56 schrieb Todd Geist: I just stumbled on something that would make me sad. It seems that maybe command line mode has been removed in anything after version 4. Id this is true then I think it is very sad. Can anyone confirm this? Todd On Fri, May 6, 2011 at 7:52 AM, Todd Geist t...@geistinteractive.comwrote: Hello, I had nice long chat with Richard Gaskin yesterday. Amongst the myriad of topics we discussed was how to build simple apps that could be started from the command line and run silently in the back ground. I have been trying to do a little R and D on this idea, but I am stymied by the fact that I can't even get an app to launch via the command line. I have searched the docs and searched on line, and It seems as though this can be done. But I can't find any really documentation on it, or any examples. I have an standalone called served.app What is the terminal command that will launch it? Are there special messages sent to the stack when it is launched this way? What are the options that can be passed? I have heard a rumor that there is an option -ui, but I have not as yet seen proof of it's existence. Does anyone have any examples or articles on how this is done? Thanks Todd Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
The current user guide does have the following section on page 146 *Command-line argument variables* If you start up the application from a command line, the command name is stored in the variable $0 and any arguments passed on the command line are stored in numbered variables starting with the *$ *character. For example, if you start the application by typing the following shell command: myrevapp -h name then the variable $0 contains myrevapp (the name of the application), $1 contains -h, and $2 contains name. *Note: *Command-line argument variables behave like global variables and can be used in any handler. However, you do not need to use the *global *command to declare them before using them. Is this just left over cruft? Todd Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
Thanks very much for your response, but I don't think that is actually doing anything other than starting the application using the OS. It is just as if you double clicked it. I don't think that is what I am looking for. I think I am looking for command line mode Todd On Fri, May 6, 2011 at 8:08 AM, Matthias Rebbe runrev260...@m-r-d.dewrote: Hi Todd, you have to use open on Mac os x E.g. open 'served.app'would open the application served.app. If your are not in the folder, where the application resides you can use also paths open /whateverfolder/served.app HTH Matthias Am 06.05.2011 um 16:56 schrieb Todd Geist: I just stumbled on something that would make me sad. It seems that maybe command line mode has been removed in anything after version 4. Id this is true then I think it is very sad. Can anyone confirm this? Todd On Fri, May 6, 2011 at 7:52 AM, Todd Geist t...@geistinteractive.com wrote: Hello, I had nice long chat with Richard Gaskin yesterday. Amongst the myriad of topics we discussed was how to build simple apps that could be started from the command line and run silently in the back ground. I have been trying to do a little R and D on this idea, but I am stymied by the fact that I can't even get an app to launch via the command line. I have searched the docs and searched on line, and It seems as though this can be done. But I can't find any really documentation on it, or any examples. I have an standalone called served.app What is the terminal command that will launch it? Are there special messages sent to the stack when it is launched this way? What are the options that can be passed? I have heard a rumor that there is an option -ui, but I have not as yet seen proof of it's existence. Does anyone have any examples or articles on how this is done? Thanks Todd Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
Ah, now i understand. You are right, command line mode was possible up to version 3.5. If you need command line mode and if you have an active maintenance, why not asking supp...@runrev.com for a key for v 3.5? I am pretty sure they will help. Regards, Matthias Am 06.05.2011 um 17:20 schrieb Todd Geist: Thanks very much for your response, but I don't think that is actually doing anything other than starting the application using the OS. It is just as if you double clicked it. I don't think that is what I am looking for. I think I am looking for command line mode Todd On Fri, May 6, 2011 at 8:08 AM, Matthias Rebbe runrev260...@m-r-d.dewrote: Hi Todd, you have to use open on Mac os x E.g. open 'served.app'would open the application served.app. If your are not in the folder, where the application resides you can use also paths open /whateverfolder/served.app HTH Matthias Am 06.05.2011 um 16:56 schrieb Todd Geist: I just stumbled on something that would make me sad. It seems that maybe command line mode has been removed in anything after version 4. Id this is true then I think it is very sad. Can anyone confirm this? Todd On Fri, May 6, 2011 at 7:52 AM, Todd Geist t...@geistinteractive.com wrote: Hello, I had nice long chat with Richard Gaskin yesterday. Amongst the myriad of topics we discussed was how to build simple apps that could be started from the command line and run silently in the back ground. I have been trying to do a little R and D on this idea, but I am stymied by the fact that I can't even get an app to launch via the command line. I have searched the docs and searched on line, and It seems as though this can be done. But I can't find any really documentation on it, or any examples. I have an standalone called served.app What is the terminal command that will launch it? Are there special messages sent to the stack when it is launched this way? What are the options that can be passed? I have heard a rumor that there is an option -ui, but I have not as yet seen proof of it's existence. Does anyone have any examples or articles on how this is done? Thanks Todd Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
On Friday, May 06, 2011 10:10:52 AM Todd Geist wrote: Command-line argument variables Hi Todd, It looks as if you have to program your app to respond according to what values any such variable(s) contain, such as 'if $1 is true then doSomeThing' It looks af it will take some craft in order to ensure that flags and params they might pass are properly matched and that flag order isn't a problem, but this should only prove fussy rather than impossible. Experiment! Report back, please :) Regards, Warren ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
Does anybody know if the old engine allowed you to build a standalone that could be started with no UI and stay running in the background? Todd On Fri, May 6, 2011 at 8:45 AM, Matthias Rebbe runrev260805@m-r- Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
The old engine used to be able to execute scripts. That is, you could invoke the engine using something like this: #!/path/to/engine on startup put hello end startup IIRC this functionality was removed at the time that the on-rev product was launched. Perhaps the functionality was removed for technical reasons, perhaps for market segmentation purposes. Bernard On Fri, May 6, 2011 at 6:16 PM, Todd Geist t...@geistinteractive.com wrote: Does anybody know if the old engine allowed you to build a standalone that could be started with no UI and stay running in the background? Todd On Fri, May 6, 2011 at 8:45 AM, Matthias Rebbe runrev260805@m-r- Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
I used an old engine to run a Linux server process a while ago. It required Xvfb (virtual frame buffer) to be running so the engine had a display to write to. I think that's as close as faceless as you can get with LC - I'll try and dig out the version I was using and get you some more info :) On 06/05/2011 18:16, Todd Geist wrote: Does anybody know if the old engine allowed you to build a standalone that could be started with no UI and stay running in the background? Todd On Fri, May 6, 2011 at 8:45 AM, Matthias Rebberunrev260805@m-r- Todd Geist -- geist interactivehttp://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
On Fri, 6 May 2011 08:10:52 -0700, Todd Geist t...@geistinteractive.com wrote: Is this just left over cruft? Well, the -h argument is used by the engine, so that's just wrong. However... Not only is this *not* just leftover cruft, but I have applications that *rely* on passing and parsing commandline arguments. Type livecode.x86 -h at a terminal prompt for the current list of arguments the engine will use. Any others should pass through verbatim. What I do for faceless apps is invoke a startup handler that ensures invisibility. I don't know if the -ui argument is still valid (even though it shows up in the list), as it throws an error if used by itself. on startup set the visible of this stack to false end startup -- Mark Wieder ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
thanks Mark I was able to get the terminal commands to work although you need to reference the engine inside the OSX package. So I had to type the following at the terminal /Applications/LiveCode\ 4.6.app/Contents/MacOS/LiveCode -h The same also works for standalones. You have to reference the executable not the package. I tried using the -ui option and it works for the dev environment. Live code starts up and there is no ui. But it does appear in my Doc, as I expected, but don't want. I also tried with a standalone, and it launched, but it appeared to get stuck in the launch process. This maybe because I had no handlers in place to catch the on open. I will try some more tests. Todd Todd On Fri, May 6, 2011 at 12:45 PM, mwie...@ahsoftware.net wrote: On Fri, 6 May 2011 08:10:52 -0700, Todd Geist t...@geistinteractive.com wrote: Is this just left over cruft? Well, the -h argument is used by the engine, so that's just wrong. However... Not only is this *not* just leftover cruft, but I have applications that *rely* on passing and parsing commandline arguments. Type livecode.x86 -h at a terminal prompt for the current list of arguments the engine will use. Any others should pass through verbatim. What I do for faceless apps is invoke a startup handler that ensures invisibility. I don't know if the -ui argument is still valid (even though it shows up in the list), as it throws an error if used by itself. on startup set the visible of this stack to false end startup -- Mark Wieder ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode Todd Geist -- geist interactive http://www.geistinteractive.com 805-419-9382 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
On Fri, 6 May 2011 13:28:14 -0700, Todd Geist t...@geistinteractive.com wrote: thanks Mark I was able to get the terminal commands to work although you need to reference the engine inside the OSX package. So I had to type the following at the terminal /Applications/LiveCode\ 4.6.app/Contents/MacOS/LiveCode -h ...ah ...of course. I'm sitting here in front of Fedora Core, where it's much more straightforward. cd /opt/runrev/livecode-4.6.0 sudo su ./livecode.x86 -h ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
Best I can tell, Todd just wants to be able to launch a LC executable on the Mac, but with it running as a hidden or background process, without an icon showing up in the Dock. Is that correct Todd? On Windows, this really simple sample code seems to do the job: on preOpenStack set the hideConsoleWindows to true -- this works on windows -- open process me -- this also seems to work on windows set the vis of me to false wait for 10 seconds set the vis of me to true -- bring the GUI back where it can be ended end preOpenStack So far, I've been unable to do the same on Mac OS X, assuming that I'm trying to solve the correct problem of course. ;-) Best regards, David C. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
On Friday, May 06, 2011 03:28:14 PM Todd Geist wrote: But it does appear in my Dock, as I expected, but don't want. I believe this can be avoided by setting a key value in the .plist file inside the app bundle. I think you'll find this info with a google search. Good luck! Warren ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
On 5/6/11 10:44 PM, David C. wrote: Best I can tell, Todd just wants to be able to launch a LC executable on the Mac, but with it running as a hidden or background process, without an icon showing up in the Dock. Is that correct Todd? On Windows, this really simple sample code seems to do the job: on preOpenStack set the hideConsoleWindows to true -- this works on windows -- open process me -- this also seems to work on windows set the vis of me to false wait for 10 seconds set the vis of me to true -- bring the GUI back where it can be ended end preOpenStack So far, I've been unable to do the same on Mac OS X, assuming that I'm trying to solve the correct problem of course. ;-) The hideConsoleWindows command is Windows-only and ignored on Mac. To remove the dock icon, you need to edit the plist inside the app bundle: http://www.macosxtips.co.uk/index_files/disable-the-dock-icon-for-any-application.html -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: command line examples
Just add this key and string to the pList file... keyLSUIElement/key string1/string I'm not sure if it matters where in the pList file you put this but I always put it immediately before the LSGetAppDiedEvents key. If you want more info then head over to Ken's website... http://www.sonsothunder.com/devres/livecode/livecode.htm I use this approach all the time with software agents I have installed on Macs in our computer laboratories (we use applescripts to launch them on system startup). Terry... On 07/05/2011 02:11 PM, Warren Samples war...@warrensweb.us wrote: On Friday, May 06, 2011 03:28:14 PM Todd Geist wrote: But it does appear in my Dock, as I expected, but don't want. I believe this can be avoided by setting a key value in the .plist file inside the app bundle. I think you'll find this info with a google search. Good luck! Warren ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Dr Terry Judd | Senior Lecturer in Medical Education Medical Education Unit Melbourne Medical School The University of Melbourne ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode