Trouble selecting menu item using AppleScript

Now that iWork Numbers 3.2 has added the ability to hide columns and rows via the menubar, I'm trying to make it work in an Applescript using system Events and the click menu item command, but no dice.  Any ideas?
tell application id "com.apple.iWork.Numbers"
  activate
          tell table 1 of the active sheet of document 1
                    --select the range
                    set thisRangeName to "A:B"
                    set the selection range to range thisRangeName
                    --hide the cells
                    tell application "System Events"
                              tell application process "Numbers"
                                   --this causes an error
                                  click menu item "Hide 2 Columns" of menu 1 of menu bar item "Table" of menu bar 1
                                   --this doesn't seem to do anything
                                   click menu item 18 of menu 1 of menu bar item "Table" of menu bar 1
                              end tell
                    end tell
          end tell
end tell

I finally settled on this solution:
tell application id "com.apple.iWork.Numbers"
     activate
     tell table 1 of the active sheet of document 1
          set thisRangeName to "A:B"
          set the selection range to range thisRangeName
     end tell
end tell
tell application "System Events" to tell process "Numbers"
     click menu bar item "Table" of menu bar 1
     keystroke "Hi"
     delay 0.5
     keystroke return
end tell
I would be curious to know if anyone has found a more elegant solution.

Similar Messages

  • Why does my Desktop Mouse freeze (moves erratically) when selecting menu items in PSE13 Editor?

    It seems that my computer with 8GB of memory may not be enough to use PSE13.    The Organizer menu works fine when I select menu items.   The problem is when I switch to the Editor.   My mouse starts to freeze, move fast, or too slow.  It is difficult to select
    a menu item in this situation.

    Unusual. In theory PSE13 should be better as it's a 64 bit application.
    Can you try re-setting the prefs then close and re-launch the Editor. First you need to go to:
    Edit >> Preferences >> General
    Then click the button shown on the image below.

  • Select by Note using Applescript

    I want to know if it's possible using Applescript to select items based on the contents of the Note field of the Attibutes Panel. It's used to select objects within Actions, so it seems like it should be possible.
    Unfortunately I'm not very good at scripting and can't seem to figure out the right syntax.
    Thanks in advance for any ideas or suggestions...
    Mike D.

    Hey, Mike:
    Yes, it's possible to select an item based on the contents of its Note.
    every page item whose note contains "testing" -- This would return a list of page items who has "testing" in the note. This includes an item with the word "retesting" so remember to be specific. These are only computers after all… they're not very smart! ;^)
    This is doable but remember you can name any and all items on a page and select them based on that parameter. Unless you have a particular reason to use the Note property I would use Name but either way can be worked out.
    Cheers,
    storm371

  • Javascript Select Menu Item & Tool

    I am brand new to javascript and quite overwhelmed trying to learn this language. I am trying to convert extensions for Photoshop that were created with Configurator 4 (in case some of you may not know, these panels will no longer be supported in future versions of Photoshop).
    I need to create some HTML panels that use javascript. If someone could help me get started with some basic javascript I would be greatly appreciative.
    Here is what I need to get started:
    1. Tabs at the very top for access to different panel layers.
    2. Open menu item with button connected to javascript.
    3. Select tool from javascript.
    I have found the documentation a bit scarce for non-coders (Hello Adobe), so if someone could show me how the above would work then I probably can figure out the rest.
    Thanks in Advance - Sam

    Thank you - that's the ticket.
    For both tool and menu item I had ScriptingListenerJS active and it gave me the javascript for selecting a tool and also a menu item.
    I will look into the creating tabs on the panel in html.
    Another question:
    I am working with the "Hello World" extension example and am a bit confused by the main.js file.
    (function () {
        'use strict';
        var csInterface = new CSInterface();
        // Reloads extension panel
        function reloadPanel() {
            location.reload();
        function init() {
            themeManager.init();
            $("#btn_reload").click(reloadPanel);
            $("#btn_test").click(function () {
                csInterface.evalScript('sayHello()');
            $("#new_doc").click(function () {
                csInterface.evalScript('newDoc()');
             $("#myNewDoc").click(function () {
                app.documents.add();
        init();
    On the html page there is this: <button id="btn_test">Call ExtendScript</button>
    On the main.js file there is this:
    $("#btn_test").click(function () {
                csInterface.evalScript('sayHello()');
    What does the "$" mean and what does the "#" mean in front of "btw_test".
    Thanks in advance - Sam

  • GUI scripting-select menu item in Mail's Styles popupbutton

    Hi,
    The following script complies without returning an error.
    In Mail, with a new message window displayed, the Styles sheet displayed (select Format>Style>Styles...), and the Favorite Styles radio button selected, the script below returns an error when it gets to the line "click pop up button item 'Bold'" (the menu does contain an item "Bold!").
    I'd prefer to select the menu item by name rather than by using keystrokes in the script because I will be adding styles to the Styles menu, which will result in changes in the numbering of items in that menu.
    Could someone please explain to me how to accomplish this?
    Thanks in advance!
    tell application "System Events"
    tell application process "Mail"
    tell first window
    tell first sheet
    tell first radio group
    tell radio button 2
    click
    end tell
    end tell
    tell pop up button 1
    click
    click pop up button item "Bold"
    end tell
    end tell
    end tell
    end tell
    end tell

    When you click the pop up button, the result is a menu, so you will need to click an item of that menu - for example:
    tell pop up button 1
          click
          click menu item "Bold" of menu 1
    end tell

  • Play button doesn't work -- doesn't select menu item

    By default, the first thing selected in my encore menue is a text button that says "play all".  So, you can start the DVD playing by pushing the enter button on the remote, by pushing the play button on the remote, or by pushing the play button on the dvd player.  This is as it should be; this is for my dvd (not blu-ray).
    When I burn a blu-ray (instead of a DVD), the play button on the remote and the play button on the dvd player do not work.  I can only use the enter button on the remote.
    I ran a second test by burning a very short movie clip with a simple button in encore.  Again, the results were the same--no problems for a dvd, but messed up for a blu-ray.
    I am playing the DVD and blu-ary on the same player.
    Any ideas?
    Thanks

    Hi Jim:
    The problem is not with the player, a Sony. 
    A couple of months ago I authored a DVD (Blu-ray) of a wedding anniversary the main menu of which had just a couple of buttons  --  the video (about 40 minutes) and a slideshow of a couple of hundred slides with music.   It was wedding present.  Everything worked as planned, not only on my Sony equipment but on Panasonic and LG.  Menu items highlighted as they should and could be toggled by the remote, just as things have been for years (since 1996 for me I guess.)
    The people subsequently asked for 3 extra blu-rays and 12 regular DVDs for people who had seen it but didn't have Blu-ray players.  No problem, said I.  I still have the Encore "ncor" file and plenty of blanks.
    Turns out that I must have relocated some files  --  Encore could not find the previous folder.  Fortunately the Premiere program files were intact so I simple created a new Encore project and created a new ISO file.  This time I made a couple of menu pages and created chapters as well as the slide show.  I made a DVD (on a re-writeable disc) and it worked as expected.  I cut a dozen disks and labeled them.  Meanwhile I made the blu-ray iso file (having made the required changes in Encore.)
    First got a Photoshop error code -45 (although I had not even opened Photoshop for a month.) 
    I shut down everything with the idea of starting Encore as the Administrator (a trick that has fixed other problems) and the blu-ray image file was created without a hitch.  But still got an ISO file that, when burned to a blu-ray, had buttons that would not highlight and would not work.   Also the "pause" button would not work.  (I have a long organ piece with the home menu page.)  Nor would the number buttons.  Just the "top menu" buttons on the remote.
    Obviously everything worked in preview: highlights showed on the buttons that, when pressed, went to the right files.   So everything works perfectly well in Preview and with DVD.  It is just with Blu-ray that there is a problem.  And it is with any and all players.
    The same Blu-ray can be played on a computer using the mouse.  Again, the buttons themselves do not highlight so the software remote does not function.
    Confusing............
    Any additional thoughts?
    Barrie Austin
    [email protected]
    425-392-5760/425-922-0540 (Cell)

  • How to hide/disable menu items using Javascript in Acrobat 9 pro or later

    We just wanted to know on how to hide/disable menu items for e.g. 'Open' menu item under 'File' menu in Acrobat 9 or later on Mac using Javascript. It would be useful if you could provide if any other option is in place already.

    Not sure it will work, but you can try using the app.hideMenuItem() method. See reference here.

  • Creation menu item using transaction varient or screen varient

    hi,
    Can we create pushbutton or menu item in standard program using screen varient or transaction varient.

    No  , u cannt . But u can do it by changing its PF-STATUS that to by using user exits.
    Regards
    Prabhu

  • IPod Touch Self Selects Menu Items Without Touching Screen - 2nd Gen

    With my iPod Touch sitting flat and motionless on a desk, without even touching it, menu items on the screen are self selecting, as if a ghost were touching the screen and selecting the item. It happens on the lower left portion of the screen on whatever screen is currently displayed. It will continue to select whatever item is in that area of the screen, advancing, or going back, until nothing is in that area of the screen to be selected. This "self Selection" happens at various times, from 1 second to a minute, from when the screen is displayed. Usually at about 5-10 second intervals, but it varies.
    Here is what I have done thus far in attempts to "fix" the problem. None of them have worked and the problem still remains.
    - Restored the iPod from within iTunes (twice)
    - Complete Reset/Erase of the Touch on the unit itself (twice)
    - Ensured the battery was fully charged
    - Synced it with two entirely separate iTunes Libraries on 2 different computers
    - Cleaned the screen VERY well to ensure that no film or residue was on it (it is squeaky clean)
    - Slightly tried to flexed (very gently) the Touch to see if it would change this from happening
    - The shake feature is not the issue (turned off and not touching the iPod Touch)
    - Searched the web pretty thoroughly for answers
    Any thoughts...?
    Message was edited by: Solution Room

    You have the "Halloween Syndrome!!"
    Good news though, it should clear up when Halloween is over with.
    Seriously, it sounds like your screen digitizer needs replacing. Contact a third-party repair service. It will be cheaper to fix that going through Apple.
    Check out the new remodeled MacOSG website! 24-hour Apple-related news & support.
     MacOSG: An Apple User Group  iTunes: MacOSG Podcast  Follow us on Twitter: MacOSG

  • How can I control the order of iDVD menu items using the Arrow keys?

    I have a submenu screen containing 10 selectable buttons plus the Return Arrow button.  I have ordered all the slideshows in the correct order in the DVD map.  However, when I run the program, the arrow keys jump the selection focus in an apparently random sequence.  How can I control the order of the selection focus?
    I'm using iDVD v 7.1.2
    TIA.
    Ron

    Hi
    There is one thing You might miss in iDVD - So do I - the ability to re-arrange in the DVD map (block diagram)
    The order things will be pplayed or addrssed is same as the order each item is introduced into iDVD.
    To my knowledge ther is no way around this.
    Yours Bengt W

  • Can you add audio tracks as selectable menu items on a dvd? I shot a wedding where the church had its own set up to record audio. I'm trying to make those songs performed by the artists available for viewers of the dvd to select for listening.?

    I'm trying to make audio (MP3) tracks available for viewers of this Wedding dvd to select for listening. Is this possible in iDVD?

    You will need to create a slide show for each of those songs with a minimum of 1 photo per slideshow and add the song to the slideshow audio bin. Set the audio to Fit to Music.
    In your top/main menu add a submenu for the list of songs.
    Add a slideshow for each song with the "+" button at the bottom:
    Select the link in the menu and rename it for the song used in the slideshow.  You can create a slide image for each song with the song name, composer, singer, etc. on the image to be used for the slideshow  An image editor or Pages can be used for that and then convert to a jpeg file for use in iDVD.
    The song/playlist menu could look like this depending on the theme you choose:
    OT

  • How can I change the order of menu items using Term Store Navigation?

    A cool new feature in SharePoint 2013 is term store navigation. However SharePoint seems to be ordering my terms (menu tabs) alphabetically. This is not a desired action.
    I tried to enter the terms in the order I wanted them to appear (IE - Home, About, Contact etc. ) but my menus are still sorted by alpha (About, Contact, Home). I have tried to change the order using the interface but it doesn't seem to work.
    Any suggestions on how to obtain the desired effect?  If there is no workaround this feature is practically useless.
    The Web Guy

    Never mind, I just found the custom sort tab hidden away!
    The Web Guy

  • Help Menu item using Snow Leopard 10.6.2

    I used the HELP menu in 10.6.2. When I requested MORE INFO. the computer indicated that I had HELP from Version 10.5. Is that what I shoud be getting or how do I get HELP on Snow Leopard?

    Under ABOUT THIS MAC it definitely says 10.6.2. Tha is why when looking uo something using HELP I was surprised to see 10.5 as the version number. I still have not been able to duplicate how I got there. When I use HELP I get the blue box and am allowed to enter a search term. COMMAND I does not work on the Help screen. Hence--I must have been under an application beyond the FINDER level when I used COMMAND I.
    If I duplicate the sequence, I will post it. Thank you.

  • Group Policy question about setting Start menu items using devices and not users

    I am using Windows Server 2003 and Windows Server 2008 R2 servers set up for use as Active Directory Servers.
    What I am trying to do is lock down thin clients start menu options and I have been able to get this to work down to the user level.  However, what I want to do is have it locked down on the machine level.
    We have multiple users that use both "Thin Clients" with Windows 7 Embedded and we also have them using other PC's with using the same log in.
    So, for example when you create an OU for "Thin Clients", I want thin client devices in there and when people log in to these thin clients then the start menu will be locked down.  I want this to be user independent and thus I don't want Users
    in the OU, but I want to lock down the start menu.
    How can I do this with Group Policy Objects on a domain level?

    Hi,
    you could achieve this using GPO loopback processing. It was designed for the purpose of applying settings from user GPO to a certain group of computers.
    http://technet.microsoft.com/en-us/library/cc978513.aspx
    MCP/MCSA/MCTS/MCITP

  • Can't select menu items in top 25% of the browser window much of the time.

    Running Windows 7 Pro on a new (2-months) HP Ultrabook with FF 15.0.1. Many times, selectable items do not work, but generally in the top 20-30% of the browser window. With the pointer hovering over selections, it does not change to indicate is a selectable item, nor will it let you select. It happens on well-known websites such as Yahoo!, HP, etc. It doesn't do this all the time, but I'd say at least 50% of the time, even if you reload the page and allow all sites with NoScript. There is no filtering warning.

    That problem can be caused by an extension like the Yahoo! Toolbar or a Babylon extension that extents too much downwards and covers the top part of the browser window and thus makes links and buttons in that part of the screen not clickable.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode

Maybe you are looking for

  • Complex query crashing database!

    Hi Our 10g database runs on Windows 2003 (with 32 GB RAM on server). Whenever a user is running a particular complex query, the database just crashes suddenly. In fact, it doesn't write anything in alert log file for any problem. The user starts the

  • 10 dim 1 fact data level restrict

    All, I have 10 dimension tables and 1 fact table. and my Country Dimension table like below data Name,Country A UK B US C MY D SG My requirment is When user "A" logged in,he wants to view only UK country values simillarlly other user data. How will r

  • What is the best lossless compression for video?

    I have a large amount of captured video, which is saved in uncompressed format. I want to archive this video and I need to figure out what the best compression choice is. It's video only and I want the archived materials to be compressed as losslessl

  • Creating EO: The specified schema object name is not an existing object.

    Hi Experts, I am Using Jdev 11.1.2.2 I am connecting to Mysql DB, When am creating a EO with in the same schema, am getting following error: The specified schema object name is not an existing object. Unselect Existing Object or enter an existing sch

  • Setting default from address

    i have a few different e-mail addresses, one for friends and family, one for work, etc. when i start a new message in mail, it seems to choose one of them at random for the "from" address. this is pretty annoying. is there a way to set a default addr