Is there a way to script the top bar pull down menus in AS?

I want to write a script that accesses some items in the top bar.

For example, there is a topic called ˜VOLUMES’ and in it is a it ˜DISMOUNT’. Would this be possible? And if so what does one write?

Thanks.

Is this what you mean!

tell application "System Events"
	tell application "Finder" to activate
	key code 120 using control down
	key code 125 --down arrow
	key code 124 --right aarrow
	repeat 2 times
		key code 125
	end repeat
end tell
-- Selects prefere.nces

Brilliant! Thanks learning all the time.