noob in need of advice.

I’m using Macs in my classroom at a middle school that has a windows environment - server 2003 - Active Directory - and an authentication server to validate all student accounts.

I’ve been able to get the Macs to work with windows to validate users and passwords and mount a server share that holds their document folders. The document directory looks like this smb:\Server Share\Graduation Date (variable)\username (also variable).

So when a student logs in with a user name and password they get their own desktop-documents-library on the Mac HD, and they get connected to smb:\Server Share with a little network icon on the desktop and the finder.

The problem is most students are unable to drill down to their graduation year and then dig through hundreds of (albeit alphabetized) usernames to find their own documents folder.

So I thought it would be easy to whip up an applescript that prompted a student for two variables - graduation year and username and then have it dig through the smb:\Server Share to find the graduation year and then down another level to find the username and then mount that folder in the finder - or better yet substitute the documents folder in the finder with this windows folder. This way no matter what machine students sit at in the building, Mac or Windows their documents are show as their documents.

I can’t figure it out in the amount of time that I have to throw at the problem. I can get an applescript to mount a windows share but that is already done at logon.

Can someone tell me how I might do this? or Where I could find a hired scripter?

thanks
KJ

Plenty of views later and no comments.
Could someone just tell me if this is possible?
To simple to bother talking about?
If the information provided is enough to make a reasonable response?
other?
I just wonder how far afield I am with this request.

thanks again.

kj

Hi,

Being no expert but since you didn’t get any comments from the pros:

Have you read this post? http://bbs.applescript.net/viewtopic.php?id=12404

Combined with a dialog w input fields setting globals for graduation date and username to be used in the lookup it would do the trick, wouldn’t it?

Cool!
This works


repeat
	try
		alias "StudentHome:" -- that is the windows share
		exit repeat
	end try
end repeat
tell application "Finder" to open alias "StudentHome:GraduationYear:UserName:"

to open the correct folder if I supply the GraduationYear and the UserName Manually.

Thanks a lot.

Any guidance on how to create a dialog box with input forms that would pass a given string into the finder command?
And is there a way to add the alias to the sidebar?
I swear I’ve been looking.

Kj

Try this:


tell application "Finder"
	activate --bring to front
	set theDialog to display dialog "Please enter your username" default answer "" with icon 1
	set UserInput to the text returned of theDialog
	set ButtonReturned to the button returned of theDialog
	--display dialog UserInput --uncomment to view the result
end tell

--if the user cancelled:
if ButtonReturned = "Cancel" then --the user cancelled
	return --end the script
--or appropriate handler
end if

There is also a cool multiple input dialog here:
http://bbs.applescript.net/viewtopic.php?id=15070

I am sure you can add an alias to the sidebar once the student is logged in but I have’t tried scripting it.
Maybe post a new topic for that one. You should consider a more informative subject name than this one got. I did the same mistake and got very few comments.