• 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: No effect when I click with UI scripting on the sidebar of "Open..." navigation window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No effect when I click with UI scripting on the sidebar of "Open..." navigation window


  • Subject: Re: No effect when I click with UI scripting on the sidebar of "Open..." navigation window
  • From: quark67 <email@hidden>
  • Date: Sun, 5 Nov 2017 03:43:29 +0100

I have found this solution (but strange: why doesn't click behave as expected?):

tell application "Preview"
        tell application "System Events"
                tell process "Preview"
                        --click UI element 1 of row 2 of outline 1 of scroll
area 1 of splitter group 1 of window 1
                        set selected of row 2 of outline 1 of scroll area 1 of
splitter group 1 of window 1 to true
                        --get name of UI element 1 of row 2 of outline 1 of
scroll area 1 of splitter group 1 of window 1
                end tell
        end tell
end tell

If anybody has an explanation, I would like to hear it.

> Le 5 nov. 2017 à 00:15, quark67 <email@hidden> a écrit :
>
> Because of a non-scriptable app, I will use UI scripting to control app.
> On a step of this, I must give a folder to save the output.
>
> For simplicity, suppose the app to control is Preview.app, and the "Open..."
> navigation window is open (go to File > Open... of Preview.app).
>
> I see this (it's on a French system):
>
> <PastedGraphic-32.png>
>
> I want to simulate the click on "Vidéo" on the sidebar of the window.
>
> With:
> tell application "Preview"
>       tell application "System Events"
>               tell process "Preview"
>                       --click UI element 1 of row 2 of outline 1 of scroll
> area 1 of splitter group 1 of window 1
>                       get name of UI element 1 of row 2 of outline 1 of
> scroll area 1 of splitter group 1 of window 1
>               end tell
>       end tell
> end tell
>
> I obtain: --> "Vidéos"
>
> Good (row 2 is the second item of the side bar; for example, row 3 is the UI
> element "Application").
>
> So, I test this:
> tell application "Preview"
>       tell application "System Events"
>               tell process "Preview"
>                       click UI element 1 of row 2 of outline 1 of scroll area
> 1 of splitter group 1 of window 1
>                       --get name of UI element 1 of row 2 of outline 1 of
> scroll area 1 of splitter group 1 of window 1
>               end tell
>       end tell
> end tell
>
> Result: no error, but nothing changes.
>
> I will obtain this ("Vidéos" selected):
> <PastedGraphic-33.png>
>
> How can I obtain this? Thanks.
>
> _______________________________________________
> 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

 _______________________________________________
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

  • Follow-Ups:
    • Re: No effect when I click with UI scripting on the sidebar of "Open..." navigation window
      • From: Christopher Stone <email@hidden>
References: 
 >No effect when I click with UI scripting on the sidebar of "Open..." navigation window (From: quark67 <email@hidden>)

  • Prev by Date: No effect when I click with UI scripting on the sidebar of "Open..." navigation window
  • Next by Date: Show Emoji & Symbols GUI access
  • Previous by thread: No effect when I click with UI scripting on the sidebar of "Open..." navigation window
  • Next by thread: Re: No effect when I click with UI scripting on the sidebar of "Open..." navigation window
  • Index(es):
    • Date
    • Thread