Opening html / running standalone exe's in a card

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
mebtrek
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 16
Joined: Sun May 21, 2006 11:46 pm

Opening html / running standalone exe's in a card

Post by mebtrek » Tue Jan 18, 2011 11:54 pm

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.

kray
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 56
Joined: Sat Apr 08, 2006 5:28 pm
Contact:

Re: Opening html / running standalone exe's in a card

Post by kray » Wed Jan 19, 2011 4:34 am

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?
Ken Ray
Sons of Thunder Software
Email: kray@sonsothunder.com
Web site: http://www.sonsothunder.com

mebtrek
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 16
Joined: Sun May 21, 2006 11:46 pm

Re: Opening html / running standalone exe's in a card

Post by mebtrek » Wed Jan 19, 2011 9:37 am

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.

mebtrek
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 16
Joined: Sun May 21, 2006 11:46 pm

Re: Opening html / running standalone exe's in a card

Post by mebtrek » Thu Jan 20, 2011 10:51 pm

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.

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: Opening html / running standalone exe's in a card

Post by doc » Thu Jan 20, 2011 11:16 pm

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-

mebtrek
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 16
Joined: Sun May 21, 2006 11:46 pm

Re: Opening html / running standalone exe's in a card

Post by mebtrek » Fri Jan 21, 2011 7:37 am

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.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Opening html / running standalone exe's in a card

Post by Klaus » Fri Jan 21, 2011 12:00 pm

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

mebtrek
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 16
Joined: Sun May 21, 2006 11:46 pm

Re: Opening html / running standalone exe's in a card

Post by mebtrek » Fri Jan 21, 2011 12:20 pm

That wraps it up. Thanks to all of you!
Mebtrek

Ultravibe
Posts: 65
Joined: Sat Jan 17, 2015 12:06 pm

Re: Opening html / running standalone exe's in a card

Post by Ultravibe » Mon Aug 08, 2016 12:00 pm

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?

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Opening html / running standalone exe's in a card

Post by MaxV » Tue Aug 09, 2016 10:39 am

use the shell() function:

Code: Select all

put shell("d:\CasparCG\casparcg.exe")
launch is for using the internal associated program.
See
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Ultravibe
Posts: 65
Joined: Sat Jan 17, 2015 12:06 pm

Re: Opening html / running standalone exe's in a card

Post by Ultravibe » Wed Aug 10, 2016 1:12 pm

Thank you! I will look a bit later

Post Reply