KniazidisR wrote:
I am able to find many references to the window components as well as their tabs by perusing the UI elements. I was able to extract such things as filename, tab quantity, script contents, etc. But not the tab’s filepath which I think would be a good clue.
Since the windows and their tabs exist, so too must their code. Here are some pieces I dug up…
tell application "System Events"
tell application process "Script Editor"
set w to window 2
#tell w to return properties of UI element 1 --
tell w to set theAXSplitGroup1 to splitter group 1 of splitter group 1
#tell w to return UI elements of theAXSplitGroup1
#tell w to return properties of theAXSplitGroup1
tell w to set theScrollArea1 to scroll area 1 of splitter group 1 of splitter group 1
#tell w to return UI elements of theScrollArea1
#tell w to return properties of theScrollArea1
#tell w to return properties of text area 1 of theScrollArea1 --"script source"
#tell w to return properties of scroll bar 1 of theScrollArea1--"scroll bar"
tell w to set theSplitter1 to splitter 1 of splitter group 1 of splitter group 1
#tell w to return UI elements of theSplitter1--{}
#tell w to return properties of theSplitter1--"splitter"
tell w to set theGroup1 to group 1 of splitter group 1 of splitter group 1
#tell w to return UI elements of theGroup1
#tell w to return properties of theGroup1--{}
#tell w to return properties of static text "Result" of theGroup1 --"Result"
#tell w to return properties of scroll area 1 of theGroup1
#tell w to return UI elements of scroll area 1 of theGroup1
#tell w to return properties of text area 1 of scroll area 1 of theGroup1--description:"script result"
#tell w to return properties of scroll bar 1 of scroll area 1 of theGroup1
tell w to return properties of splitter group 1 of splitter group 1
tell w to return splitter 1 of splitter group 1
tell w to return UI element of UI element 7 --{pop up button 1 of group 1 of window "Untitled 225.scpt" of application process "Script Editor" of application "System Events", pop up button 2 of group 1 of window "Untitled 225.scpt" of application process "Script Editor" of application "System Events"}
tell w to set languageAXPopUpButton to pop up button 1 of group 1 --help:"Script language",
tell w to set elementsAXPopUpButton to pop up button 2 of group 1 --"Script navigation"
tell w to set theAXGroup to UI element 1 --
tell w to set theDescriptionButton to UI element 2 --"Show or Hide the Description"
tell w to set theResultButton to UI element 3 --"Show or Hide the Result"
tell w to set theLogButton to UI element 4 --"Show or Hide the Log"
tell w to set theStatusButton to UI element 5 --"Reveal Status Source"
tell w to set theAXStaticText to UI element 6 --"User canceled."
tell w to set theAXSplitGroup to UI element 7 --"AXSplitGroup"
tell w to set theAXToolbar to UI element 8 --"toolbar"
tell w to set theAXTabGroup to UI element 9 --"Tab bar, 2 tabs"
tell w to set theAXStaticText to UI element 10 -- "text"
tell w to set theAXCloseButton to UI element 11 -- "close button"
tell w to set theAXFullScreenButton to UI element 12 -- "this button also has an action to zoom the window"
tell w to set theAXMinimizeButton to UI element 13 -- "minimize button"
tell w to set theEditedButton to UI element 14 -- "document actions"
tell w to set theAXImage to UI element 15 -- name:"Untitled 225.scpt", description:"image"
tell w to set theAXStaticText2 to UI element 16 -- name:"Untitled 225.scpt", description:"text
tell w to return properties of UI element 1 --
tell w to return properties of UI element -2 --{minimum value:missing value, orientation:missing value, position:{-1075, 26}, class:image, accessibility description:missing value, role description:"image", focused:false, title:"Untitled 225.scpt", size:{16, 16}, help:missing value, entire contents:{}, enabled:true, maximum value:missing value, role:"AXImage", value:missing value, subrole:missing value, selected:missing value, name:"Untitled 225.scpt", description:"image"}
tell w to return properties of UI element -1 --{minimum value:missing value, orientation:missing value, position:{-1057, 26}, class:static text, accessibility description:missing value, role description:"text", focused:false, title:missing value, size:{109, 16}, help:missing value, entire contents:{}, enabled:true, maximum value:missing value, role:"AXStaticText", value:"Untitled 225.scpt", subrole:missing value, selected:missing value, name:"Untitled 225.scpt", description:"text"}
tell w to return name of every UI element --{missing value, missing value, missing value, missing value, missing value, "User canceled.", missing value, missing value, "tab bar", "—", missing value, missing value, missing value, "Edited", "Untitled 225.scpt", "Untitled 225.scpt"}
tell w to set tb to UI element "tab bar"
#tell tb to return its properties -- {minimum value:missing value, orientation:missing value, position:{-1333, 90}, class:tab, accessibility description:"Tab bar, 1 tab", role description:"tab group", focused:false, title:"tab bar", size:{700, 26}, help:missing value, entire contents:{}, enabled:missing value, maximum value:missing value, role:"AXTabGroup", value:radio button "Untitled 225.scpt" of tab group "tab bar" of window "Untitled 225.scpt" of application process "Script Editor" of application "System Events", subrole:missing value, selected:missing value, name:"tab bar", description:"Tab bar, 1 tab"}
#tell tb to return every radio button --{radio button "Untitled 225.scpt" of tab group "tab bar" of window "Untitled 225.scpt" of application process "Script Editor" of application "System Events"}
#tell tb's first radio button to return its properties --{radio button "Untitled 225.scpt" of tab group "tab bar" of window "Untitled 225.scpt" of application process "Script Editor" of application "System Events"}
--tell tb to make new radio button --error "System Events got an error: AppleEvent handler failed." number -10000
end tell
end tell