airport networks

With Airport’s auto find any available network feature is it possible to create a list of those current networks? I have tried the code below, but i think i am only getting the selected network and not all the available networks that show up…


tell application "Internet Connect" to set the theNetworks to network name in AirPort configurations as Unicode text
repeat with i in theNetworks
	if i does not contain ("No network selected" as Unicode text) then
	return i
	end if
end repeat

I have also tried to script the UI with no luck. I get a “NSReceiverEvaluationScriptError:4” with anything that I try…


global theNetworks
tell application "Internet Connect"
	activate
	set the theNetworks to network name in AirPort configurations as Unicode text
	--return theNetworks
end tell

tell application "System Events"
	tell process "Internet Connect"
		select pop up button theNetworks of window "AirPort"
	end tell
end tell