• 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: What makes AppleScript difficult
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: What makes AppleScript difficult


  • Subject: RE: What makes AppleScript difficult
  • From: Olof Hellman <email@hidden>
  • Date: Fri, 7 Dec 2007 16:38:46 -0800
  • Acceptlanguage: en-US
  • Thread-topic: What makes AppleScript difficult

I’ve been avoiding this topic, but  just can’t resist:

 

1) I’d like to pile on with the “most applications’ dictionary / terminology / object model / documentation  is a mess”, but I realize that that wasn’t the original question.

 

2) Implicit object resolution.     It can be the case that

 

    get font of character 3 of document 1

    -->  “Helvetica”

 

But

 

    set thirdChar to get character 3 of document 1

    get font of thirdChar

    -->  can’t get font of “v”

 

doesn’t.  It’s obvious to me why this is, but it certainly qualifies as something that make AppleScript difficult.

 

 

3) restrictions on whose clauses.  The whose clause is great, but you can only filter on properties. 

 

   select every folder where it’s name contains “.”

 

works, but

 

   select every folder where it’s count items equals 0

 

doesn’t.   If

 

   tell myFolder

       count items equals 0

        --> false

       name contains “.”

        --> false

    end

 

its hard to see why either form can’t used in a whose clause.  Yes, I know why.  That’s not the point.   As an implementor, I have to imagine what sorts of verb clauses might be valuable to sort on in a whose clause, and provide ersatz properties for them.  Not ideal.

 

 

4) enumerated value madness

 

It’s tricky to keep straight when some terminology can be used as a class identifier, a property identifier, or an enumerated value.  In an app scripting implementation, it is tempting to want to use the same term as all three, but usually you run into problems trying to do that, and so dictionaries instead have less than ideal terms for enumerated values, which is confusing and difficult.

 

 

5) Lack of good record and list manipulation.   This should probably be item number 1.   ‘nuff said.

 

 

6) Script Editor keeps launching a different version of the application than the one that is both already running and that is the one I want to use.  Again, I know how to work around this, but it sure is more difficult.

 

 

7) Did I mention I’d like to pile on with the “most applications’ dictionary / terminology / object model / documentation  is a mess”?

 

 

- Olof Hellman

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >What makes AppleScript difficult (From: Richard Doust <email@hidden>)
 >Re: What makes AppleScript difficult (From: Chris Page <email@hidden>)

  • Prev by Date: Re: Changing the name of a file in the temporary items folder
  • Next by Date: Problem with Applescript and Spaces (virtual desktops not the character)
  • Previous by thread: Re: What makes AppleScript difficult
  • Next by thread: Re: What makes AppleScript difficult
  • Index(es):
    • Date
    • Thread