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: Mon, 6 Nov 2017 10:43:48 +0100
> Le 6 nov. 2017 à 00:40, Jim Underwood <email@hidden> a écrit :
>
> Yvan, David, and Jean-Christophe,
>
> None of your versions work properly for me, running Script Debugger 6.0.5
> (6A205) on macOS 10.11.6:
> There is a long (~5 sec) delay after the "tell menu 1"
> My Emoji menu item is menu item 1
>
> Here is my solution, which may require changing some of the script properties
> based on your system's language:
> http://forum.latenightsw.com/t/how-do-i-select-favorites-on-emoji-symbols-window/727/12?u=jmichaeltx
>
> <http://forum.latenightsw.com/t/how-do-i-select-favorites-on-emoji-symbols-window/727/12?u=jmichaeltx>
>
> My script adds the following features:
> Uses the Emoji menu item in the current app's Edit menu
> Since the position can vary by app, selection is done by name
> Positions the Emoji window near the current mouse or center of window.
> Auto-selects the Emoji Favorites folder
> As you can see it is in the SD6 forum, where I prefer to post because it is a
> real forum, with code blocks, and is very searchable.
>
> If you have questions/issues about my script, I'd prefer you post them in the
> SD6 forum, but I will answer here if need be.
>
> Best Regards,
>
> Jim Underwood
> aka JMichaelTX
>
>
> From: AppleScript-Users
> <applescript-users-bounces+jmichael=email@hidden
> <mailto:applescript-users-bounces+jmichael=email@hidden>> on
> behalf of Yvan KOENIG <email@hidden <mailto:email@hidden>>
> Date: Sunday, November 5, 2017 at 10:20 AM
> To: "ASUL (AppleScript)" <email@hidden
> <mailto:email@hidden>>
> Subject: Re: Show Emoji & Symbols GUI access
>
> 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
I hate code relying upon embedded strings which may be localized so I will
certainly not use your version.
I carefully inserted the instruction displaying the list of available menu
items showing that here, the item dedicated to Emoji is the second one.
If it's the first one on your machine, edit the instruction
> click menu item 2
as
> click menu item 1.
At first I wrote a version supposed to identify the correct item by itself:
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 (first menu item whose name contains
"Emoji")
end tell # menu 1
end tell
end tell
end tell
I dropped it because I'm not sure that "Emoji" is spelled this way in every
localized version of the System.
Yvan KOENIG running High Sierra 10.13.1 in French (VALLAURIS, France) lundi 6
novembre 2017 10:43:43
_______________________________________________
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