this CAN be done, but I hope you will agree that THIS:
Code: Select all
put URL("file:" & (specialFolderPath("Documents") & "/PC.txt")) into tfile

This will:
Code: Select all
...
repeat with 1 = 1 to 10
put EMPTY into url("specialfolderpath("documents") & "/template number" & i & ".txt")
end repeat
...
So why not write directly -> on closecard?trags3 wrote: ↑Mon Mar 08, 2021 7:35 pm...
As they enter data on a card it is saved in a field on the card. When they skip to the next card the data in the fields get saved in a text file. If the user quits the app before completing all pages of input, those files are used to repopulate the cards with the data they had entered during the prior use of the app.
Code: Select all
on closecard
put fld "whatever field you need to write...." into URL("file:" & (specialFolderPath("documents") & "/datafromcard42.txt"))
end closecard
Best
Klaus