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: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode