• 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: newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie question


  • Subject: Re: newbie question
  • From: John Delacour <email@hidden>
  • Date: Fri, 28 Feb 2003 21:11:42 +0000
  • Mac-eudora-version: 6.0a8

At 2:14 pm -0600 28/2/03, Jonathan Brassow wrote:

I hope this is an easy question that someone can help me with...

Why does this work..
tell application "Finder"
set pos to the position of the first window
end tell

and not this...
set bah to "Finder"
tell application bah
set pos to the position of the first window
end tell

It works here, and should work for you because the terms you use in this script are not specific to the Finder, so perhaps you posted the wrong script ... but if you had posted a script containing Finder-specific terms, such as this

set vAppName to "Finder"
tell application vAppName to get the name of the first disk

then you would be asking a question to which there used to be a number of answers. I won't bore you with history, since Apple have made it history, but simply give one current solution, which requires you to know the code for "disk", since the dictionary is unavailable to the script when you do it this way.

set vAppName to "Finder"
tell app vAppName
get the name of the first <<class cdis>>
-- !! for <<,>> type option \ , option-shift-\
end


How do you get the codes? By a number of means all requiring you to work in oldOS or Classic.

Apple have never addressed this problem or ever appeared even to understand it, and the problem is worse now than it ever has been. We worked out ways round it under oldOS but then Apple in their ignorance scuppered these. We live in sad times :-)

JD
_______________________________________________
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: newbie question
      • From: Paul Berkowitz <email@hidden>
    • Re: newbie question
      • From: Mr Tea <email@hidden>
References: 
 >newbie question (From: Jonathan Brassow <email@hidden>)

  • Prev by Date: Re: newbie question
  • Next by Date: Re: Scripting MS Word without VBA?
  • Previous by thread: Re: newbie question
  • Next by thread: Re: newbie question
  • Index(es):
    • Date
    • Thread