• 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: Show Emoji & Symbols GUI access
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Show Emoji & Symbols GUI access


  • Subject: Re: Show Emoji & Symbols GUI access
  • From: Jim Underwood <email@hidden>
  • Date: Mon, 6 Nov 2017 22:11:34 +0000
  • Thread-topic: Show Emoji & Symbols GUI access

Yvan,

Please see my replies below.

Best Regards,

Jim Underwood
aka JMichaelTX


From:  Yvan KOENIG <email@hidden<mailto:email@hidden>>
Date: Monday, November 6, 2017 at 3:43 AM
To: "ASUL (AppleScript)"
<email@hidden<mailto:email@hidden>>
Subject: Re: Show Emoji & Symbols GUI access

I hate code relying upon embedded strings which may be localized so I will
certainly not use your version.

I don't think I "hate" any code, but, as we all do, I do have my preferences.  😉
IAC, I did recognize the need for localization, so that's why I put the
relevant strings as properties, easily changeable:

________________________________
property validEmojiMenuNames : {"Emoji & Symbols", "Special Characters...",
"Emoji et Symboles"} -- name as appears in Edit menu property groupName :
"Favorites" -- Emoji Folder to be selected
________________________________

The issue is that that menu item of interest may not always be in the same
location.  So, the user of the script will need to change either menu item name
(as in my script) OR, the menu item number (as in your script).
Either way, the script user may need to make a change.


I carefully inserted the instruction displaying the list of available menu
items showing thathere, 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.
The change required by the user of your script.


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

This script works, but as I noted earlier, it has a ~5 sec delay after the
"tell menu 1" command.
This delay makes your script unusable for me.
My script does not have this delay.

I'm running Script Debugger 6.0.5 (6A205) on macOS 10.11.6


 _______________________________________________
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: Show Emoji & Symbols GUI access
      • From: Thomas Floeren <email@hidden>
References: 
 >Show Emoji & Symbols GUI access (From: Jean-Christophe Helary <email@hidden>)
 >Re: Show Emoji & Symbols GUI access (From: 2551phil <email@hidden>)
 >Re: Show Emoji & Symbols GUI access (From: Jean-Christophe Helary <email@hidden>)
 >Re: Show Emoji & Symbols GUI access (From: Jean-Christophe Helary <email@hidden>)
 >Re: Show Emoji & Symbols GUI access (From: 2551phil <email@hidden>)
 >Re: Show Emoji & Symbols GUI access (From: Yvan KOENIG <email@hidden>)
 >Re: Show Emoji & Symbols GUI access (From: Jean-Christophe Helary <email@hidden>)
 >Re: Show Emoji & Symbols GUI access (From: Yvan KOENIG <email@hidden>)
 >Re: Show Emoji & Symbols GUI access (From: David Gregg <email@hidden>)
 >Re: Show Emoji & Symbols GUI access (From: Yvan KOENIG <email@hidden>)
 >Re: Show Emoji & Symbols GUI access (From: Jim Underwood <email@hidden>)
 >Re: Show Emoji & Symbols GUI access (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Show Emoji & Symbols GUI access
  • Next by Date: Re: What is Best Method To Determine Duplicate Items in a Large List?
  • Previous by thread: Re: Show Emoji & Symbols GUI access
  • Next by thread: Re: Show Emoji & Symbols GUI access
  • Index(es):
    • Date
    • Thread