Re: Show Emoji & Symbols GUI access
Re: Show Emoji & Symbols GUI access
- Subject: Re: Show Emoji & Symbols GUI access
- From: Yvan KOENIG <email@hidden>
- Date: Sun, 5 Nov 2017 17:20:35 +0100
> Le 5 nov. 2017 à 17:01, David Gregg <email@hidden> a écrit :
>
> Yvan and Jean-Christophe,
>
> This is in-line with Yvan’s solution. I have found that triggering menu items
> in any application doesn’t seem to need the app to be frontmost. So in that
> way they act as if any app has that feature built in like a script dictionary.
>
> I believe you should be able to trigger any of the SystemUIServer items by
> just setting the value of the attribute “AXDescription" to the appropriate
> description for that menu bar item.
>
> tell application "System Events"
> tell process "SystemUIServer"
> set keyboardExtras to first item of (menu bar items of menu bar
> 1 whose value of attribute "AXDescription" = "text input")
> tell keyboardExtras to perform action "AXPress"
> end tell
> end tell
Hello
It's a neater way to identify the menu bar item to trigger but to get the
entire job done I had to edit as :
tell application "System Events"
tell process "SystemUIServer"
set keyboardExtras to first item of (menu bar items of menu bar
1 whose value of attribute "AXDescription" = "text input")
tell keyboardExtras
perform action "AXPress" # Reveal the menu items
tell menu 1
--name of menu items --> {"Afficher le
visualiseur de clavier", "Afficher les Emoji et symboles", missing value,
"Ouvrir les préférences Clavier…"}
click menu item 2
end tell # menu 1
end tell
end tell
end tell
Yvan KOENIG running High Sierra 10.13.1 in French (VALLAURIS, France) dimanche
5 novembre 2017 17:19:23
_______________________________________________
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