Wednesday, January 17, 2018

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

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

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:

Applescript:

try
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

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)