Re: Help creating a simple? script please
Re: Help creating a simple? script please
- Subject: Re: Help creating a simple? script please
- From: David Hood <email@hidden>
- Date: Sun, 20 Apr 2003 12:46:16 +1200
Report the name of the user's folder, which is in the mounted server
volume,
Well that bit should be fairly easy, for a start I'd try
tell application "Finder"
set homepath to home as string
end tell
set nameOfUser to extractFromEnd(homepath, 1, ":")
return nameOfUser
on extractFromEnd(stringToExtract, placesBack, usingBreak)
set savedTextItemDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to usingBreak
set stringAsList to every text item of stringToExtract
set listCount to number of items in stringAsList
set desiredItem to listCount - placesBack
set AppleScript's text item delimiters to savedTextItemDelimiters
return item desiredItem of stringAsList
end extractFromEnd
in a pop up dialog window when the user mounts the server volume.
The window would float above everything else and would disappear when
the
user logged off of the server.
I've no idea how that could be done within basic applescript.
As an alternative, if there is access to the desktop, how about a
script that checks if there is a alias to their documents folder and if
there isn't creates one naming it after their username?
Aside from that my other ideas are pretty impractical- Use Smile to
create a user specific tiff with the name in the lower right, add set
the desktop picture to it.
Regards,
David Hood
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.