Change Default Location in Safari for downloads

I know I can change the default download location from preferences but what I would like to be able to do is have a range of locations that I could pick from a list and enter in preferences.

The following script gets me to a point where I need to click Other so as I can make a selection. However I cannot work out how to select other. Needless to say I am still way off entering the new location other than picking it manually, so any suggestions on that would also be appreciated. The problem is at the "click menu item “Other…” (it is entered as an ellipse) and I am told cannot make it into type integer.

Thanks


activate application "Safari"
tell application "System Events"
	tell application process "Safari"
		click menu item "Preferences…" of menu 1 of menu bar item "Safari" of menu bar 1
		delay 2
		click pop up button 2 of group 1 of group 1 of window "General"
		delay 2
		tell window "General"
			--click menu item "Other…"
			click menu item "Other…" of menu 1 of "Desktop"
		end tell
	end tell
end tell


tell application "Safari" to activate
tell application "System Events" to tell application process "Safari"
	click menu item "Preferences…" of menu 1 of menu bar item "Safari" of menu bar 1
	repeat until (window "General" exists)
		delay 0.1
	end repeat
	tell window "General" to tell pop up button "File download location:" of group 1 of group 1
		perform action "AXShowMenu"
		click menu item "Other…" of menu 1
	end tell
end tell
tell application "Safari" to activate

Solution without GUI scripting:


set downloadsFolder to quoted form of POSIX path of (choose folder)

tell application "Safari" to quit
tell application "System Events"
   repeat while application process "Safari" exists
       delay 0.1
   end repeat
end tell

do shell script ("defaults write com.apple.Safari DownloadsPath " & downloadsFolder)

-- only to show the result:
display dialog "The Downloads location was changed "

Thank you worked perfectly.