Page 1 of 1

[SOLVED] Adding a number to a file - should be simple,eh?

Posted: Fri Jul 20, 2018 10:08 pm
by karmacomposer
Finally figured out how to append a number to the file path.

Here's the code:

Code: Select all

global varLastBlock
      put "/PDAForm" & varLastBlock & ".pdf" into tFirstPath
      replace return with empty in tPDFpath
      put specialFolderPath("documents") & tFirstPath into tPDFPath
Thank goodness.

Mike

Re: [SOLVED] Adding a number to a file - should be simple,eh?

Posted: Sat Jul 21, 2018 7:14 pm
by capellan
Hi Mike,

You could add the time to a name too. In this way, your users could not
overwrite any file by mistake:

Code: Select all

put "/PDAForm" & varLastBlock && the ticks & ".pdf" into tFirstPath
http://livecode.wikia.com/wiki/Ticks

Al

Re: [SOLVED] Adding a number to a file - should be simple,eh?

Posted: Mon Jul 23, 2018 3:04 pm
by karmacomposer
I can't do that - have to be serialized for saving and loading.

Working on it.

Mike