Apple script to select last tab in firefox!

hello everyone i do know i can select last tab in firefox by meta+9 in firefox,but i use tabutils addons which treats pinned tab differently from normal tab so to select last pinned tab with this add on installed i ve got to make meta+alt+9 shortcut and i really hate this behaviour,
So can anyone please write a script to select last tab regardless is pinned or not (i m not able beacuse firefox apple script behaviour is terrible)
thanks to all!

Browser: Firefox 30.0
Operating System: Mac OS X (10.8)

If I understand you correctly, the following script that works in a normal Firefox environment does not work in yours.

tell application "System Events" to tell process "firefox"
	activate
	set frontmost to true
	keystroke 9 using {command down}
end tell

In your environment you need to add the “alt” (I assume you mean option on a Mac keyboard) to the code as follows.

tell application "System Events" to tell process "firefox"
	activate
	set frontmost to true
	keystroke 9 using {command down, option down}
end tell

Hope one of these does the trick.:slight_smile: