Under The Microscope

RealPlayer AppleScripting

I was playing around with scripting RealOne Player a bit, and I noticed the following in its AppleScript dictionary:

GetControlValue: Gets a control value by control ID name
	GetControlValue  string  -- the control ID name
	Result:   string  -- the control's current value

Which seemed like just the call to get the title of the current stream (which is what I was after). Except, nowhere is the list of “control ID name”s documented, and Google turns up absolutely nothing. So I fired up Resorcerer and went digging. And after a bit of experimenting, I managed to extract a list of values that GetControlValue responds to (and probably SetControlValue too).
I was playing around with scripting RealOne Player a bit, and I noticed the following in its AppleScript dictionary:

GetControlValue: Gets a control value by control ID name
	GetControlValue  string  -- the control ID name
	Result:   string  -- the control's current value

Which seemed like just the call to get the title of the current stream (which is what I was after). Except, nowhere is the list of “control ID name”s documented, and Google turns up absolutely nothing. So I fired up Resorcerer and went digging. And after a bit of experimenting, I managed to extract a list of values that GetControlValue responds to (and probably SetControlValue too).

Here’s a little script that displays them all:

tell application "RealOne Player"
	set controlList to {"audiochannels", "bitratetext", "branding", "brandlogo", "brandtitle", 
"closebtn", "codecicons", "contentbar", "contentleftedge", "contentrightedge", "lengthtext", 
"minimizebtn", "mutebtn", "navigationbtn", "nextbtn", "playbackstate", "playcontrolsbar", 
"playerwindow", "playpausebtn", "positionlengthdivider", "positionslider", "positiontext", 
"previousbtn", "statusarea", "statusbar", "statusleftedge", "statusrightedge", "statustext", 
"stopbtn", "title", "titlebar", "titletext", "volslider", "zoombtn"}

	set resultRec to {}
	
	repeat with controlID in controlList
		set val to GetControlValue controlID as string
		set resultRec to resultRec & {controlID, val}
	end repeat
	
	log resultRec
end tell

Which results in output something like:

(*audiochannels, , bitratetext, 32.1Kbps, branding, , brandlogo, , brandtitle, , closebtn, ,  
codecicons, , contentbar, , contentleftedge, , contentrightedge, , lengthtext, 0:19, minimizebtn, , 
mutebtn, 0, navigationbtn, , nextbtn, , playbackstate, , playcontrolsbar, , 
playerwindow, RealOne for Macintosh - RealNetworks - (C)2002 RealNetworks, playpausebtn, 1, 
positionlengthdivider, /, positionslider, , positiontext, 0:04, previousbtn, , statusarea, , 
statusbar, , statusleftedge, , statusrightedge, , statustext, Playing, stopbtn, , title, , 
titlebar, , titletext, RealOne for Macintosh - RealNetworks - (C)2002 RealNetworks, volslider, , zoombtn, *)

Most of them are empty but there’s a couple good ones, bitratetext, lengthtext, and titletext.

Comments for this post have been closed. Thanks for reading!


Our Software