• 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
Redondant "tell" !?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Redondant "tell" !?


  • Subject: Redondant "tell" !?
  • From: Bernard Azancot <email@hidden>
  • Date: Thu, 11 Mar 2004 15:35:54 +0100

I have asked this question already, but got no answer.
Sorry to ask again, but I would like to know the answer, and improve my AS knowledge.

AS 1.9.3
MacOSX 10.3.2 (and very soon 10.3.3)
SE 2.0 (v43)

My script goes like this and works without a hitch:

=== script ===

try
with timeout of 200 seconds
tell application "Finder"

-- Perform operation 1
-- Perform operation 2
-- Perform operation 3
end tell
end timeout
end try

-- operation 4
tell application "Finder"
try
if exists file "A" of desktop then delete file "A" of desktop
if exists file "B" of desktop then delete file "Bf" of desktop
if exists file "C" of desktop then delete file "C" of desktop
end try
end tell

=== end of script ===

If I try not to repeat "tell application "Finder", after operation 3, the script does not perform operation 4.
Amazing, non ?
Any explanation?

Thanks in advance for your help.

=== faulty script ===

try
with timeout of 200 seconds
tell application "Finder"

-- Perform operation 1
-- Perform operation 2
-- Perform operation 3

-- operation 4
if exists file "A" of desktop then delete file "A" of desktop
if exists file "B" of desktop then delete file "Bf" of desktop
if exists file "C" of desktop then delete file "C" of desktop
end tell
end timeout
end try

=== end of faulty script ===
_______________________________________________
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.


  • Prev by Date: [ANN] March Philadelphia Area AppleScript Users Group Meeting
  • Next by Date: Re: Date object into FMP field
  • Previous by thread: [ANN] March Philadelphia Area AppleScript Users Group Meeting
  • Next by thread: Re: Redondant "tell" !?
  • Index(es):
    • Date
    • Thread