"tab" bar on safari

tell application "Safari"
	activate
	open location "my website here"
	delay 1 -- so the page can load
end tell
tell application "System Events"
	tell application process "Safari"
		repeat 10 times
			keystroke tab
		end repeat 
		keystroke return -- to get to and activate first drop menu
		repeat 10 times
			keystroke tab
		end repeat
		keystroke return -- to get to and activate my choice on drop down	
	end tell
end tell

ok so this code gets me where i want to go. but it opens a new page every time, as i will be using this a lot i’d like to leave “my website here” open in a tab and use another tab to do whatever with. Is there any way to have applescript make a specific tab in safari active rather then just open a new page? ty in advance

Model: mac pro
AppleScript: 2.3
Browser: Safari 531.21.10
Operating System: Mac OS X (10.6)

Hi,

try this


property myWebsiteHere : "my website here"

tell application "Safari"
	activate
	if (count documents) is 0 then
		make new document
		set URL of document 1 to myWebsiteHere
	else
		try
			set myWebsiteTab to 1st tab of window 1 whose URL starts with myWebsiteHere
			set URL of myWebsiteTab to myWebsiteHere
		on error
			tell window 1 to (make new tab with properties {URL:myWebsiteHere})
		end try
	end if
end tell