Re: Stopping a scipt in a Try Statment
Re: Stopping a scipt in a Try Statment
- Subject: Re: Stopping a scipt in a Try Statment
- From: "Marc K. Myers" <email@hidden>
- Date: Fri, 20 Apr 2001 10:36:06 -0400
- Organization: [very little]
>
Date: Thu, 19 Apr 2001 23:17:05 -0400
>
Subject: Stopping a scipt in a Try Statment
>
From: Barton Chew <email@hidden>
>
To: <email@hidden>
>
>
I am writing a Start Up Items script that attempts to select a file on the
>
desktop, renames the file and places it into a folder on the hard drive. If
>
the file does not exist, I use a Try Statement to catch the error and exit
>
the script.
>
>
The problem is, I can not figure out how to stop the script. Is there a
>
command for this?
Use the "return" command:
set theVar to "George"
try
set theDate to date theVar
on error
display dialog "Oops!"
return
end try
display dialog "I made it!"
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[4/20/01 10:35:43 AM]