Author Topic: [SOLVED] Mount Servers  (Read 2667 times)

0 Members and 1 Guest are viewing this topic.

Offline larsen67

  • Sr. Member
  • ****
  • Posts: 459
  • Karma: 10
  • Gender: Male
[SOLVED] Mount Servers
« on: August 09, 2007, 06:35:40 AM »
I have this little mount volumes script that works fine but Im wondering if there is some where I can save this so that it is triggered at/after a scheduled startup. Where do I save it? will I need to modify it to work? does it need to be saved as application? User accounts are auto log in 15 minutes before we start weekdays if thats relevant?

001   property User_Name : "mark.larsen"
002   property User_Password : "••••••••"
003   property Server_Address : "000.000.0.000"
004   property Volume_1 : "Volume A"
005   property Volume_2 : "Volume B"
006   
007   try
008        mount volume "afp://" & Server_Address & "/" & Volume_1
009        -- mount volume "afp://" & User_Name & ":" & User_Password & "@" & Server_Address & "/" & Volume_1
010   on error Error_Message
011        display dialog Error_Message giving up after 6
012   end try
013   try
014        mount volume "afp://" & Server_Address & "/" & Volume_2
015        -- mount volume "afp://" & User_Name & ":" & User_Password & "@" & Server_Address & "/" & Volume_2
016   on error Error_Message
017        display dialog Error_Message giving up after 6
018   end try
019   

Not using Registered users just at the moment. Also can I safely change "property User_Name" to a do shell just to make it a little more flexible? TVM

Offline Publi-Script

  • Administrator
  • Hero Member
  • *****
  • Posts: 596
  • Karma: 16
  • Gender: Male
  • Automate your Life!
    • Publi-Script.com
Re: Mount Servers
« Reply #1 on: August 09, 2007, 07:48:50 AM »
When you mention "scheduled startups" do you mean to say tha you do not want this script to run at every reboot?

In any case, your best best is to indeed save this as an application and add it to the launch item for each user. In case the time of day does make a difference, I suggest you just add an "if" clause that will check for the current time and act accordingly depending of its findings.
Michel Lemieux
Forum Administrator
-------------------------
OS X 10.6.4
Quark 6.5 / 7.5 / 8.1.6
Adobe Design Premium CS / CS2 / CS3 / CS4 / CS5
Script Debugger 4.5

Offline larsen67

  • Sr. Member
  • ****
  • Posts: 459
  • Karma: 10
  • Gender: Male
Re: Mount Servers
« Reply #2 on: August 09, 2007, 08:02:06 AM »
Cool I will give it a try. I may add a few app launches too. BTW well done hit 100 reg users this week thats not bad at all

Offline Publi-Script

  • Administrator
  • Hero Member
  • *****
  • Posts: 596
  • Karma: 16
  • Gender: Male
  • Automate your Life!
    • Publi-Script.com
Re: Mount Servers
« Reply #3 on: August 09, 2007, 08:20:06 AM »
Cool I will give it a try. I may add a few app launches too. BTW well done hit 100 reg users this week thats not bad at all

Don't forget you can also order those apps into launching in a specified sequence.

Thank you for the kind comments. It is a nice mark to have reached but I am still learning about Web placement and optimizing search results to drive more people here. Things have changed tremendously since I first had a hand in webmastering (there wasn't even a WYSIWYG web page editor back then...), Needless to say, I feel I have fallen wayyyyy behind.

For the most part, I believe this board has the "personel" to answer many users' requests since most of them were already noteworthy posters on the Quark Forum. This makes for the low volume posts. Things also seemed to have picked up of late, maybe we were suffering form the summer vacation period.

 
Michel Lemieux
Forum Administrator
-------------------------
OS X 10.6.4
Quark 6.5 / 7.5 / 8.1.6
Adobe Design Premium CS / CS2 / CS3 / CS4 / CS5
Script Debugger 4.5

Offline larsen67

  • Sr. Member
  • ****
  • Posts: 459
  • Karma: 10
  • Gender: Male
Re: Mount Servers
« Reply #4 on: August 09, 2007, 08:30:27 AM »
Yes I do indeed want to sequence those lanuches I'll just use the delay for that. The main thing I want to happen is for suitcase's database to load first before app launches. Im still unsure on the location of this folder. Im testing on my new tiger mac set up. Any chance of a file path to location?

Offline Jean-Marie Schwartz

  • Sr. Member
  • ****
  • Posts: 436
  • Karma: 6
  • Gender: Male
Re: Mount Servers
« Reply #5 on: August 09, 2007, 08:35:58 AM »
I have this little mount volumes script that works fine but Im wondering if there is some where I can save this so that it is triggered at/after a scheduled startup. Where do I save it? will I need to modify it to work? does it need to be saved as application? User accounts are auto log in 15 minutes before we start weekdays if thats relevant?
Mark, saved as an app (wherever you want on your HD - I think) you can set Sys Prefs to run it at StartUp (go to Accounts > Opening, and add the Script.app). Hope this helps. (I had one at a time launching some apps and gathering my e-mails.)
Jean-Marie Schwartz
May the Schwartz be with you :-)

= Mac Pro Quad-Core Intel 2.8 GHz • 10 Go 1066 MHz DDR3 • Mac OS 10.8.5 • QuarkXPress 9.5.4.1 • Adobe CS5 =

Offline larsen67

  • Sr. Member
  • ****
  • Posts: 459
  • Karma: 10
  • Gender: Male
Re: Mount Servers
« Reply #6 on: August 09, 2007, 08:42:48 AM »
Jean-Marie thank you. My heads in bits with so much machine swapping stuff going on at the moment. Will give it a go.

Offline Publi-Script

  • Administrator
  • Hero Member
  • *****
  • Posts: 596
  • Karma: 16
  • Gender: Male
  • Automate your Life!
    • Publi-Script.com
Re: Mount Servers
« Reply #7 on: August 09, 2007, 08:44:48 AM »
Not sure I understand your "Folder" inquest.

Login items are located under your System Preferences > Account preference pane. Once there, you need to click on the "+" button to add an application to the list (you will be prompt to locate the desired application). The ordering part is more complex. Aparently you are supposed to be able to drag each of these item to their launch position. I was never able to do this. Instead I reverted to the whole "add them in the order you want them" method.

If you do have suitcase installed and configured to launch automatically, you will see it already in that list of login items so whatever you add to list list is bound to come after (still wouldn't hurt to add a delay though)
Michel Lemieux
Forum Administrator
-------------------------
OS X 10.6.4
Quark 6.5 / 7.5 / 8.1.6
Adobe Design Premium CS / CS2 / CS3 / CS4 / CS5
Script Debugger 4.5

Offline larsen67

  • Sr. Member
  • ****
  • Posts: 459
  • Karma: 10
  • Gender: Male
Re: Mount Servers
« Reply #8 on: August 09, 2007, 08:59:07 AM »
Yep I now have it suitcase is indeed there. Just had to add a small delay before the first try mount volume I think it was trying too quick. I was confusing it with Library/StartupItems doh… thank you both.