Direct to browser

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
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

Direct to browser

Post by richmond62 » Sat Aug 17, 2024 9:38 am

I have a field in a stack containing styled text, and I can easily export that to an HTML document, which I can then open subsequently in a web browser.

However, I would really like to open my styled text in a web browser WITHOUT having to mess around with the intermediate step of an HTML document.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

Re: Direct to browser

Post by richmond62 » Sat Aug 17, 2024 9:54 am


SparkOut
Posts: 2944
Joined: Sun Sep 23, 2007 4:58 pm

Re: Direct to browser

Post by SparkOut » Sat Aug 17, 2024 10:03 am

Change "runrev" to "livecode" in the url

Browsers in recent years have become more "funny/fussy" at opening local files.
If you use a browser widget or revBrowser from within LC, I think you should be able to set the browser content to the htmlText of your field. (I'm not sure about the state of LC browser options on Linux.)
If you want to have the separate browser receive your text somehow and display, you'd have to get quite involved with permissions and 3rd party automation.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

Re: Direct to browser

Post by richmond62 » Sat Aug 17, 2024 10:38 am

Thank you.

Yup: that was a bit sleepy of me not to change 'runrev' to 'livecode'.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

Re: Direct to browser

Post by richmond62 » Sat Aug 17, 2024 11:58 am

Not that that did me any good as I don't have a current LiveCode licence.

This strikes me as very odd as that bug report (and a considerable number of other ones) refers to the Open Source 'Community' versions: so should not all the bug reports that related to Open Source software also be freely available?

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 324
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: Direct to browser

Post by SWEdeAndy » Sat Aug 17, 2024 12:08 pm

richmond62 wrote:
Sat Aug 17, 2024 9:38 am
I have a field in a stack containing styled text, and I can easily export that to an HTML document, which I can then open subsequently in a web browser.

However, I would really like to open my styled text in a web browser WITHOUT having to mess around with the intermediate step of an HTML document.
I don't think there's a way around it, but what you can do to make it as "invisible" as possible to the user, is to create the html doc in e.g. the Documents folder, launch it and (after a slight delay so it has time loading) have LiveCode delete it. You could append "the seconds" to the name to make sure (or extremely likely) that no file with that name already exists in the folder.
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com

Post Reply