• 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: applescript-users digest, Vol 3 #2495 - 18 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applescript-users digest, Vol 3 #2495 - 18 msgs


  • Subject: Re: applescript-users digest, Vol 3 #2495 - 18 msgs
  • From: Bernard Azancot <email@hidden>
  • Date: Fri, 5 Mar 2004 08:53:46 +0100

Le 5 mars 04, ` 03:57, email@hidden a icrit :

Just a newbie surprise.

I have tried an elementary script to delete temp files.
It goes like this:
---
tell application "Finder"
try
delete file "tempA" of desktop
delete file "tempB" of desktop
delete file "tempC" of desktop
end try
end tell
---

-->
tempA is deleted
tempB & tempC are not

--__--__--

Message: 2
Date: Thu, 4 Mar 2004 13:34:04 -0700
From: Doug McNutt <email@hidden>

No answer but I'd add an "on error" to the try loop or remove the "try" altogether. I'll bet Finder thinks it has some error that you're not seeing.

Bingo !
If I remove the "try", it works fine.

2 subsidiary questions:

- 1 Why is this "try" a problem ?
- 2 If I remove the "try", I am going to get an error message when one of the 3 temp files is not found. How can I avoid it ? "On error " ? If yes, would be the syntax ?

Message: 10
From: Christopher Nebel <email@hidden>
Date: Thu, 4 Mar 2004 17:00:40 -0800

Also, you didn't say what system version you were using. It worked
fine for me on 10.3.2.

I use MacOS 10.3.2 to.

Thanks a lot Doug and Chris.
Yours.
BA
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: applescript-users digest, Vol 3 #2495 - 18 msgs
      • From: Graff <email@hidden>
  • Prev by Date: Re: TechNote 2106
  • Next by Date: Re: TechNote 2106
  • Previous by thread: Re: Move and resize the window
  • Next by thread: Re: applescript-users digest, Vol 3 #2495 - 18 msgs
  • Index(es):
    • Date
    • Thread