Export locations

Richmond Mathewson richmondmathewson at gmail.com
Thu Jan 28 15:25:03 EST 2010


On 28/01/2010 18:28, J. Landman Gay wrote:
>
> Or if you don't need a permanent record, just set a custom property. 
> Or set the defaultfolder.
>
Much much better than dumping text documents all over other people's 
data storage!

Thank you so much.

However, being, either a slow learner, or, just forgetful, I had a tough 
time setting the defaultFolder
and would like to share (why do I dislike the word 'share' so much?) my 
code so nobody else wastes 20
minutes just for this:

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

the 2 lines enclosed in lines are lifted directly from the RunRev 4 
documentation
comments - from someone who remains anonymous (and, whoever you are, Big
Big Thanks from me).



More information about the use-livecode mailing list