Open Finder Tabs with Automator?

I'd like to say that the problem I want to solve is pretty simple, but I can't seem to find any good resources to tackle it.

I'd like to have an Automator application that will open all of my SMB/network shares (these are constant, but are sometimes not mounted) in a single window in multiple tabs. I can't seem to find any way to do it because Automator doesn't seem to address Finder tabs at all.

Any thoughts?


Solution 1:

This is what I ended up doing, with help from BritishColour. I ended up adjusting the delays because the Cmd + G was being a little quirky and not registering the key code 36 (enter) command. This also calls up Finder so it doesn't activate in whatever program I might be using in the moment.

on run

    tell application "Finder" to activate

    tell application "System Events"
        keystroke "n" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX"
        delay 1
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX2"
        delay 2
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX3"
        delay 1
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX4"
        delay 1
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX5"
        delay 1
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX6"
        delay 1
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX7"
        delay 1
        key code 36
        delay 1
    end tell
end run