Applescript why does clicking checkbox not work? - checkbox

I want to using Automator to select first track's solo button in Logic pro.
But The code can't click.
My code
do shell script "osascript -e 'tell application \"Logic Pro\" to activate'"
tell application "System Events"
click checkbox 2 of UI element 1 of group 1 of scroll area 1 of splitter group 2 of splitter group 1 of group 2 of group 2 of window "Untitled 1.logicx - Untitled 1 - Tracks" of application process "Logic Pro X" of application "System Events"
end tell
I also use UI Browser to find button path.
application "Logic Pro"
standard window "Untitled 1.logicx - Untitled 1 - Tracks" (window 1)
group (group 2)
group (group 2)
split group (splitter group 1)
split group (splitter group 2)
scroll area (scroll area 1)
group (group 1)
group (UI element 1)
checkbox (checkbox 2)
UIBrowser
Why does click not work?

Related

How can I spy an active accessibility combobox in blue prism? I want to open the combobox and select an element from it

So I have a combobox for the user to select whether he is an old customer or a new customer. With my process I was able to identify the combobox as an AA element so my process is now able to identify the combobox and click on it when it runs. But the problem starts when I need to select the "new customer" option after opening the combobox. I am unable to identify the option either as a HTML element nor an AA element.Because of this,the process is not able to select an option and throws an error.
What I tried:
I tried an alternative where I added a navigate stage for just the dropdown/combobox and in the properties for this stage I added "select item" as the action and entered the name for the option which in this case is "new customer" along with the item position. This does not work either and throws an error saying "select item" cannot be used for AA whose role is "static text".
P.S: I checked the attributes for the combobox and unchecked the role attribute but that did not work.
My ComboBox is standard HTML Combo Box(Element Type) in Application Modeller. But in Navigation step I use Select Item as Action and in Inputs section I use Item Position as a Number.
Where 0 is first position in combobox, blank. 1 is the first position, in your case it would be "new customer" and 2 would be "old customer".
It works fine in my case.
Hope it helps.
you can use the mode html on the combobox to click then send down key in global key event to choose what you want.

How to make two dropdowns work simultaneously in a winform?

I have 2 dropdown lists in a windows form. First - ProjectName and Second - PartName. When i choose the projectname projectname_selectedIndexChanged is called and it displays the corresponding parts in that project. but when i choose the part no and set the selected item in projectname to that of the selected part, projectname_selectedIndexChanged sub is triggered again. What is a better way to go about this task?

SELENIUM - Dropdowns in popupwindow

My script goes like this - from main page click a button which opens a window with search criteria which contains drop down to select options, when I select values and search in popupwindow, nothing is happening.
it stalls in popupwindow with selected value in dropdown but the search click function doesn't execute.

How do you iterate through menus in AppleScript?

Specifically, when I'm debugging web stuff in iOS, I can start Safari Web Inspectors by clicking on the following menu items in the Safari menu bar:
Develop->iPad Simulator->Safari->my web page's title
Develop->iPad Name(mine is called Summer)->Safari->my web page's title
I'd like to iterate over the Safari menus and activate any items in the Develop menu that contain a common substring I use in my web page titles.
Here's an example. Suppose I want to click the "Show Web Inspector" menu item under the "Develop" menu in Safari. I will first get all of the UIElements in the Develop menu, then iterate over them looking for the UIElement with the proper name. Once found I can click it.
Note that the secret to this is getting the "entire contents" of some UIElement, in this case the Develop menu. That gives me a list of every UIElement in the menu so that I can iterate through them and find whatever I want.
Also note that I have a try block around the if statement. That's because some UIElements don't have a name and it errors, so this just ignores those errors.
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
set developMenu to menu bar item "Develop" of menu bar 1
set allUIElements to entire contents of developMenu
repeat with anElement in allUIElements
try
if name of anElement is "Show Web Inspector" then
click anElement
exit repeat
end if
end try
end repeat
end tell
end tell
tell application "System Events" to tell process "Finder"
set frontmost to true
tell menu 1 of menu item "Arrange by" of menu 1 of menu bar item "View" of menu bar 1
click (menu items where its name contains "a")
end tell
end tell
tell application "System Events" to tell process "Finder"
set frontmost to true
repeat with m in (get menu 1 of menu items of menu 1 of menu bar item "View" of menu bar 1)
set m to contents of m
if m is not missing value then
click (menu items of m where name contains "a")
end if
end repeat
end tell

Setting the TabIndex property of many form controls in Visual Studio?

What is the most efficient way to set/re-order the TabIndex properties of many form controls in Visual Studio? When I change the layout on a large form, or even on initial design, I often wonder if there's a faster way than clicking each individual control then setting the TabIndex in the properties window.
While in Designer mode, select Tab Order from the View menu then click on each control in the order you want. Then remember to turn off Tab Order when you're finished, otherwise when you select a control to do something else you lose the work you've just done (I wish Tab Order would turn off when you Save..)
Bring up the Form in design mode.
Click the View Menu -> Tab Order
Then a little number will show up on each form representing its tab order. Now click each item in order that you want their tab order set.
To bring up the tab order in VS2012 while in Design View Click on the actual form then goto VIEW / TAB ORDER then this will enable the tab order window.
once you have finished changing the tab order go back to VIEW / TAB ORDER this will deactivate the tab order layout
In case some other will have the same issue(you may also see print screens in link):
First step: as you are in Design View of your form in menu go to View and select Tab Order. Second step: on your controls will appear a number that represents the Tab Order of your control. For re - setting tab order press a click in ascending order the controls that want to succeed, including Labels(even they are not selectable). I hope it is very intuitive this step for you too.
Print screens at: http://how-to-code-net.blogspot.ro/2013/06/how-to-set-tab-order-for-controls-in.html

Resources