Is there a way/script to list all components of window?

So, I have a funny situation. I am trying to create a script that will maniuplate the video security program called “securityspy”. In the camera image settings, there are multiple “sliders” or “scroll bars” that control the video settings. Well, I cannot script them because I do not know what they are called in the window. So, here are my questions…I am stummped (again):

  1. What do they call those bars that slide to change values? sliders? How can I get the name or number of them?
  2. If there is no telling what they are is there a get “x” statement that will get the all the properties of the window and show everything…like the text fields, buttons, ect?
    I am clueless, so any idea is better than mine. I can control the things with extra suites, but it is very odd and slow.

A picture of the window may be seen here. It is titled image settings

file:///Applications/SecuritySpy%201.2/User%20Manual.html

I ran this script, and these are the results:

tell application "System Events" to tell process "SecuritySpy"
	set frontmost to true
	get attributes of text field 6 of group 1 of tab group 1 of window "video"
	
	
end tell
  
tell application "System Events"
	set frontmost of process "SecuritySpy" to true
	get every attribute of text field 6 of group 1 of tab group 1 of window "video" of process "SecuritySpy"
		{attribute "AXRole" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXRoleDescription" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXParent" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXWindow" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXTopLevelUIElement" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXPosition" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXSize" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXEnabled" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXFocused" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXValue" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXTitle" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXSelectedText" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy", attribute "AXSelectedTextRange" of text field 6 of group 1 of tab group 1 of window "Video" of application process "SecuritySpy"}
end tell

and…

tell application "System Events" to tell process "SecuritySpy"
	set frontmost to true
	get properties of text field 6 of group 1 of tab group 1 of window "video"
	
	
end tell

 tell application "System Events"
	set frontmost of process "SecuritySpy" to true
	get properties of text field 6 of group 1 of tab group 1 of window "video" of process "SecuritySpy"
		{position:{732, 268}, maximum value:missing value, name:missing value, size:{70, 16}, subrole:missing value, class:text field, minimum value:missing value, enabled:true, selected:missing value, role:"AXTextField", help:missing value, title:"", value:"140", entire contents:{}, description:"text field", focused:true, orientation:missing value}
end tell
   

Hi bonedoc,

Use ‘every ui element’ or ‘ui elements’. Example:

tell app “SecutritySpy” to activate
tell app “System Events”
tell process “Security Spy”
tell front window
every ui element
end tell
end tell
end tell

gl,

That must be the problem…there are no UI elements

 tell application "System Events"
	set frontmost of process "SecuritySpy" to true
	get every UI element of process "SecuritySpy"
		{menu bar 1 of application process "SecuritySpy", window "Video" of application process "SecuritySpy", window "Camera Setup" of application process "SecuritySpy"}
end tell
 

Thanks, That works pretty good. I have no idea how I figured this out, but I can change the settings in the text fields by typing it in and then pressing TAB. that is weird, but here is my entire script. I am using 3 isights. I am going to go through and clean the code up, but it works great. If you just have one camera, this will work, but you need to cut out the botton 2 camera setup scripts. Also, your network camera may not have the same settings as an isight. Now that the script is done, I am going to set the brightness value to different amounts throughout the day with that cronnix program you showed me.

 activate application "SecuritySpy"
tell application "System Events"
	launch
	delay 7
	keystroke "K" using command down
	delay 2
	
	--CAMERA 1 SETUP & GET "IMAGE" OF "ADJUSTMENTS" TAB
	tell process "SecuritySpy"
		set {x, y} to position of button 5 of group 1 of tab group 1 of window 1
		tell application "Extra Suites"
			ES move mouse {x + 4, y + 4}
			ES click mouse --click radio button 2 of tab group 1
		end tell
		delay 2
		tell application "System Events" to tell process "SecuritySpy"
			set frontmost to true
			set {x, y} to position of radio button "Adjustments" of tab group 1 of window "Video"
			tell application "Extra Suites"
				ES move mouse {x + 40, y + 30}
				ES click mouse
			end tell
		end tell
		delay 1
		
		keystroke tab
		keystroke tab
		keystroke "325" ---brightness adjustment #1
		keystroke tab
		
		set {x, y} to position of button "ok" of window "Video"
		tell application "Extra Suites"
			ES move mouse {x + 4, y + 4}
			ES click mouse --click radio button 2 of tab group 1
		end tell
		delay 2
		
		----------------CHANGE TO NEXT CAMERA		
		tell application "System Events"
			tell process "SecuritySpy"
				set {x, y} to position of pop up button 2 of window 1
				tell application "Extra Suites"
					ES move mouse {x, y}
					ES click mouse
					ES move mouse {x + 30, y + 30}
					delay 1
					ES click mouse
				end tell
				delay 1
			end tell
		end tell
		----------------------CAMERA 2 SETUP	
		tell application "System Events"
			tell process "SecuritySpy"
				set {x, y} to position of button 5 of group 1 of tab group 1 of window 1
				tell application "Extra Suites"
					ES move mouse {x + 4, y + 4}
					ES click mouse --click radio button 2 of tab group 1
				end tell
				delay 2
				keystroke tab
				keystroke tab
				keystroke "260" ---brightness adjustment #1
				keystroke tab
				set {x, y} to position of button "ok" of window "Video"
				tell application "Extra Suites"
					ES move mouse {x + 4, y + 4}
					ES click mouse --click radio button 2 of tab group 1
				end tell
				delay 2
			end tell
		end tell
		--------------------CHANGE TO NEXT CAMERA		
		tell application "System Events"
			tell process "SecuritySpy"
				set {x, y} to position of pop up button 2 of window 1
				tell application "Extra Suites"
					ES move mouse {x, y}
					ES click mouse
					ES move mouse {x + 30, y + 30}
					delay 1
					ES click mouse
				end tell
				delay 1
			end tell
		end tell
		---------------------CAMERA 3 SETUP	
		tell application "System Events"
			tell process "SecuritySpy"
				set {x, y} to position of button 5 of group 1 of tab group 1 of window 1
				tell application "Extra Suites"
					ES move mouse {x + 4, y + 4}
					ES click mouse --click radio button 2 of tab group 1
				end tell
				delay 2
				keystroke tab
				keystroke tab
				keystroke "325" ---brightness adjustment #1
				keystroke tab
				set {x, y} to position of button "ok" of window "Video"
				tell application "Extra Suites"
					ES move mouse {x + 4, y + 4}
					ES click mouse --click radio button 2 of tab group 1
				end tell
				delay 2
			end tell
		end tell
		--------------------SET BACK TO MAIN CAMERA
		
		tell application "System Events"
			tell process "SecuritySpy"
				set {x, y} to position of pop up button 2 of window 1
				tell application "Extra Suites"
					ES move mouse {x, y}
					ES click mouse
					ES move mouse {x + 5, y - 35}
					delay 1
					ES click mouse
				end tell
				delay 1
			end tell
		end tell
		------------------CLOSE CAMERA SETUP	
		tell application "System Events"
			tell process "SecuritySpy"
				set frontmost to true
				set {x, y} to position of button "ok" of window "Camera Setup"
				tell application "Extra Suites"
					ES move mouse {x + 4, y + 4}
					ES click mouse --click radio button 2 of tab group 1
				end tell
				
				
			end tell
		end tell
		----------------------ENDING		
	end tell
end tell