Thanks Nigel.
Here, 10.12.4, properties compile but fails at execution.
every property refuse to compile.
I am forced to ask for every property by its name.
Below is a piece of GUI scripting code which may help.
tell application "System Events" to tell process "Notes"
set frontmost to true
tell window 1
class of UI elements --> {splitter group, button, button, button, toolbar}
tell splitter group 1
class of UI elements --> {button, scroll area, splitter, splitter group}
tell splitter group 1
class of UI elements --> {group, splitter, group}
# not for us
tell group 1
class of UI elements --> {scroll area}
tell scroll area 1
class of UI elements --> {table}
tell table 1
class of UI elements --> {row, row, row, column}
tell row 1
class of UI elements --> {UI element}
class of UI elements of UI element 1 --> {image, image, static text, static text, static text, image}
value of every static text of UI element 1 --> {"trucmuche", "2 pièces jointes", "vendredi"}
end tell -- row 1
tell row 2
class of UI elements --> {UI element}
class of UI elements of UI element 1 --> {image, image, static text, static text, static text, image}
value of every static text of UI element 1 --> {"tartempion", "Pas de texte supplémentaire", "17/02/2016"}
end tell -- row 2
tell row 3
class of UI elements --> {UI element}
class of UI elements of UI element 1 --> {image, image, static text, static text, static text, image}
value of every static text of UI element 1 --> {"azerty uiop", "Son of a .", "18/09/2015"}
end tell -- row 3
tell column 1
class of UI elements --> {}
end tell -- column 1
end tell -- table 1
end tell -- scroll area 1
end tell -- group 1
tell group 2
class of UI elements --> --> {static text, scroll area}
tell scroll area 1
class of UI elements --> --> {text area, scroll bar}
tell text area 1
class of UI elements --> {UI element, UI element}
tell UI element 1
description --> "image jointe, grande"
position --> {1807, 316}
size --> {300, 601}
value of attribute "AXValueDescription" --> "bordereau Chronopost.jpg"
end tell -- UI element 1
tell UI element 2
description --> "fichier joint"
position --> {1807, 933}
size --> {292, 72}
value of attribute "AXValueDescription" --> "test Shane.scptd, 13 Ko"
end tell -- UI element 2
end tell -- text area 1
tell scroll bar 1
class of UI elements -->{value indicator, button, button, button, button}
class of UI elements of value indicator 1 --> {}
subrole of buttons --> {"AXIncrementArrow", "AXDecrementArrow", "AXIncrementPage", "AXDecrementPage"}
properties of button 1 --> {minimum value:missing value, orientation:missing value, position:{2167, 260}, class:button, role description:"Flèche d'augmentation", accessibility description:missing value, focused:missing value, title:missing value, size:{0, 0}, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:"AXButton", entire contents:{}, subrole:"AXIncrementArrow", selected:missing value, name:missing value, description:"Flèche d'augmentation"}
end tell -- scroll bar 1
end tell -- scroll area 1
end tell -- group 2
end tell
end tell
end tell
end tell
It may be used with cliclick to double click every attachment (the UI elements for which I grab position and size).
Doing that open pictures in Preview
it open scripts in our current editor .
so that we may save them as we want.
It’s awful but at least it would do the job.
It seems that it would be a good idea to file a bug report to Apple engineers.
After all, they corrected the bug forcing us to use close access (open for access thisFile) when driving many applications, maybe they would be fair enough to kill one striking upon an Apple one.
Yvan KOENIG running Sierra 10.12.4 in French (VALLAURIS, France) jeudi 30 mars 2017 17:14:08