Your Script :) Re: AppleScript to get UserName!??
Your Script :) Re: AppleScript to get UserName!??
- Subject: Your Script :) Re: AppleScript to get UserName!??
- From: "T.J. Mahaffey" <email@hidden>
- Date: Tue, 23 Oct 2001 11:08:53 -0500
Here's a start. (Watch out for carriage returns!):
I don't see a way to set password with plain vanilla AS. Just a boolean
(true/false) for the existence of a p/w. May require an OSAX. This one,
however, will do the rest.
This one relies on a one-field-per-dialog limit in plain AS. If you'd prefer
to have one dialog to enter all the info at once, you'll need to look into
an osax like Dialog Director.
Hope this gets you on your way.
tell application "Finder"
set compName to text returned of (display dialog "Enter the new computer
name for this Mac: " default answer "")
set ownerName to text returned of (display dialog "Enter the new owner
name for this Mac: " default answer "")
tell application "File Sharing"
set computer name to compName
set owner name to ownerName
quit
end tell
end tell
Be well.
T.J. Mahaffey
email@hidden