• 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: Finder Tell Blocks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder Tell Blocks


  • Subject: Re: Finder Tell Blocks
  • From: JollyRoger <email@hidden>
  • Date: Mon, 04 Mar 2002 07:01:45 -0600

On 3/4/2002 12:23 AM, "Andy Wylie" <email@hidden> wrote:

> on 4/3/02 4:29 PM, email@hidden at email@hidden wrote:
>
>> For others (newbies especially) who also didn't quite get the rant & rave of
>> it:
>>
>> set X to 5
>> set Y to 25
>> set Z to 2
>> set A to ((X+Y)/Z)
>> display dialog "The answer is: " & a
>>
>> does not have to be within a tell block at all -- it will just run all by
>> it's lonesome without it, even outside the script editor (as a saved
>> application) because it never calls anything unique to any program.
>>
> not quite, you can grab something from an app and tell it nuthin...
>
> display dialog ("MACS" is in (application "Finder"'s every process's name))
> as string
>
> I use (probably overuse) this sort of thing more and more as a result of
> being bitten hard by tell block bugs.

Excellent point, Andy! If all you are doing is getting a *property* of an
application, then you typically don't even need a tell block!

For those of you who are confused by this: The main thing is to understand
that a command is different from a property. Commands typically cause the
application to do something. Properties tell you something (or let you
change something) about the state of an application or something in the
application.

Some example Finder commands:

tell application "Finder" to close thisWindow
tell application "Finder" to restart
tell application "Finder" to duplicate sourceFile to destFolder with
replacing

Some example Finder properties:

application "Finder"'s version
application "Finder"'s frontmost
application "Finder"'s execution state

HTH

JR
_______________________________________________
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: Finder Tell Blocks
      • From: Mr Tea <email@hidden>
References: 
 >Re: Finder Tell Blocks (From: Andy Wylie <email@hidden>)

  • Prev by Date: Re: Damn send button / Wind chill (nesting more efficient shock)
  • Next by Date: Re: Now is: Finder tell block
  • Previous by thread: Re: Finder Tell Blocks
  • Next by thread: Re: Finder Tell Blocks
  • Index(es):
    • Date
    • Thread