Sunday, November 27, 2022

#1 2003-04-03 10:57:15 am

Ray Barber
Site Admin
From:: Lake Dallas, Texas
Registered: 2002-11-20
Posts: 352

Example of using a "try" statement to move files.

This code uses a "try" block when moving a file. On an error it will display a dialog to the user. Pulled from the AppleScript Users list.

OS version:


move aFile to folder destFolder
on error -- oops, couldn't move the file
display dialog ("Couldn't move " & name of aFile as string) buttons {"OK"}
end try

Ray Barber
Admin | MacScripter



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)