Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dlorenzo

macrumors newbie
Original poster
Nov 6, 2013
10
0
Hi,

I am trying to get Fastscripts be able to control the switching to a specific Finder tab using keyboard shortcuts (command+1, command+2, etc). I have been able to get this working for Safari using the following script:

Code:
tell application "Safari"
	try
		tell front window to set current tab to tab 1
	end try
end tell

However I have not been able to get this working with Finder. Does anyone have a clue on how to make Finder understand a go to tab command?

Thanks!
 
Finder's dictionary doesn't have support for tabs, but you can simulate pressing control tab.

Code:
tell application "Finder" to activate
tell application "System Events"
	tell process "Finder"
		-- Show Next Tab
		key code 48 using control down
		-- Show Previous Tab
		key code 48 using {control down, shift down}
	end tell
end tell
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.