Automate clicking link in mail with certain criteria - applescript

I am trying to automate clicking of link in mails with certain criteria. Below is the code I have that searches the mail with criteria word “Get” and if found then try to click link in that email. However, I can only get it to open the mail with that criteria. So need help in getting it to click link in the email without me going to all emails. Thanks!

on run
activate application “Mail”
tell application “Mail”
set myInbox to mailbox “Inbox” of account 3
set myMessages to every message of myInbox

	repeat with theMessage in myMessages
		open theMessage
		set messageContent to content of theMessage
		set searchText to "Get"
		if messageContent contains searchText then				

			--Clicking link code would go here

		end if
		delay 5
		--			delete theMessage
		close window 1
	end repeat
end tell

end run

Don’t try to click the links. Parse the text of the email, extract the link, and open it in Safari (or another browser).


{ MacBookPro6,1 · 2.66 GHz Intel Core i7 · 8GB RAM · OSX 10.11.1 }