1

So I have this script that I saved as an application and added it my login items.

tell application "Finder" to mount volume "afp://Data_Cube.local/Scotts Stuff"
delay 5
tell application "iTunes" to activate

However when I login I get an error dialog with this message "Connection is invalid. Finder got an error: Connection is invalid. (-609)"

If I click the edit button in the error dialog it opens up the Script Editor. I press the run button and the volume is mounted just fine.

Any ideas why my volume won't mount when used as a login item? FYI I'm using Yosemite.

2
  • 3
    it's firing before the network is fully established, maybe? Try giving it some breathing space at the head - delay 60s before your first action then maybe see how much you can reduce that & still be successful
    – Tetsujin
    Jan 11, 2015 at 15:44
  • I tried to add some delays that did help. Jan 11, 2015 at 21:27

1 Answer 1

1

Changing

tell application "Finder" to mount volume "afp://Data_Cube.local/Scotts Stuff"

to

mount volume "afp://Data_Cube.local/Scotts Stuff"

seems to be the resolution. As mount is part of the standard scripting library.

1
  • Please mark this as the accepted answer if you're answering your own question.
    – ʀ2ᴅ2
    Feb 27, 2018 at 18:20

You must log in to answer this question.

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