• 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: Andy Wylie <email@hidden>
  • Date: Thu, 07 Mar 2002 00:06:34 +1300

on 6/3/02 12:13 PM, Nigel Garvey at email@hidden
wrote:

> Andy Wylie wrote on Tue, 05 Mar 2002 21:39:33 +1300:
>
>>>>
>>>> display dialog ("MACS" is in (application "Finder"'s every process's
>>>> name)) as string
>>>
>> on 5/3/02 3:01 AM, Sander Tekelenburg at email@hidden wrote:
>>
>>> Can't get name of every process." (This is under Mac OS 9.2.1)
>>>
>> Can somebody possibly verify the above 'no get' is an 8.6 AS 1.3.7
>>odditie?
>
> It won't compile for me in either 8.6 or 9.2.1. 'Process' is highlighted
> and the compiler error is "Expected class name but found identifier."
>
>>> This notation does work for me:
>>> display dialog ((name of every process of application "Finder") as string)
>>> contains "MACS"
>
> This isn't just an inversion of Andy's line. Andy's returns the string
> "true" or "false" according to whether or not one of the processes is
> called "MACS"; Sander's returns the boolean 'true' or 'false' according
> to whether or not the string resulting from the concatenation of all the
> processes' names contains the sequence "MACS".
>
> What they do have in common is that neither compiles for me. Nor would I
> expect them to. 'Name of every process' is a Finder reference and should
> require a 'tell' block to provide a context for the compiler.

several people have pointed out 'process' is also an Akua class
of (all processes)-- a list of string
So we have terminology or namespace issues with 'process' where
'every process's name' means nothing without a Finder reference (w/wo Akua).

>I can't think why one should actually work for Andy and the other for Sander.
>
Sander's works for me and I'd be surprised if mine with 'get' didn't work
for him. Sander?

> In the context of a Finder 'tell' block, Andy's line works, but Sander's
> runs into trouble trying to display the uncoerced boolean.
>

>> or this one...
>> ----------
>> tell application "Finder" to display dialog {"oneItemList"}
>> ----------
>
> This works - as one would expect. Single-item lists are automatically
> coerced to the single item itself when required.
>
mostly, Jon Pugh had to coerce it to string passing this to Akua in a Finder
tell when he wrote...
>" My choose from list returns a list, not a single reference. I'm running the
>9.2.2 version here."
>

your'e a stalwart NG, thanks!

I guess should have posted this instead of the original tell free example
snipped from the sketch pad ; ...

set theRef to application "Finder"'s every window's name
-- {name of every window of application "Finder"}

choose from list theRef
-- {"Foo"}

choose from list (application "Finder"'s every window's name)
-- "Finder got an error: Some data was the wrong type."

choose from list (get application "Finder"'s every windows's name)
-- {"Foo"}

what else can be got like this?

_____________________________ Andy
_______________________________________________
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: Sander Tekelenburg <email@hidden>
References: 
 >Re: Finder Tell Blocks (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Scripting Palm Desktop
  • Next by Date: Re: Eps Profiles
  • Previous by thread: Re: Finder Tell Blocks
  • Next by thread: Re: Finder Tell Blocks
  • Index(es):
    • Date
    • Thread