Page 1 of 1
Opening html / running standalone exe's in a card
Posted: Tue Jan 18, 2011 11:54 pm
by mebtrek
Does anyone know of a way to open an html file and run a standalone exe file within a LiveCode card? I've searched exhaustively all of the lessons and sample apps but couln't find anything. Any code or info links would be greatly appreciated. Thanks.
Re: Opening html / running standalone exe's in a card
Posted: Wed Jan 19, 2011 4:34 am
by kray
Well, to run a standalone .exe you can use the "launch" command (as in "launch <pathToExe>"), or even "open process" (see the dictionary for syntax).
When you say "open an html file" do you mean get the html text from the file and display the tagged text somewhere? Or do you mean display the html file in a web browser region inside a card? Or do you mean have LiveCode launch a separate web browser application and have it open the html file?
Re: Opening html / running standalone exe's in a card
Posted: Wed Jan 19, 2011 9:37 am
by mebtrek
Thanks for your reply and sorry for my lack of specificity. I would like to display local html files selected from a pick list one at a time in a web browser region (or better multiple instances in regions) inside a card or cards. I played around with revBrowser but couldn't get anything to work right other than for it to open an Internet site. Concerning exe running, I've used the launch command but was hoping to use a LiveCode app as a wrapper for the portable exe's to run within card/s. I guess the same in effect could be accomplished using multiple stacks in a LiveCode app but I was thinking of those apps made outside of LiveCode, such as site files compiled into standalone exe's by other compilers.
Re: Opening html / running standalone exe's in a card
Posted: Thu Jan 20, 2011 10:51 pm
by mebtrek
I got local html files to open in a card using RevBrowser (see LiveCode sample app "Browser Sampler) and adjusting the button code for the address & file name. This will provide the nifty functionality of displaying calculating html fils made by Spreadsheet Converter frm within a card.
Still no joy on getting standalone exe's to open in a card. The idea was to be able to use certain files, such as Calc It Spreadsheets or compiled website exe files to open within a LiveCode app as the wrapper. I don't think this can be done but if anyone knows that it can, please advise. Thanks.
Re: Opening html / running standalone exe's in a card
Posted: Thu Jan 20, 2011 11:16 pm
by doc
Unfortunately, I think the closest thing you will find to what you are trying to do is to launch an executable from a button or some other control from within your stack.
As in this button script:
Code: Select all
on mouseUp
launch "Notepad.exe"
end mouseUp
Is that what you are describing, or something else yet?
-Doc-
Re: Opening html / running standalone exe's in a card
Posted: Fri Jan 21, 2011 7:37 am
by mebtrek
That's not quite what I was describing. The "lanch" command does work to run the executable but the run occurs outside of the LiveCode app. I was looking for a way for the run to occur within a LiveCode card, similar to how an html file can run within a card using RevBrowser.
Re: Opening html / running standalone exe's in a card
Posted: Fri Jan 21, 2011 12:00 pm
by Klaus
Hi mebtrek,
mebtrek wrote:...I was looking for a way for the run to occur within a LiveCode card, similar to how an html file can run within a card using RevBrowser.
I'm afraid this is not possible, at least not with the built-in capabilities of LiveCode,
since that will be two separate processes and you can not "combine" them anyhow.
And RevBrowser IS in fact part of Livecode!
Best
Klaus
Re: Opening html / running standalone exe's in a card
Posted: Fri Jan 21, 2011 12:20 pm
by mebtrek
That wraps it up. Thanks to all of you!
Mebtrek
Re: Opening html / running standalone exe's in a card
Posted: Mon Aug 08, 2016 12:00 pm
by Ultravibe
I do the same way:
Code: Select all
on mouseUp
launch "d:\CasparCG\casparcg.exe"
end mouseUp
This application is console-type. When i launch it manually - everything is ok. When i launch it with LiveCode the console window is appear, but nothing is happens.
Why is it so? May be i should some keys like -s -l or something like that?
Re: Opening html / running standalone exe's in a card
Posted: Tue Aug 09, 2016 10:39 am
by MaxV
use the
shell() function:
Code: Select all
put shell("d:\CasparCG\casparcg.exe")
launch is for using the internal associated program.
See
Re: Opening html / running standalone exe's in a card
Posted: Wed Aug 10, 2016 1:12 pm
by Ultravibe
Thank you! I will look a bit later