Making my text editor save the work
Kevin J
kj2005.28 at gmail.com
Fri Mar 11 23:38:07 EST 2005
I understand what is going on in that script but where would I have to
put it Because my menu is in switch so would I have to put in under
the case "SaveAs..." ? Or in a different spot?
On Fri, 11 Mar 2005 22:13:43 -0600, Derek Bump
<webmaster at dreamscapesoftware.com> wrote:
> Kevin,
>
> This is the standard save/save as script that I use. The target file is
> stored in the Global Variable "targetFile". It works like this, if the
> targetFile is empty or if you pass the parameter "true" then it will ask
> where you want to save the file. The script is as follows...
>
> on doSave saveAs
> global targetFile
> if (saveAs is "true") or (targetFile is empty) then
> ask file "Save File As..." with "Untitled.txt"
> if it is empty then exit to top
> put it into targetFile
> end if
>
> -- Then do what your script wants
> put fld "txtWindow" into URL ("file:" & targetFile)
> end doSave
>
> Just remember that when you close the file, remember to put empty into
> targetFile, otherwise you'll overwrite the file with future changes.
>
> Derek Bump
> Dreamscape Software
> _______________________________________________
> Compress Images Easily with JPEGCompress 2.5
> http://www.dreamscapesoftware.com/
>
>
More information about the use-livecode
mailing list