Re: [AS] Cliquer sur un bouton par son nom

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Pascal Rougier via Applescript_fr
Date:  
À: La liste AppleScript Francophone
CC: Pascal Rougier
Sujet: Re: [AS] Cliquer sur un bouton par son nom
Merci beaucoup ça marche nickel


Le retour est

button "Recherche avancée" of group 1 of group 6 of UI element 1 of scroll area 1 of group 1 of group 1 of tab group 1 of splitter group 1 of window "SMARTDATA FOR LEAD" of application process "Safari" of application "System Events »


> Le 17 janv. 2021 à 17:04, Yvan KOENIG via Applescript_fr <applescript_fr@???> a écrit :
>
> tell application "Safari"
>     activate
>     tell application "System Events"

>         
>         tell process "Safari"
>             set frontmost to true
>             set wName to "SMARTDATA FOR LEAD" -- éditer en fonction des besoins ce pourrait être: set wName to 1
>             set btnName to "Recherche avancée" -- éditer en fonction des besoins
>             tell window wName
>                 get class of UI elements --> {… splitter group, …}
>                 tell splitter group 1
>                     get class of UI elements --> {…, tab group, …}
>                     tell tab group 1
>                         get class of UI elements --> {…, group, …}
>                         tell group 1
>                             get class of UI elements --> {…, group, …}
>                             tell group 1
>                                 get class of UI elements --> {…, scroll area, …}
>                                 tell scroll area 1
>                                     get class of UI elements --> {…, UI Element, …}
>                                     tell UI element 1
>                                         get class of UI elements --> {…, group, group, group, group, group, group, …}
>                                         tell group 6
>                                             get class of UI elements --> {…, group, …}
>                                             tell group 1
>                                                 get class of UI elements --> {…, button, …}
>                                                 get name of buttons
>                                                 click button btnName
>                                             end tell -- group 1
>                                         end tell --  group 6
>                                     end tell -- UI element 1
>                                 end tell -- scroll area 1
>                             end tell -- group 1
>                         end tell -- group 1
>                     end tell -- tab group 1
>                 end tell -- spitter group 1
>             end tell -- window Wname            
>         end tell -- process Safari
>     end tell -- application System Events
> end tell -- application Safari


_______________________________________________
Applescript_fr mailing list
Applescript_fr@???
http://listes.patpro.net/mailman/listinfo/applescript_fr