• 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: 2551phil <email@hidden>
  • Date: Sun, 5 Nov 2017 11:08:45 +0700

> On 5 Nov 2017, at 10:15, Jean-Christophe Helary
> <email@hidden> wrote:
>
> But, running this does not display the Emoji viewer…


You have to use ‘perform’ and you have to click the ui element in the status
bar first.

This works here, but note the element number for me is 11; the element number
can change depending on both what’s currently in the status bar and whether the
user has moved things around (on Sierra, you can command-drag these status bar
item into different positions).


tell application id "com.apple.systemevents" -- System Events
        tell its application process "SystemUIServer"
                tell its UI element 1
                        tell its UI element 11 -- this number will vary by
position
                                perform action "AXPress"
                                delay 0.5
                                tell its UI element 1
                                        tell its menu item "Show Emoji &
Symbols" -- this menu name will vary by system language
                                                perform action "AXPress"
                                        end tell
                                end tell

                        end tell
                end tell
        end tell
end tell


ps. You shouldn’t include the ASObjC import statements if you’re not actually
using them.



Best


Phil
@sqwarq

 _______________________________________________
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: Jean-Christophe Helary <email@hidden>
References: 
 >Show Emoji & Symbols GUI access (From: Jean-Christophe Helary <email@hidden>)

  • Prev by Date: Re: No effect when I click with UI scripting on the sidebar of "Open..." navigation window
  • Next by Date: Re: Show Emoji & Symbols GUI access
  • Previous by thread: Show Emoji & Symbols GUI access
  • Next by thread: Re: Show Emoji & Symbols GUI access
  • Index(es):
    • Date
    • Thread