Graham Samuel-4 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 > > However may times I do this, I always get the file "meagain.jpg" with no > indication of any difference between the first and subsequent invocations. > > Obviously I can search the directory myself to look for the recurrence of > the file name, and I guess that's what I'm going to do,but I wondered if > anyone knows if this form of statement in LC produces any kind of error > message and if so, how one can detect it. After all, any kind of 'write > file' operation can fail. > > TIA > > Graham > _______________________________________________ > use-livecode mailing list > use-livecode@.runrev > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode >
Hi Graham, perhaps I did not understand well your question, but why you don't test for the existence of the file before the export ? You can just use : if there is a file temp &"/meagain.jpg" then ... ... and decide what to do ... :) Guglielmo -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Does-export-image-to-file-give-any-warnings-tp4331049p4331120.html Sent from the Revolution - User mailing list archive at Nabble.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