• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quit running Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quit running Applescript


  • Subject: Re: Quit running Applescript
  • From: Brian Christmas <email@hidden>
  • Date: Thu, 18 Jun 2009 17:42:59 +1000


On 18/06/2009, at 4:53 PM, Brian Christmas wrote:


On 18/06/2009, at 4:42 PM, Satyam Satyanarayana wrote:

I have very simple issue and not able to find the solution.
In my script, I wrote simple validation to check for email id. If the validation fails, I want to quit running Apple script.
I tried some of the following techniques which didn't work:

return
quit me
tell me to quit

Googled also and couldn't find simple solution. Can some one help me to sort out this problem?

--Satyanarayana SVV

G'day Satyam

try this

repeat
beep
error number -128
end repeat

error number -128 does an immediate and error free Quit

Regards

Santa

By the way, if you try to use Error number -128 from within a try statement, it will log as an error, and continue the script.

You can use the error number itself as a flag, and quit outside of the try statement.

eg..

tell application "Finder"
set errNum to 0
repeat
try
beep
error number -128
on error errMsg number errNum
if errNum = -128 then exit repeat
end try
end repeat
if errNum = -128 then error number -128
beep 4
end tell

Regards

Santa
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Changing Timezone of iCal events (From: Louis Klieger <email@hidden>)
 >Quit running Applescript (From: Satyam Satyanarayana <email@hidden>)
 >Re: Quit running Applescript (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: Quit running Applescript
  • Next by Date: Re: Plan E from Outer Space
  • Previous by thread: Re: Quit running Applescript
  • Next by thread: Re: Quit running Applescript
  • Index(es):
    • Date
    • Thread