• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Your Script :) Re: AppleScript to get UserName!??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Your Script :) Re: AppleScript to get UserName!??
      • From: John W Baxter <email@hidden>
  • Prev by Date: Re: hash arrays and other mysteries
  • Next by Date: Re: X 10.1 Mount volume syntax: afp version works, but not old version (error type 1) ??
  • Previous by thread: Re: X 10.1 Mount volume syntax: afp version works, but not old version (error type 1) ??
  • Next by thread: Re: Your Script :) Re: AppleScript to get UserName!??
  • Index(es):
    • Date
    • Thread