2

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?

2
  • would this work for you superuser.com/a/455932
    – Ruskes
    Jun 3 '14 at 22:46
  • You could try doing it on a keystroke bases (just like a Macro), it would take a while but definitely work. It would be pretty easy to implement with an AppleScript Jun 4 '14 at 1:58
0

You can use an AppleScript:

on run
    tell application "System Events"
        keystroke "g" using {command down, shift down}
        keystroke "~/Documents"
        key code 36
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "~/Applications"
        key code 36
    end tell
end run

Simply repeat lines 06 to 10 for any number of locations you want to open in tabs. Save and import into Automator.

It does take a little while to run, but it works.

Explanation: Uses the "Goto" pane to open a location, then presses enter (key code 36). The program then opens a new tab and repeats the process.

2
  • 1
    It's ugly that this is more or less the only way to handle this. Maybe the new OS will have better support for this. Regardless, thanks, this should allow me to write the specific one I need. Jun 4 '14 at 11:55
  • @ezgoodnight yeah it sucks. I'm running 10.10 at the moment and it doesn't seem like theres any luck there either... Jun 4 '14 at 18:37
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .