Anybody have any experience scripting using the DAVE Scripting Dictionary?
I’m trying to write a simple script that logs me into a domain using my keychain.
The following works, but I don’t want to put my password in the script:
tell application “DAVE Scripting”
logon username “spacemoose” with password “spacemoose” in domain “SPACE”
Here are the arguments for logon, but I can’t get it to work using my keychain at all:
logon: Log on to the DAVE network.
logon reference – the object for the command
[username Unicode text] – This argument specifies the username of the user.
[saving in keychain anything] – This argument specifies to save the username, password, and domain in the keychain.
[with password Unicode text] – This argument specifies the password of the user.
[keychain anything] – This argument specifies to try the keychain to login.
[in domain Unicode text] – This argument specifies the domain of the user.
Thanks in advance,
DAVE is just allowing you to “mount” a PC share correct?
With OS 10.1 or newer you can do this same thing without needing DAVE. Try using the “SMB” protocol instead. I don’t remember the exact syntax but something like…
mount volume "smb://workgroup;servername/ShareName" as user name "spacemoose" with password "spacemoose"
As for the not wanting to put your password in the script you could always save it as “run only”, this will keep others from finding your password.
I hope this helps,
The above is a helpful reply to the wrong question.
I’m not trying to mouint a drive.
I’m trying to log onto my network’s Windows Domai (which Dave can do, but 10.2 cannot).
Moreover I’m specifically trying to make Dave use the username and pass that’s already stored in my keychain. The System Preference Panel for Dave uses the keychain, but I can’t get Dave’s scripting app to use it.
[b]Oops. I just posted this then re-read your message. You don’t want to mount a volume. But maybe this will help someone some time.
Here’s my response to your question.[/b]
I’m not an expert on DAVE or the keychain, but have you tried logging on the Windows network, adding it to your keychain, choosing “Always Allow” (in the dialog or open the Keychain Access application) and then choosing “Enforce Login” in the DAVE Network pref panel.
I currently use shares on an Windows network. That’s the only thing I use the Windows network for.
I used to use a script that contained my username and password, but I tried something different. (I haven’t read the DAVE user manual or anything, I just played around with different things so I’m not a DAVE expert).
Here’s what I did (using DAVE 4):
In the “Dave Login” preferences panel, I logged in to the Windows network, and added it to my keychain.
I have a script that runs at startup (Login Items):
tell application “Finder” to open location “cifs://Server/Share/Folder/”
I am never asked for my username or password but whenever I log in the share is mounted - no questions asked, and when I open the “Dave Login” panel (like right now), it tells me that I am not logged into the Windows network even though there’s a shared volume on my desktop.
(If I click the “Log in…” button it asks me about unlocking my keychain, etc. Maybe if you click the “Always Allow” button in that dialog you will overcome any obstacles you are currently having - although I’m not sure what the scope is of the “Always Allow” (i.e. current session only or infinite sessions)).[/i]