Hello
Here is what I get on my French system :
tell application "OpenOffice" to activate
tell application "System Events" to tell process "OpenOffice"
repeat until exists window 1
delay 0.1
end repeat
tell window 1
properties of UI elements
(*
{{minimum value:missing value, orientation:missing value, position:{198, 108}, class:button, role description:"Bouton de fermeture", accessibility description:missing value, focused:false, title:missing value, size:{14, 16}, value:missing value, help:missing value, enabled:true, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:"AXCloseButton", selected:missing value, name:missing value, description:"Bouton de fermeture"},
{minimum value:missing value, orientation:missing value, position:{238, 108}, class:button, role description:"Bouton de réduction ou d'agrandissement", accessibility description:missing value, focused:false, title:missing value, size:{14, 16}, value:missing value, help:missing value, enabled:true, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:"AXZoomButton", selected:missing value, name:missing value, description:"Bouton de réduction ou d'agrandissement"},
{minimum value:missing value, orientation:missing value, position:{218, 108}, class:button, role description:"Bouton de placement dans le Dock", accessibility description:missing value, focused:false, title:missing value, size:{14, 16}, value:missing value, help:missing value, enabled:true, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:"AXMinimizeButton", selected:missing value, name:missing value, description:"Bouton de placement dans le Dock"},
{minimum value:missing value, orientation:missing value, position:{1704, 108}, class:button, role description:"bouton plein écran", accessibility description:missing value, focused:false, title:missing value, size:{16, 17}, value:missing value, help:missing value, enabled:true, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:"AXFullScreenButton", selected:missing value, name:missing value, description:"bouton plein écran"},
{minimum value:missing value, orientation:missing value, position:{701, 450}, class:button, role description:"bouton", accessibility description:missing value, focused:false, title:"Texte", size:{186, 44}, value:missing value, help:"Chacune des icônes de document ouvre un nouveau document du type spécifié.", enabled:true, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:missing value, selected:missing value, name:"Texte", description:"bouton"},
{minimum value:missing value, orientation:missing value, position:{701, 504}, class:button, role description:"bouton", accessibility description:missing value, focused:false, title:"Classeur", size:{186, 44}, value:missing value, help:"Chacune des icônes de document ouvre un nouveau document du type spécifié.", enabled:true, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:missing value, selected:missing value, name:"Classeur", description:"bouton"},
minimum value:missing value, orientation:missing value, position:{701, 558}, class:button, role description:"bouton", accessibility description:missing value, focused:false, title:"Présentation", size:{186, 44}, value:missing value, help:"Chacune des icônes de document ouvre un nouveau document du type spécifié.", enabled:true, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:missing value, selected:missing value, name:"Présentation", description:"bouton"},
????? {minimum value:missing value, orientation:missing value, position:{701, 624}, class:menu button, role description:"bouton de menu", accessibility description:"", focused:true, title:"Ouvrir", size:{186, 44}, value:"Ouvrir...", help:"L'icône Ouvrir un document présente une boîte de dialogue d'ouverture de fichier.", enabled:true, maximum value:missing value, role:"AXMenuButton", entire contents:{}, subrole:missing value, selected:missing value, name:"Ouvrir", description:""},
{minimum value:missing value, orientation:missing value, position:{1006, 450}, class:button, role description:"bouton", accessibility description:missing value, focused:false, title:"Dessin", size:{186, 44}, value:missing value, help:"Chacune des icônes de document ouvre un nouveau document du type spécifié.", enabled:true, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:missing value, selected:missing value, name:"Dessin", description:"bouton"},
{minimum value:missing value, orientation:missing value, position:{1006, 504}, class:button, role description:"bouton", accessibility description:missing value, focused:false, title:"Base de données", size:{186, 44}, value:missing value, help:"Chacune des icônes de document ouvre un nouveau document du type spécifié.", enabled:true, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:missing value, selected:missing value, name:"Base de données", description:"bouton"},
{minimum value:missing value, orientation:missing value, position:{1006, 558}, class:button, role description:"bouton", accessibility description:missing value, focused:false, title:"Formule", size:{186, 44}, value:missing value, help:"Chacune des icônes de document ouvre un nouveau document du type spécifié.", enabled:true, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:missing value, selected:missing value, name:"Formule", description:"bouton"},
{minimum value:missing value, orientation:missing value, position:{1006, 624}, class:button, role description:"bouton", accessibility description:missing value, focused:false, title:"Modèles", size:{186, 44}, value:missing value, help:"L'icône Modèles ouvre la boîte de dialogue Modèles et documents.", enabled:true, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:missing value, selected:missing value, name:"Modèles", description:"bouton"},
{minimum value:missing value, orientation:missing value, position:{701, 750}, class:toolbar, role description:"barre d'outils", accessibility description:"", focused:false, title:missing value, size:{105, 39}, value:missing value, help:"Cliquez sur une icône pour ouvrir un nouveau document ou une boîte de dialogue de fichier.", enabled:missing value, maximum value:missing value, role:"AXToolbar", entire contents:{}, subrole:missing value, selected:missing value, name:"Tool Bar", description:""},
{minimum value:missing value, orientation:missing value, position:{919, 107}, class:static text, role description:"texte", accessibility description:missing value, focused:false, title:missing value, size:{75, 17}, value:"OpenOffice", help:missing value, enabled:true, maximum value:missing value, role:"AXStaticText", entire contents:{}, subrole:missing value, selected:missing value, name:"OpenOffice", description:"texte"}}
*)
click first menu button
delay 0.2
class of UI elements
--> {button, button, button, button, button, button, button, menu button, button, button, button, button, toolbar, static text}
end tell # window 1
end tell # System Events.
Are you trying to trigger the item which I flagged with “???”
It’s not a pop up button but a menu button.
As you may see, when the script click it, it doesn’t reveal the wanted menu items.
Yvan KOENIG (VALLAURIS, France) dimanche 14 septembre 2014 14:40:24