Skip to content

Instantly share code, notes, and snippets.

View clemsam's full-sized avatar

ClemSam Lang clemsam

  • atHome
  • Frankfurt, Germany
View GitHub Profile
URL: https://apple.stackexchange.com/questions/340942/applescript-how-can-i-get-ui-elements-names-attributes-properties-classe/
When I started to search for an AppleScript's generic way to "click onto Safari's context menu" of a selected item, there were a lot of questions on "how-to" on several levels of nomenclature.
How can I, without having to use Accessibility Inspector, investigate what "categories" of AppleScript UI elements an application is offering and what additional details AppleScript knows about them?
ANSWER 1:
This is a "study" –an *attempt*– to find pragmatic ways to identify and "use" AS's UI elements:
------------------------------------------------------------------------
{"title": "Mission control, elaborate",
"rules":[
{ "description": "Mission control, elaborate; requires Ctrl, Shft & arrows. Was created to make movements in Mission Control 'key-able', but works in all apps.",
"manipulators": [
{ "from": {
"key_code": "right_arrow",
"modifiers": {
"mandatory": ["control",
"shift"] } },
"to": [
@clemsam
clemsam / How 2: APPLE Safari download window with full names (AppleScript Sys-Events etc.)
Last active December 14, 2015 22:50
APPLE Safari: wider downloads window w. full file names, using AppleScript, "System Events" and folder action scripts
My workaround solution for a wider "downloads window" (naturally hiding vital information in longer
file names, e.g. *.otrkey files) uses applescript to directly ACCESS "Downloads.plist", and places
a link in Safari's favorites bar:
First you save these scripts into "~/Library/Scripts/Folder action scripts/" folder, next you attach them
(context menu: configure folder actions) to a new "Folder1" somewhere deep down on your Mac.
To activate them, you will address a (meaningless) dummy "Folder2" inside "Folder1" thru this bookmark:
file:///Path/to/first/Folder1/Folder2 [place link in your favorites bar!]
@clemsam
clemsam / How to adapt desktop according to "personal" UI ideas in MacOSX-10.4 ;-)
Last active November 29, 2015 10:50
defaults write ... / com.apple.finder.plist / DesktopViewSettings / etc.: Tiger-OS Mac OS X 10.4 e.a.
All of the default tweaks listed here can be done via Terminal or via PropertyListEditor, an Apple Developer's Tool.
(Some -very few- of these tweaks may only show after system restart.)
# On my oldie iBook-G3, Tiger-OS 10.4.11, this is how you switch desktop icons to have 2 name lines:
defaults write com.apple.finder FXMaximumLabelLines -int 2; killall Finder
# Next, if you'd like to have icon text to the RIGHT on your desktop (BELOW= botm), too,
defaults write com.apple.finder DesktopViewOptions -dict-add PropertiesLocation rght; killall Finder
# Now here's s.th. I "transferred" from finder's iconViewOptions to my desktop view