Please help an AppleScript retard! I know next to nothing about AppleScript, and unfortunately, I'm not able to adequately take the time to learn it to solve the problem myself, and goggling isn't being much help:
What I wanted to accomplish:
We've moved to Active Directory, with it comes networked home folders and networked shared folders. Let's say that most of my users are.. less then adept at doing simple tasks, so rather then repeatedly teaching them to mount the SMB shares by hand (which WILL be forgotten), or trying to use a double-clickable alias of the mount (which WILL break), I'm trying to use AppleScript and make an 1d10t-proof .app that can exist as a Dock icon. User-A clicks on the Dock icon, and they are prompted for their password to mount the SMB share, and their home folder is opened automatically.
What I want to accomplish now:
That part was easy enough and works fine. But if User-A closes/looses their home folder window, and clicks on the Dock icon again, even though the SMB share might be mounted, it will run and ask them for their crudentials. What I want to do is have the script check, if the share is not mounted, go through the steps to mount it, and then open the user's home folder, otherwise just open the user's home folder. Or something to that effect. Here's what I have so far:
Hopefully this is clear enough to explain what I want to do and where I want to go from the AppleScript above. How would you solve this, you AppleScripting Guru, you?
Thanks!!!!
What I wanted to accomplish:
We've moved to Active Directory, with it comes networked home folders and networked shared folders. Let's say that most of my users are.. less then adept at doing simple tasks, so rather then repeatedly teaching them to mount the SMB shares by hand (which WILL be forgotten), or trying to use a double-clickable alias of the mount (which WILL break), I'm trying to use AppleScript and make an 1d10t-proof .app that can exist as a Dock icon. User-A clicks on the Dock icon, and they are prompted for their password to mount the SMB share, and their home folder is opened automatically.
What I want to accomplish now:
That part was easy enough and works fine. But if User-A closes/looses their home folder window, and clicks on the Dock icon again, even though the SMB share might be mounted, it will run and ask them for their crudentials. What I want to do is have the script check, if the share is not mounted, go through the steps to mount it, and then open the user's home folder, otherwise just open the user's home folder. Or something to that effect. Here's what I have so far:
Code:
tell application "Finder"
activate
try
mount volume "smb://domain;username@foo.org/group_home/"
end try
repeat until (list disks) contains "GROUP_HOME"
end repeat
make new Finder window to folder "username" of disk "GROUP_HOME"
end tell
Hopefully this is clear enough to explain what I want to do and where I want to go from the AppleScript above. How would you solve this, you AppleScripting Guru, you?
Thanks!!!!