Fastscripts Finder tabs

Discussion in 'Mac Programming' started by dlorenzo, Nov 6, 2013.

  1. dlorenzo macrumors newbie

    Joined:
    Nov 6, 2013
    #1
    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!
     
  2. kryten2 macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #2
    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
    
    
     

Share This Page