Launch exe with parameter

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: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
p4tr1ck
Posts: 36
Joined: Mon Jun 14, 2010 4:58 pm

Launch exe with parameter

Post by p4tr1ck » Wed Nov 03, 2010 1:33 am

I am attempting to make a GUI for a simple console application, which only requires one parameter.
How would I:
A) Launch the executable with a parameter
B) (if possible) put the output of said console application into a field, instead of a cmd window?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Launch exe with parameter

Post by Mark » Wed Nov 03, 2010 1:36 am

p4tr1ck,

Use the shell function. The parameter for the shell function is exactly what you would enter in the command line window. Which command do you want to use exactly?

The value returned by the command line is passed on by the shell() function.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

p4tr1ck
Posts: 36
Joined: Mon Jun 14, 2010 4:58 pm

Re: Launch exe with parameter

Post by p4tr1ck » Wed Nov 03, 2010 1:42 am

Well, it is a file converter, so you drag the file onto the executable. However, a lot of people don't know how to do that, so I figured I would create a GUI. Would the shell() command achieve this?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Launch exe with parameter

Post by Mark » Wed Nov 03, 2010 1:45 am

Which command do you want to use exactly?
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

p4tr1ck
Posts: 36
Joined: Mon Jun 14, 2010 4:58 pm

Re: Launch exe with parameter

Post by p4tr1ck » Wed Nov 03, 2010 1:49 am

I'm not quite sure, I presume its the default windows parameter for passing a file to open to an application. However, I don't know what that is...
Let me make it clear that nothing is actually typed in the console, it simply displays the output of the conversion. It is used by dragging a file onto the executable.

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: Launch exe with parameter

Post by WaltBrown » Wed Nov 03, 2010 2:10 am

I think Mark is asking, what shell command do you want to use?
Walt
Walt Brown
Omnis traductor traditor

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Launch exe with parameter

Post by Mark » Wed Nov 03, 2010 10:04 am

p4tr1ck ,

Yes, I'm asking about the shell command. Perhaps you could use Rev's launch command. Have a look at the dictionary.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply