Rob LoBosco

Q: AppleScript is not recognizing Numbers in Mavericks

Since downloading Mavericks and the updated Numbers app, my AppleScripts that access Numbers no longer work.  The scripts won't compile because every reference to "tell row" is replaced by "tell <<class ###>>, where ### is an obscure reference.  A google search told me this means AppleScript doesn't recognize Numbers.

 

Any ideas?

Mac Pro, OS X Mavericks (10.9)

Posted on Oct 23, 2013 8:40 PM

Close

Q: AppleScript is not recognizing Numbers in Mavericks

  • All replies
  • Helpful answers

  • by EyeOfTheStorm,

    EyeOfTheStorm EyeOfTheStorm Oct 24, 2013 12:23 AM in response to Rob LoBosco
    Level 1 (0 points)
    Oct 24, 2013 12:23 AM in response to Rob LoBosco

    Have the same problem. My scripts stopped workgin after upgrade. Showing the same strange "classnames"

  • by wornish,

    wornish wornish Oct 24, 2013 3:13 AM in response to EyeOfTheStorm
    Level 1 (10 points)
    iWork
    Oct 24, 2013 3:13 AM in response to EyeOfTheStorm

    Same problem here as well.

    It seems Numbers 3 does not come with an Applescript Dictionary so no scripts will work !

    This will upset a lot of people I think.

  • by playspeed1,

    playspeed1 playspeed1 Oct 25, 2013 10:10 AM in response to Rob LoBosco
    Level 1 (0 points)
    Oct 25, 2013 10:10 AM in response to Rob LoBosco

    May be you can use the previous version of the Numbers.

    In my case, I updated to the Mavericks, and tried to updated the iWork, but my iWorks were in another folder, so instead Mavericks just downloaded anew the apps.

     

    I think there is no any difference in the Numbers 2.3 and 3.0 except some missing features.

    Would anybody try this theory and reply back?

    (I'm just starting to learn AppleScript).

     

    Thanks.

  • by SGIII,

    SGIII SGIII Oct 25, 2013 10:26 AM in response to Rob LoBosco
    Level 6 (10,796 points)
    Mac OS X
    Oct 25, 2013 10:26 AM in response to Rob LoBosco

    I don't think AppleScript is implemented, at least not yet, in Numbers 3.x. It doesn't show up in the Applescript Dictionary on my machine, although Numbers '09 still does.

     

    If you want it (I do!) your giving feedback to Apple may help:

     

    numbers-feedback.png

     

    SG

  • by El-Beardo,

    El-Beardo El-Beardo Nov 22, 2013 7:51 AM in response to Rob LoBosco
    Level 1 (0 points)
    Nov 22, 2013 7:51 AM in response to Rob LoBosco

    This is causing me a major headache, two years ago when I first got an Apple I spent a lot of time writing an Applescript Routine which allowed me to reconcile my various bank statements against various accounts I keep a record of on my machine. Not only has this routine now stopped working as per original post but also my apple script is now full of all these <<class ###>> so even using Numbers 2.3 I am still getting the same problem.

     

    To say I am not impressed is an understatement.

     

    ElBeardo

  • by SGIII,

    SGIII SGIII Nov 22, 2013 8:33 AM in response to El-Beardo
    Level 6 (10,796 points)
    Mac OS X
    Nov 22, 2013 8:33 AM in response to El-Beardo

    According to this support document, AppleScript support (beyond the GUI-scripting common to all modern Mac applications) is coming to Numbers 3 sometime in the coming months.

     

    Trust you keep backups of your scripts so you can just pull out a backup and keep working with Numbers 2.3 for now.

     

    SG

  • by Rob LoBosco,

    Rob LoBosco Rob LoBosco Nov 22, 2013 8:42 AM in response to SGIII
    Level 1 (0 points)
    Nov 22, 2013 8:42 AM in response to SGIII

    I love how the support document says "Improvements to Applescript support."  I guess I would call it an "improvement" to have it working again. 

  • by SGIII,

    SGIII SGIII Nov 22, 2013 9:02 AM in response to Rob LoBosco
    Level 6 (10,796 points)
    Mac OS X
    Nov 22, 2013 9:02 AM in response to Rob LoBosco

    I love how the support document says "Improvements to Applescript support."

     

    Hi Rob,

     

    Numbers 3.0, and indeed any modern application on the Mac, does support AppleScript to an extent. Numbers 3.0 allows AppleScript access to menu items, so you can do GUI scripting.  See this thread and this one too for recent examples with Numbers 3.0.

     

     

    "Improvements to AppleScript support" probably means that it will once again be possible to "tell" objects within Numbers: documents, sheets, tables, cells. 

     

    AppleScript support, of course, is not an "it supports/it doesn't support" dichotomy. It's a question of degree of support, how robust Numbers 3 "suite" in the AppleScript dictionary will be. Numbers 2.3 doesn't have extensive support, but it covers the basics.  Let's hope that the support in Numbers 3 will be as good or better.

     

    SG

  • by El-Beardo,

    El-Beardo El-Beardo Nov 23, 2013 5:01 AM in response to Rob LoBosco
    Level 1 (0 points)
    Nov 23, 2013 5:01 AM in response to Rob LoBosco

    Saying use Numbers 2.3 is not as easy as it sounds as I have found out by experimentation over the last couple of days. I've tried saying these particular files should only be opened with Numbers 2.3 but if Numbers 3 is open it opens it in that anyway, so now I have to remember to ensure that I have quit Numbers3 and then "open with" Numbers 2.3.

     

    I also discovered that the corruption of the Apple Script you have to be very careful how you open your script. Obviously if Numbers 3 is open then when you open your script it is corrupted but I also found that even if Numbers 3 is not open then again opening my script displays it corrupted. The only way I have found to be able to open my script without it being corrupted is to quit Numbers 3, open Numbers 2.3 and then open my script.

     

    Just to rub salt into the wound I have now found that the new version of Pages has corrupted my templates.

     

    One very unhappy man

     

    ElBeardo

  • by SGIII,

    SGIII SGIII Nov 23, 2013 7:13 AM in response to El-Beardo
    Level 6 (10,796 points)
    Mac OS X
    Nov 23, 2013 7:13 AM in response to El-Beardo

    Yes, when using AppleScript with the old Numbers, best make sure Numbers 3.0 is closed.

     

    Also you may do better if you rename the old Numbers to something like Numbers09 and in your AppleScript:

     

    tell application "Numbers09"

     

    SG