Click UI element

Hello,
I would like to click combo box (similar textedit font size) using apple script but I don't have idea how to finish script because UI button does't have its identifier. Accessibility tool shows folowing:
tell application "System Events"
          tell process "application"
                    set NewWindow to (a reference to window "Untitled") #on the main window's tool bar the button exists
                    set NewWindowContent to entire contents of NewWindow
                    repeat with NewWindowContent in NewWindowContent
         how to finish?
                    end repeat
          end tell
end tel
thanks for reply

Unfortunately, a lot of the UI items don't have an identifier that you can use, so in those cases you can use an index, for example "button 3 of group 2 of window 1" or whatever.  A method I've found that works fairly well is to use the Accessibility Inspector to get a general idea of where to go, then get all of the particular elements at a spot in the hierarchy to narrow down the items, for example
tell application "System Events" to tell process "some application"
    get buttons of window 1
end tell
Then you can look at individual items to see if it is what you are looking for, and go from there:
get properties of button 1 of window 1
Usually you have to click first on a combo box or popup button to get it to show its menu, then you can see the menu hierarchy.

Similar Messages

  • Since upgrading to Mail 7.0 the menu popup from right clicking an element in an email has changed.

    Since upgrading to Mail 7.0 the menu popup from right clicking an element in an email has changed.  There is now only a short three item menu:
    Previously there was a longer menu (like the one when right clicking an item on a Safari page):
    I've looked in Preferences and at all the Mail dropdown items but can't find any way to get the old menu back (or why it changed).  In particular, I miss the "copy image" item which allowed me to copy an item image into a new email for forwarding.  I've got two email accounts, an IMAP and a POP.  The behavior is the same with both.
    Any ideas?
    Thanks,
    Richard

    Your screen shots are not visible to me.  But I think I understand your question.
    Several thoughts come to mind:
    rbhix wrote:
    In particular, I miss the "copy image" item which allowed me to copy an item image into a new email for forwarding.
    You can still, of course, simply forward the entire email message containing the image.
    You could also use the "Save Attachment ..." feature available when you right click and copy and paste from there once the image is saved.
    Less likely, you could also use the "Share" feature available when you right click, though I suspect it may not offer sharing options that you would like.

  • Right click Inspect element problem

    Hello,
    I am using Developer Tools in Safari on daily basis, but what really bothers me is the fact, that when you right click an element and select "Inspect element" from dropdown menu, Resource Browser is opened but the actual line of code is not focused. What is focused is the last line of code you have inspected before.
    Could this be fixed by Apple? Before I started using Macbook, I was using Google Chrome and this feature works there just fine.
    Thank you in advance.

    Hi ...
    Try here > Safari Web Inspector Guide: About Safari Web Inspector

  • Clicking an element in a list doesn't work

    Sorry about my rather vague subject - my problem is not so easy to sum up in a few words.
    I am working on an application that
    - Displays a list of items from a MySQL table
    - Each item should be clickable, and on clicking should open an edit page with the clicked item pre-loaded
    This must have been done millions of times before and should be simple. It doesn't work, presumably because I know too little. This is what I have done:
    The clickable item list looks like this (without all the trimmings):
    <h:dataTable id="users" value="#{userlist.userList()}" var="ul">
    <h:commandLink action="#{ul.edituser}" value="#{ul.uid}"/>
    This displays a list of the right sort of items, but the clickable item (the UID) doesn't do anything. Also, the resulting html looks the same no matter what I put into the action element - this is the inside of the a-tag:
    href="#" onclick="mojarra.jsfcljs(document.getElementById('j_idt9'),{'j_idt9:users:1:j_idt15':'j_idt9:users:1:j_idt15'},'');return false"
    I'm not entirely sure what that means; all I know is that it does not call the edituser() method.
    But what is the right way, then? I haven't found any examples that highlight this particular situation although it must be used all the time, I expect.

    #{userlist.userList()
    #{ul.edituser}Spot the difference there. I do believe "ul" should be "userlist"; in other words it will link to an action method "edituser()" in a JSF managed bean which I assume will be named Userlist. Its really simple when you run into the problem of an action method not working: 99/100 times the action method EL declaration is wrong. Now it could be typo, but I've been known to forget the #{} part too...
    I use the JBoss Tools Eclipse plugin myself; it has nice JSF additions that add EL validation and autocompletion to the editor. That way I know already from the code view when I've made a mistake in stead of "at runtime". A missing action method turns up as a warning in the jsf editor for example. That is of course only helpful when you're actually using Eclipse ;)

  • Clicking FLASH elements in the Web Browser

    The website that I am working on has numerous FLASH elements
    in it and I was wondering if there is anyway to make it so that
    users browsing the site with Internet Explorer do not have to click
    on the FLASH elements before navigating the site. Any help or
    suggestions would be appreciated.

    Go find SWFObject... PS - this has been this way for like
    three years now...
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Right Clicking JList Elements

    I must preface this thread with the following: I have looked far and wide for answers and have come up dry, despite the Java Tutorials, other threads I looked through, threads that exist about this very issue that I apparently cannot locate, and all applicable APIs.
    My issue is regarding the JList and right clicking within it in order to bring up a JPopupMenu; in turn, its JMenuItems should be able to alter the contents of the JList as defined in the subsequent, applicable code (whether that be deleting, changing properties of the item in question, or replacing it with another from some other source). I have come across the getComponent() method (<I>not</I> a getJComponent() method, which doesn't exist, except for in an Interface JBOField...whatever that is...). And though JList is a type of component, it would seem that its elements, on which I'd like to be able to right click, are not actual components; rather, they would be handled by a ListSelectionModel, or so I think. That said, the ListSelectionModel may aid in changing list contents, but will not help in the actual selection of those by right clicking.
    Nevertheless, here is the code in question (with the appropriate and hopefully helpful annotations):
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class IngredientsListPopupMenu implements ActionListener {
         // constants for JPopupMenu
         private static final String MENU_NAME = "Selected Ingredients List";
         private static final String ITEM_1 = "Edit Quantity";
         private static final String ITEM_2 = "Delete Ingredient";
         private static final String ITEM_3 = "Replace Ingredient";
         private JPopupMenu listPopupMenu;
         /* all of this "hubbub" below is part of the formatting I learned for
                classes with multiple constructors perhaps it's considered too cumbersome?  */
         public IngredientsListPopupMenu() {
              this(new JPopupMenu(MENU_NAME));
         public IngredientsListPopupMenu(JPopupMenu jpm) {
              createPopupMenu(jpm);
         public void createPopupMenu(JPopupMenu jpm) {
              jpm.add(createMenuItem(ITEM_1));
              jpm.add(createMenuItem(ITEM_2));
              jpm.add(createMenuItem(ITEM_3));          
              this.listPopupMenu = jpm;
            private JMenuItem createMenuItem(String s) {
              JMenuItem jmi = new JMenuItem(s);
              jmi.addActionListener(this);
              jmi.addMouseListener(mouseListener);
              return jmi;
         /* listens for mouse activity and shows menu if not already open
             otherwise detects mouse activity for selecting menu items
                AND here is where it gets "hairy"! */
         private Component selectedComponent; /* not JComponent due to method call below.
            I'm led to believe that there's nothing wrong with this variable type in and of itself,
            whether or not I'm dealing with "Components" v. "JComponents" */
         private MouseListener mouseListener = new MouseAdapterTest();          
         class MouseAdapterTest extends MouseAdapter {     
              public void mousePressed(MouseEvent e) {
                   checkPopup(e);
              public void mouseClicked(MouseEvent e) {
                   checkPopup(e);
              public void mouseReleased(MouseEvent e) {
                   checkPopup(e);
              private void checkPopup(MouseEvent e) {
                   if (e.isPopupTrigger()) {
                        selectedComponent = e.getComponent(); /* gets the type of (in this
                                    case) JComponent, which is rather general (and probably meant more
                                    for when one is dealing with more than one type of component?), as I
                                    do not know how to refer to an element in a JList here with this particular
                                    method, which is probably not the way to go... */
                        listPopupMenu.show(e.getComponent(), e.getX(), e.getY());
         public void actionPerformed(ActionEvent e) { // applies action on selected JComponent from checkPopup method above
              String selection = e.getActionCommand(); // assigns JPopupMenu's selected text to a String
              /* empty conditional statements due to them not being completely necessary
                        at this point, as I'd like to make sure the JPopupMenu displays properly before
                        writing the code for them */
                    if (selection.equals(ITEM_1)) {
                   // open up dialog to edit quantity
              } else if (selection.equals(ITEM_2)) {
                   // delete ingredient from JList
              } else if (selection.equals(ITEM_3)) {
                   // open up dialog to replace ingredient with another
         public JPopupMenu getMenu() { // for a JScrollPane class
              return this.listPopupMenu;
    }In closing, I guess my question is: how do I take what I've got here and get that JPopupMenu to work with JList elements?

    Actually, I found out on my own that I did not need the public int locationToIndex(Point location) at all.
    The issue was concerning the mouseListener and actionListener implementations. All's well now! Thanks, anyway.

  • Capture click on element inside List itemRenderer

    Hello!
    I have a List that opens a window when an element is selected.
    However, I also have a "delete" image in the upper-right corner of the itemRenderer componenet that when clicked should do something else.
    How can I make it so that when user clicks on the image the click doesn't select the list element, and when the user click anywhere else, it defaults to selecting the element in the list.
    Thank you!

    Yeah, I did that right after posting and the problem was that the List select event dispatched on MouseDown NOT on click and I was listening for Click on the image which never happened as the MouseDown came first and opened another window.
    Is there any easy way to setting the selection of elements in a list to be Click rather than MouseDown?
    If not, I will just listen for MouseDown on the image.

  • Click every element in a window via GUI Scripting

    Hi, I'd like to iterate through every element on an iTunes window and try to click on each element.
    I'd also like to write to a text file showing each element that I've clicked.
    The code that I wrote below isn't working. Specifically, I get the error *process "iTunes" doesn’t understand the clickanelement message.*
    Thoughts on what I'm doing wrong?
    Thanks!!
    tell application "iTunes" to activate
    tell application "System Events"
    tell process "iTunes"
    set elements to get entire contents of window "iTunes"
    repeat with i from 1 to (length of elements)
    set ele to item i of elements
    clickanelement(ele)
    showwhat_youclicked(ele)
    end repeat
    end tell
    end tell
    -------handlers------------
    to clickan_element(anelement)
    tell application "iTunes" to activate
    tell application "System Events"
    tell process "iTunes"
    try
    click an_element
    end try
    end tell
    end tell
    end clickanelement
    to showwhat_you_clicked(thing_totype)
    tell application "TextEdit" to activate
    tell application "System Events"
    tell process "TextEdit"
    keystroke thingtotype
    key code 36
    end tell
    end tell
    end showwhat_youclicked

    I don't know what you're trying to do, but Welcome to Apple Discussions!
    You can started like this, but I think the first click is going to close the iTunes window!
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;">
    tell application "iTunes" to activate
    tell application "System Events"
    tell process "iTunes"
    set elements to get entire contents of window "iTunes"
    repeat with anElement in elements
    try
    click anElement
    end try
    end repeat
    end tell
    end tell
    end </pre>

  • How to open a new page from a Spry Table click, with element info?

    Hello, Spry experts!
    This is probably simple, but I've searched for hours and can't find what I need. I'm using Dreamweaver CS4 and Spry 1.6.1 to create a simple Spry Table from an XML data set using PHP as my back end.  I've used Dreamweaver's Insert->Spry->Spry Data Set to create everything, and the table is working fine.  Colors, clicks, sorts, etc., are all working correctly as expected.
    What I want is to be able to add a behavior such that when a table row is clicked, I can open a new page.  Moreover, I want to pass a parameter from the table to the new page, like http://www.mydomain.com/newpage.php?aid=12345 or whatever.
    So, for example, my table has two columns, "a_id" and "a_name", and my repeat region looks like this:
    <div spry:region="xml_assignments">
    <table width="500">
    <tr>
    <th spry:sort="a_id" class="spry_header">ID</th>
    <th spry:sort="a_name" class="spry_header">Assignment</th>
    </tr>
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select">
    <td>{a_id}</td>
    <td>{a_name}</td>
    </tr>
    </table>
    </div>
    What I want is to be able to open an entirely new URL, passing the value of the {a_id} in the selected row as a parameter to the new URL, as in something like:  http://www.mydomain.com/newpage.php?aid={a_id}
    So my questions are: 
    1. How best to apply the action to the table?  Add an onclick to the tr tag?  Something else?
    2. How to extract the {a_id} value from the current row and pass it as a parameter to the action?
    Or maybe just take another approach entirely?
    I know that I can make the actual text in the table cells hyperlinks, and use them to link to the new page, which is fine.  The desire here is just to make it so that the user can click "anywhere" on the table row (as they can currently do with the spry:select behavior) and have the link kick off, whether they actually click on the linked text or somewhere in the row where there is no text.
    I'm sure this is obvious and simple, but I'm new to this level of Spry detail, and my brain is fried from hunting.  Any guidance will be gratefully appreciated!
    Glen Barney

    I found the answer myself, after posting this, of course!
    I changed:
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select">
    to
    <tr spry:repeat="xml_assignments" spry:setrow="xml_assignments" spry:odd="spry_odd" spry:even="spry_even" spry:hover="spry_hover" spry:select="spry_select" onclick="window.location.href='./newpage.php?aid={a_id}';">
    Basically just added the onclick parameter...
    And it all just worked!

  • I have an HP laptop preloaded with Adobe Premiere Elements 10. For whatever reason Elements will "run" on click, but not even open the load screen or anything and then act like I never tried to open it? whats going on?

    I bought my HP laptop in 2012, and it came preloaded with Adobe Premiere and Photoshop Elements 10
    It worked fine and I even made a few video edits back in 2012 but for the last year Elements just REFUSES to work properly
    I used to be able to open elements to at least the "what do you want to do?" screen
    But now It won't even open this...I have no idea why...
    If I double click the Elements application my computer slows down, bracing itself to load, and then ....thats it....it reverts to its normal speed and elements just doesn't open...
    Any help would be great cause I feel like I've exhuasted all self-troubelshooting options and need to either get help from the forums or take the laptop in before I smash it in rage

    thrillhousecody
    Thanks for the reply with additional information.
    Recent history for Premiere Elements points to the program having problems when more than 1 video card/graphics card is
    being used by the computer on which Premiere Elements is running. This observation may seem contra indicated by the fact
    that you say that the program did work well about 2 years ago in the same setup. But other factors may have set in with regard
    to drivers, drivers versions, and driver conflicts. But this factor, does need to be ruled in or out.
    Can you disable one or the other card to determine the impact of this on your problem?
    But, of prime concern with regard to video card/graphics card is the use of a NVIDIA GeForce card with Premiere Elements 10.
    Even if your NVIDIA GeForce were the only card, Premiere Elements 10 will not work properly unless the NVIDIA GeForce driver
    version is rolled back to about May 2013. This may be one of the major factors here.
    a. Device Manager/Display Adapters and find out Driver Version and Driver Date
    b. Read the background information for the Premiere Elements 10/NVIDIA GeForce issue
    ATR Premiere Elements Troubleshooting: PE10: NVIDIA Video Card Driver Roll Back
    Also see the Announcement at the top of this forum regarding the matter - also with full details of the situation and how to fix with the
    driver version roll back.
    Please review and consider and then we can decide what next.
    Thanks.
    ATR
    Add On...This NVIDIA GeForce situation is specific for Premiere Elements 10. You should not expect to see the problem for
    later versions of Premiere Elements.

  • Double click event on a specific element in a FrameMaker document

    Using the Notification/Notify (FA_Note_PostMouseCommand/FA_Note_PostMouseCommand), I can check where in the structure or which element was clicked and if a specific element was clicked, a dialog window opens to perform certain actions. But I would like to have that action occur only on a double click.
    Any suggestions?
    Thanks,
    Trent Schwartz

    This seems to work with FrameMaker 12:
    #target framemaker
    setupNotifications ();
    function setupNotifications () {
        // Set notifications for after mouse command.
        Notification(Constants.FA_Note_PreMouseCommand, true);
    function Notify (note, object, sparam, iparam) {
        // Handle the mouse events.
        switch (note) {
            case Constants.FA_Note_PreMouseCommand :
            if (iparam === 16777269) {
                alert ("double-click on element");
            break;

  • Determine cluster element clicked in mouse down event

    Is there anything similar to the ArrElem Property Node, that allows a user to detect which element in an array has been clicked on (mouse down event), but for a cluster?
    It seems the only way I can detect which sub-cluster in my main cluster (see attachment) has been clicked on, is to work out the screen coordinates of each element and compare that to the mouse coordinates of the click - is there any other (better) way?  There's is going to be eight of these main clusters all stacked vertically.
    NOTE: All sub-clusters in the main cluster are disabled so that nothing "pops-up" when the user clicks on an object.
    I was thinking of using an array of clusters, but I need the ability to set various properties (eg. blinking) for each individual object.
    Chris
    Attachments:
    Lane Bays.ctl ‏80 KB

    That's not bad Ben - thanks.
    I made up a quick VI based on your solution which works great if I have one cluster, but if I have eight+ Main Clusters I have to repeat this Event eight+ times - no?  I was wondering if there was a more scalable solution?
    I suppose I could just lump ALL the sub-clusters into one massive Main Cluster, but the text string for that Event is going to be very, very long eg. "Main Cluster.Cluster1"....."Main Cluster.Cluster24": Mouse Down
    Chris
    Attachments:
    Get Clicked Cluster Element.vi ‏13 KB

  • Creation of Data Element

    Hi,
    I am working on special project of Automation of all utility billing and housing system for a big company in SAP.
    For that I have to create 26 tables and obviously I am creating a lot of dataelements.
    Now the problem is my quality dept says that I should use the inbuilt data elements and refrain from creating new ones. In this case the field label is not matching my field. He says that who is going to see the table and says that you can change the field description in reports as you like. Is it justified.
    I can see that there are more than 500 standard datalements created for  a char field of length 4 by SAP. but none of the description matches my field description. if the case is of reducing the load then does sap recommend not to create z data elements. 
    Can we create dataelement just for the sake of field label and what is the other purpose of a dataelement if not
    How much load will be generated by creating a dataelement.
    kindly give some insight into the need to create dataelements.

    Hi!
    If your Quality people are that much particular about creation of data elements, there is one way to solve this problem. Use standard data elements.
    I know here you will get a doubt that after creating a maintenance generator you will not be able to see the description whatever you want in SM30. For this follow the below procedure.
    While creating maintenance generator you will give the function group name right, go to SE80 -> and give the function group name there -> double click on the screen number of maintenance -> click on element list tab -> click on 'Texts/I/O templates' tab -> now against the field names under 'Text or I/O Field' column remove the value '+____________' and type the field description there -> repeat the procedure for all the fields -> now save, check and activate the screen as well as function group.
    Now if you go to SM30, you can see the field description for every field.
    This is somewhat time consuming, but it may help you.
    Reward points, if useful.
    Regards,
    Venkat.

  • How do you determine the index of an element in a cluster?

    I've got a small program that I put together, as I'm just trying to get up to speed on Labview.  I have a cluster boolean buttons and for some reason the top buttion is coming through as Index 3.  There are four buttons in the cluster, but for some reason, there's been a shift.  The top one should be Index 0.  How do I get things corrected?  I can't see how to determine the index of each button through Properties.
    Thanks
    Solved!
    Go to Solution.

    You can change the order required by just clicking the element by using a unbundle

  • Adobe Premiere Elements 10 has stopped working Windows 7 Error Message - Can someone help?

    Hello Everyone,
    I wanted to checkout the new version of Adboe Premiere Elements 10 for doing some film editing so I downloaded the Trial Version using the Adobe Download Manager.  Upon installation, I double-clicked the Elements icon and after a few seconds of trying to open, I get the following:
    After surfing the web, I followed several steps to ensure I had all of the latest drivers for audio/video components and the latest version of QuickTime.  I uninstalled and re-installed Elements 10 and ensured that my virus protection was turned off. 
    I am still getting the same error.
    Can anyone help?
    Thank you in advance!
    Will

    Will,
    Welcome to the forum.
    This ARTICLE has a checklist on getting PrE to work well on one's computer, and then it goes into tuning the computer and OS. Last, there are linked articles on troubleshooting, and on many aspects of one's computer and OS, when the general tune up tips do not fix things. If the checklist, and tuneup tips do not help, then step through the troubleshooting tips, one at a time, as they work up in "degree of difficulty."
    Good luck,
    Hunt

Maybe you are looking for

  • More than one portal on a single instance of EP

    Hi, I would like to know what is approach that is generally followed for hosting more than one portal on a single instance of enterprise portal server. We have a similar requirement. What about database considerations? Can we use the same database fo

  • Gong nuts trying to replace a hard drive on an early 2008 IMAC

    Hi All, I'll try to be brief.  I thought we were having hard drive issues, because if we tried to reboot once warm we just get the folder with the flashing ?  SOmetimes the computer would go days before it was kind enough to reboot. I managed to keep

  • Can't add transitions

    I have had no problem using imovie over the last few months but suddenly the add / update facility for transitions is not working. All the other editing functions seem fine but I can't drag and drop transitions anymore, or click Add and can't work ou

  • Problems starting GUI

    Hello all I am new to Solaris. I'm very excited about Solaris and I'm considering studying for the first Solaris exam. I have about 10 years experience in x86 based operating systems, so thats my base. MY ISSUE: I was installing Solaris ontop of a VM

  • Connect to the BPEL PM from another server

    Hi, i try to connect to the bpel PM from another oc4j server (i tried also tomcat with the same result) .. i have almost the same code as in samples\tutorials\102.InvokingProcesses\rmi : Properties props = new java.util.Properties(); ClassLoader load