Does 'export image to file' give any warnings?
Ken Ray
kray at sonsothunder.com
Thu Jan 26 12:34:10 EST 2012
On Jan 26, 2012, at 11:18 AM, Graham Samuel wrote:
> I'm using 'export image' to put an image into a file without invoking a 'save' dialog - this is what my user wants. However, I can't see any obvious way of knowing that the new image has the same name has an existing one and would therefore overwrite it. I set up a button that does
>
> on mouseUp
> put the defaultFolder into temp
> export img "ThePic"to URL ("binfile:" & temp &"/meagain.jpg") as JPEG
> put "it= " &&"; result="&&(the result)
> end mouseUp
Graham, test the existence of the file first before ou export:
put temp & "/meagain.jpg" into tFile
if there is not a file tFile then
export img "ThePic to URL theFile as JPEG
else
-- do something else
end if
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list