Here is an example of producing HTML from a stack :
on mouseUp put buttons "tabs" into onglets put the short name of this stack into stackName get htmlPagesEcran(stackName, onglets) -- etcend mouseUp
function htmlPagesEcran stackName, onglets
put "<!doctype html>" & cr after myHTML
put "<html>" & cr & cr after myHTML
put "<head>" & cr after myHTML
put "<meta http-equiv=" & quote & "x-ua-compatible" & quote && "content=" & quote & "ie=edge" & quote && "/>" & cr after myHTML
put "<meta name=" & quote & "viewport" & quote && "content=" & quote & "width=device-width, initial-scale=1.0" & quote && "/>" & cr after myHTML
put "<meta charset=" & quote & "utf-8" & quote && "/>" & cr after myHTML
put "<link rel=" & quote & "stylesheet" & quote && "href=" & quote & "../machina.css" & quote && "/>" & cr after myHTML
put "<title>" & stackName & "</title>" & cr after myHTML
put "</head>" & cr & cr after myHTML
put "<body bgcolor=" & quote & "white" & quote & ">" & cr & cr after myHTML
put "<h1>Ecrans du logiciel</h1>" & cr & cr after myHTML
put "<h2>" & stackName & "</h2>" & cr & cr after myHTML
repeat with x = 1 to the number of lines of onglets
if stackName is "dev"
then put "<h3>" & (line x of onglets) & "</h3>" & cr after myHTML
else put "<h3>Onglet" && (line x of onglets) & "</h3>" & cr after myHTML
put "<div>" & "<img" && "src=" & quote & "ecran-" & x & ".jpg" & quote & ">" & "</div>" & cr after myHTML
put "<br>" & cr & cr after myHTML
end repeat
put "</body>" & cr after myHTML
put "</html>" after myHTML
return myHTML
end htmlPagesEcran
From: "'J. Landman Gay' jacque@[redacted].com[HyperCard]" <HyperCard-Mailing-List>
To: HyperCard-Mailing-List
Sent: Friday, February 2, 2018 3:45 AM
Subject: Re: [HC] looking for metacard for windows
On 2/1/18 6:43 PM, Eric Engle eric.engle@[redacted].com[HyperCard] wrote:
> I never had a problem with metacard's UI choking and failing to execute fairly basic commands; i also don't recall having had any difficulty copying and pasting from and to the clipboard.
> regarding html hypergasp (which I cannot find on the net anymore) allowed one to export a stack to html nicely.
>
> please note this is the conversation i didn't want to have; i'm trying to be polite. the lack of an import and export text toll
> 10 plus years into development
> is just one of the reasons I really dislike the livecode UI.
> that's a basic function. so is the clipboard. and not hanging.
I apologize, I didn't mean to start anything.
But just so others know, there's a built-in text import in the field
property inspector, the same place it is in the MC IDE. Importing and
exporting text or HTML is a one-liner.
If you feel like it, please drop me a line because I'm very interested
in knowing what commands cause a hang, I'd like to enter a bug report.
You're also the first person I've heard of who couldn't use copy/paste,
and if it is reproducible I'd like to enter a bug report for that too.
If there are issues, they need to be fixed and it sounds like you've
found an edge case.
--
Jacqueline Landman Gay | jacque@[redacted].comHyperActive Software |
http://www.hyperactivesw.com