|
#1
| ||||
| ||||
| Alright, so here's what's up. I'm trying to write an AppleScript (since recording in 10.2 still does not work) that will mount a smb drive on a Win 2K Domain. Normally I can access the drive using the connect to server dialog, but I would like to be able to do this on start up. Searching macosx.com I found two scripts that looked promising, but they both don't work. The first said: tell application "Finder" try open location "afp://username:password@server ip/share" end try end tell I tried to convert that for smb, by changing the protocol from afp to smb. Script Editor tells me that the syntax is correct, but it doesn't do anything when I click "run". I tried to run it via the terminal, but I guess I'm doing something wrong (tried ./scriptname) because it tells me that it cannot run the binary file. The second script said: mount volume "afp://server ip/share" as user name "username" with password "password" I tried that (also changing it to smb), but because the username is my student ID number, it gives me a syntax error that "a number cannot follow """. " Any ideas on how to make one of these two work?
__________________ "Your computer has too much computer in it, and not enough typewriter." GCS/IT$ d- s+: a--? C++ U* !P L++ E---- W+++ !N o? !K-? !w O? M++ V? !PS !PE Y+ PGP t++ !5 X+ R+ tv+ b+ DI+ D- G+ e(++) h* r+++ y? |
|
#2
| ||||
| ||||
| I figured it out. The solution was to combine the two so that the script reads: mount volume "smb://username:password@server ip/share"
__________________ "Your computer has too much computer in it, and not enough typewriter." GCS/IT$ d- s+: a--? C++ U* !P L++ E---- W+++ !N o? !K-? !w O? M++ V? !PS !PE Y+ PGP t++ !5 X+ R+ tv+ b+ DI+ D- G+ e(++) h* r+++ y? |
|
#3
| |||
| |||
| This is the applescript that i use. mount volume "smb://shareIP/shareName" as user name "yourUserName" with password "yourPassword" it works like a gem. Make sure that you save it as an application. And also, it doesn't get run in the terminal, once you save it as an application, then you can just double click on it and there you go. Then put it in your LoginItems and it will run automatically. |
![]() |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| AppleScript front end to a shell script? | meancode | Mac OS X System & Mac Software | 0 | March 17th, 2002 09:25 PM |
| AppleScript in the Finder in 10.1 (Spring-Loaded Folders???) | simX | Apple News, Rumors & Discussion | 1 | October 14th, 2001 10:27 PM |
| AFP vs. SMB (File name lengths) | legacyb4 | Apple News, Rumors & Discussion | 1 | October 7th, 2001 03:05 PM |
| smb and classic | Innerhofer | Apple News, Rumors & Discussion | 0 | October 1st, 2001 07:14 AM |
| AppleScript Studio? Is this our new HyperCard? | rharder | Apple News, Rumors & Discussion | 5 | September 27th, 2001 12:44 PM |