Page 1 of 2
Execute A Program
Posted: Sat Sep 26, 2020 5:35 am
by Googie85
Hi Guys,
I am seeking another way of running a program aside from this:
get shell("start C:\Windows\Temp\Console.exe")
Any Ideas??
Many Thanks,
Matt.
Re: Execute A Program
Posted: Sat Sep 26, 2020 8:14 am
by richmond62
I tend to run programs by double-clicking symbolic links on the desktop.
Re: Execute A Program
Posted: Sat Sep 26, 2020 8:59 am
by Googie85
Why be smart??
Re: Execute A Program
Posted: Sat Sep 26, 2020 9:04 am
by FourthWorld
Have you tried the launch command?
Re: Execute A Program
Posted: Sat Sep 26, 2020 9:06 am
by richmond62
Googie85 wrote: âSat Sep 26, 2020 8:59 am
Why be smart??
Well, for starters because you probably asked the wrong question.
What I believe you should have asked goes a bit like this:
"How can I launch a Windows program from inwith LiveCode without using a shell command."
Re: Execute A Program
Posted: Sat Sep 26, 2020 10:07 am
by FourthWorld
richmond62 wrote: âSat Sep 26, 2020 9:06 am
"How can I launch a Windows program from inwith LiveCode without using a shell command."
This being a LiveCode forum, that's how I inferred the question.
Re: Execute A Program
Posted: Sat Sep 26, 2020 10:47 am
by richmond62
This being a LiveCode forum, that's how I inferred the question.
Well, you are obviously privy to some information which I am not.
Given the number of totally out-of-context spam messages that keep turning up hereabouts, I . . .

Re: Execute A Program
Posted: Sat Sep 26, 2020 10:54 am
by FourthWorld
When in doubt look at a user"s profile. Googie85 has been a part of this community for quite a while, as has contributed to a great many meaningful discussions.
Re: Execute A Program
Posted: Sat Sep 26, 2020 10:59 am
by richmond62
When in doubt look at a user"s profile.
Thanks: I'll remember that in future.
Re: Execute A Program
Posted: Mon Oct 12, 2020 10:24 am
by marco.deepak
In my windows application I run a batch file by pressing a button.
I use the following code:
Code: Select all
on mouseUp
answer"prompt text"with"closing button text"
launch document "complete Path"
end mouseUp
Maybe it works also with exe files?.
Hope it helps
M.
Re: Execute A Program
Posted: Mon Oct 12, 2020 1:17 pm
by AxWald
Hi,
marco.deepak wrote: âMon Oct 12, 2020 10:24 am
Maybe it works also with exe files?
Sure it does:
Works.
Have fun!
Re: Execute A Program
Posted: Thu Oct 23, 2025 1:24 pm
by marksmithhfx
I know I am revisiting old material I once knew but have since forgotten (and for which Google Search was no help). I've just started a new stack, opened a card and plunked a whole bunch of code in the card which had numerous errors, which I have now corrected. I'd like to run this script, but short of saving the stack to disk and launching it from the finder is there a "Run" command, or keyboard shortcut that will run the current script? I should add, there is no UI in the stack yet and the UI code is supposed to be in the script.
Just wondering. I think in the past someone had mentioned a clever way to do this but I've forgotten.
Best,
Mark
Re: Execute A Program
Posted: Thu Oct 23, 2025 8:36 pm
by marksmithhfx
Responding to my own question re: executing a program. Snooping around a bit I found 2 possibilities: start using stack "stack name" or go stack "start name" and I'm not quite sure of the difference between the two. However, in the current version of LC 10 (.0.2) when I type either into the msg box and press return nothing happens. However if I close the msg box and reopen it, it seems to execute the expected code. Do I have that right?
Thanks
Re: Execute A Program
Posted: Thu Oct 23, 2025 8:58 pm
by dunbarx
Hi.
Are you asking how to "use" a stack within LC? All the chatter here seemed to me to indicate that you wanted to open other applications from within LC, but not run LC from within LC. "launch" is your friend there.
But this latest:
start using stack "stack name" or go stack "stackName" ...
Threw me.
"Start using" a stack places its stack script into the message path. "Go stack" navigates to a stack.
I do not understand at all what you are asking to do.
Craig
Re: Execute A Program
Posted: Thu Oct 23, 2025 10:51 pm
by marksmithhfx
Hi Craig,
I'll give you a simple example (and obviously I want to do this on more complicated situations as well).
I create a new script-only stack. I put the following text into it...
script "OrganizeMain"
-- v1.0.0
-- Main stack for Organize iOS app
--
on preOpenStack
-- Initialize when stack opens
put "Organize starting..." into msg
end preOpenStack
And exactly at that point I want to test this, will it do what I have coded?
I know I can quit my application and re-launch from the Finder to find out what it does, but I think there is a clever way to just tell LC to run this script, but I can't remember what it is. And there is no "run" command in LC.
Suggestions?
Context: this is all in aid of "tooling" up to write Git-friendly script only stacks (or mostly script-only) so I can take advantage of Gits version control and also its project management and documentation features. And please don't call me crazy, I already know I am
PS thanks for the clarification on "start using" and "go" stack.
Best,
Mark