• 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
Dialog box with secure text entry?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dialog box with secure text entry?


  • Subject: Dialog box with secure text entry?
  • From: "Nitz, Chris" <email@hidden>
  • Date: Thu, 6 Feb 2003 12:31:40 -0800
  • Thread-topic: applescript-users digest, Vol 3 #1321 - 19 msgs

Hi, List.

I am working on a chunk of bigger script that will connect to a server with
URL Access, and download a file to disk. (Mac OS 9.1 & AppleScript 1.8.3) The
script below functions fine, but I am looking for a way for the user to enter
his/her password "securely".

Is there an easy way to get "text returned" of a "display dialog", but the
user's input is invisible (half duplex) or blotted out (like, shows only
bullets)?

Thanks in advance.

-Chris Nitz

--start script
set TheServer to "www.DomainName.com"
set UserName to text returned of
(display dialog "What is your USER ID?" default answer "your username")
set
UserPassword to text returned of (display dialog "What is your PASSWORD?"
default answer "your password")
set TheURL to ("http://"; & UserName & ":" &
UserPassword & "@" & TheServer & "/ThisIsATest.txt") as string
tell
application "Finder"
set FileSpec to ((name of startup disk) & ":Desktop
Folder:TemporaryFile.txt") as string
end tell
tell application "URL Access
Scripting"
download (TheURL as string) to file (FileSpec as string) replacing
yes
end tell
--end script
_______________________________________________
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.

  • Prev by Date: UI Scripting: Setting Save As Folder
  • Next by Date: RE: UI Scripting: Setting Save As Folder
  • Previous by thread: RE: UI Scripting: Setting Save As Folder
  • Next by thread: Re: Dialog box with secure text entry?
  • Index(es):
    • Date
    • Thread