• 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: (beep) as string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (beep) as string


  • Subject: Re: (beep) as string
  • From: kai <email@hidden>
  • Date: Wed, 19 Nov 2003 01:00:56 +0000

on Mon, 17 Nov 2003 10:51:00 +0000, Nigel Garvey wrote:

> In response to the sensation caused by his (beep) trick, Fredo also
> posted this:
>
> tell application "Finder" to display dialog "" & (name of (choose file
> (beep (activate)))) with icon 1
>
> Although it's very unconventional to use commands that don't return
> results as parameters to commands that don't need them, I'm not sure that
> any bug is involved here. Would anyone care to comment?

Just to pick up on the second point from your original message, Nigel - I'm
inclined to agree with you. Seems to me the script merely evaluates the
statements according to the order in which they've been nested - as
confirmed by my event log:

tell application "Finder"
activate
beep
choose file
--> alias "Hard Disk:Desktop Folder:Analyse Code"
get name of alias "Hard Disk:Desktop Folder:Analyse Code"
--> "Analyse Code"
display dialog "Analyse Code" with icon 1
--> {button returned:"OK"}
end tell

The commands that don't need additional parameters seem to ignore any that
are added, so:

choose file 4

...apparently does nothing with the integer 4. This also seems to be the
case with a 'meaningless' parameter value:

choose file of type 4

(I wouldn't know if this kind of thing *should* error or not - but it
doesn't worry me that it doesn't.)

However, this isn't ignored:

choose file of type 1234

...and the statement appears to be interpreted as:

choose file of type {"1234"}

(Curiously enough, I can't seem to find any files of type "1234" on my
machine.) ;-)

---
kai
_______________________________________________
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: Re: (beep) as string
  • Next by Date: Applescript & Editor
  • Previous by thread: Re: (beep) as string
  • Next by thread: Re: (beep) as string
  • Index(es):
    • Date
    • Thread