Page 2 of 3

Re: Foot notes in exported documents?

Posted: Sun Nov 09, 2025 1:34 pm
by richmond62
This worked:

Code: Select all

on mouseUp
  ask file "Choose where you wish to export your text"
  if the result = "cancel" then
  exit mouseUp
  else
     put fld "pada2" into url("file:" & it & ".html")
     set the itemDelimiter to slash
     set the defaultFolder to item 1 to -2 of the longFilePath of it
  end if
  end mouseUp
field 'pada2" contains

<footer>
<p>© 2025 MyWebsite. All rights reserved.</p>
</footer>

what is NOT clear is how to combine that with another field's content.

Re: Foot notes in exported documents?

Posted: Sun Nov 09, 2025 6:16 pm
by SparkOut
Did you try the stack I posted with the rtfText template? It has a basic template included. As long as you aren't doing extensive text colorization [sic] it should be simple to output what you want. Even if you are, it could be worth delving deeper into rtf anatomy to make that possible too, which I would try if you actually expected to use it.

Re: Foot notes in exported documents?

Posted: Sun Nov 09, 2025 6:33 pm
by richmond62
That threw a 'bluey':
-
SS 2025-11-09 at 19.31.33.png

Re: Foot notes in exported documents?

Posted: Sun Nov 09, 2025 7:48 pm
by SparkOut
I already imported a placeholder stack. That was commented out until you want to go and find any template you might have made.

As it stands without any alteration the stack uploaded should use the basic template imported already and put the text of the header field into the rtf document header, the rtfText of the body field into the main body of the document and the text of the footer field into the rtf document footer, as indicated in the images uploaded.

Re: Foot notes in exported documents?

Posted: Sun Nov 09, 2025 7:51 pm
by SparkOut
rtf stack with template.png

Re: Foot notes in exported documents?

Posted: Sun Nov 09, 2025 7:58 pm
by SparkOut
This is the output file generated, which will (unless altered in the script) be placed in the documents folder.
Delete all the guff after the .rtf filetype extension

Re: Foot notes in exported documents?

Posted: Sun Nov 09, 2025 8:06 pm
by richmond62
Thank you: back at that tomorrow as bedtime here in Bulgaria. 8)

Re: Foot notes in exported documents?

Posted: Mon Nov 10, 2025 10:28 am
by richmond62
SShot 2025-11-10 at 11.27.32.png

Re: Foot notes in exported documents?

Posted: Mon Nov 10, 2025 7:51 pm
by SparkOut
What tool are you using to view rtf files?

Can you make a template rtf file and attach it so I can tell if there's anything strange between Mac/Linux format and Windows?

Re: Foot notes in exported documents?

Posted: Mon Nov 10, 2025 7:54 pm
by Klaus
richmond62 wrote: Mon Nov 10, 2025 10:28 amSShot 2025-11-10 at 11.27.32.png
The FILENAME reveals the secret!

HINT: It is NOT a ZIP file actually!

Re: Foot notes in exported documents?

Posted: Mon Nov 10, 2025 10:55 pm
by SparkOut
I can only guess that you need to *extract* the zipped stack before trying to run it within the zip file.
It's only zipped because the forum doesn't allow upload of files of .livecode type, go figure.

Re: Foot notes in exported documents?

Posted: Tue Nov 11, 2025 9:50 am
by Klaus
Please read the filename aloud:
RichmondsDocument_1762639907.rtf.changeback to rtf filetype.zip

Then ONLY rename that file to something like:
RichmondsDocument_but_he_didnt_get_it.rtf

Et voila, it is in fact a NOT zipped RTF file! 8)

Re: Foot notes in exported documents?

Posted: Tue Nov 11, 2025 10:53 am
by richmond62
Eh, Voila: why do these forums have restrictions of that sort on file uploads?

(I know some other forums that don't)

It doesn't stop the forums being continuously spammed.

Re: Foot notes in exported documents?

Posted: Fri Nov 14, 2025 9:20 pm
by SparkOut
So how did you get on with a correctly unzipped/correct format?

Re: Foot notes in exported documents?

Posted: Sat Nov 15, 2025 7:53 pm
by richmond62
I am sorry, I have not had a chance to do that just yet.