• 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: Applet's last command doesn't take
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applet's last command doesn't take


  • Subject: Re: Applet's last command doesn't take
  • From: Cal <email@hidden>
  • Date: Sun, 25 Feb 2001 20:58:49 -0500

Paul Berkowitz <email@hidden> wrote:

On 2/24/01 9:38 PM, "email@hidden" <email@hidden> wrote:

> tell application "Finder"
set thisDesk to path to desktop as string
repeat with x in {"Color photos", "BW photos", "Project photos", "dummy"}
if not (exists folder (thisDesk & x)) then make new folder at alias
thisDesk with properties {name:x}
if not (exists window named x) then open folder (thisDesk & x)
if not (popup of window named x) then
activate
set popup of window named x to true
end if
end repeat
end tell

There is no 'named' property, but you can just say

window "Some Name"

Therefore

set popup of window named x to true -- bad

should be

set popup of window x to true

Also in all the lines higher up.

No, they shouldn't. This is not bad in any way -- in fact, it's very good. Even better:

set popup of the window named x to true -- very good

Shane Stanley <email@hidden> wrote:

It's not a property, but it is a legitimate reference form, usually roughly
equivalent to "whose name is". In fact, the version of ASLG I have gives, as
an example, 'window named "Help"'.

Yes. The more English-like version of the name reference form in AppleScript is to insert the word "named":

tell the application named "Finder"
count the files in the folder named "My folder" in the disk named "My Disk"
end tell

tell the application named "QuarkXPress"
open the file named "Macintosh HD:My folder:My File"
end tell

Cal


  • Prev by Date: Re: timeout options
  • Next by Date: Re: magic integer converter number 62? <<OOPS>>
  • Previous by thread: Re: applet's last command doesn't take
  • Next by thread: Re: Applet's last command doesn't take
  • Index(es):
    • Date
    • Thread