Does anyone know how to open the “Colors” window when clicking the mouse on the color wells in:
”> “BBEdit” ”> preferences window ”> “Language Options” ”> “Colors” Tab
by GUI scripting the application process “BBEdit”?
I’m having trouble getting “System Events” to click on those… I’ve tried:
tell application "BBEdit"
activate
if not (exists preferences window) then open preferences window
if preferences window's visible is false then set preferences window's visible to true
set {Px, Py} to position of preferences window
end tell
tell application "System Events"
tell process "BBEdit" to set frontmost to true
click at {Px + 352, Py + 132}
click application process "BBEdit" at {Px + 352, Py + 132}
click window "BBEdit Preferences" of application process "BBEdit" at {Px + 352, Py + 132}
click sheet "Language Options" of window "BBEdit Preferences" of application process "BBEdit" at {Px + 352, Py + 132}
click tab group 1 of sheet "Language Options" of window "BBEdit Preferences" of application process "BBEdit" at {Px + 352, Py + 132}
click group 1 of tab group 1 of sheet "Language Options" of window "BBEdit Preferences" of application process "BBEdit" at {Px + 352, Py + 132}
click UI element 2 of group 1 of tab group 1 of sheet "Language Options" of window "BBEdit Preferences" of application process "BBEdit" at {Px + 352, Py + 132}
click at {item 1 of position of UI element 2 of group 1 of tab group 1 of sheet "Language Options" of window "BBEdit Preferences" of application process "BBEdit", item 2 of position of UI element 2 of group 1 of tab group 1 of sheet "Language Options" of window "BBEdit Preferences" of application process "BBEdit"}
(* and also... *)
tell application process "BBEdit" to tell window "BBEdit Preferences" to tell sheet "Language Options" to tell tab group 1 to tell group 1
select UI element 2
click UI element 2
return UI element 2
end tell
end tell
… all to no avail. Anyone?
<<””””””””[ EDIT ]””””””””>>
hmmm… ok, after much playing around, Extra Suites’ “ES click mouse” magages to do the trick… so got it working. But anyone know why “tell application “System Events” to tell application process “BBEdit” to tell window “Colors” to click at {x,y}” doesn’t work while “tell application “Extra Suites”; ES move mouse {x,y}; ES click mouse; end tell” works?
Also, related to this, does anyone know how to target the list that pops up (not a pop up button but a pop up list) when running this little doo-dad:
--> First, open the BBEdit preferences window, language options, colors tab, click a color well to get the colors window, then run:
tell application "System Events" to tell application process "BBEdit" to tell window "Colors" to click button 1 of group 1
– Aesthir