Re: Show Emoji & Symbols GUI access
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