Your best friend for file transfer.Fetch
Using Applescript and getting a password prompt (3 posts)
- Started 13 years ago by killingtime
- Latest reply 13 years ago from killingtime
I was wondering if anyone knows a way to get a prompt asking for a username and password from a user in AppleScript. I don't mind whether it is done from inside a "tell fetch" or not.
Jim Matthews Administrator
You can use display dialog to ask for a username:
set dialogResult to display dialog "Please enter a user name:"
if button returned of dialogResult = "OK" then
set username to text returned of dialogResult
I searched the applescript-users mailing list ( http://search.lists.apple.com/applescript-users ) and found a reference to a scripting addition that lets you ask for a password. It's found at:
I haven't tried it myself.
Thanks, I found, just incase someone else comes across the same problem, that I was having some problems with that script addition (compaining about syntax errors, I think because password is already a reserved command). Anyway I used askPassword from http://www.osaxen.com/system.html and that solved it just fine :).
- Page 1
This topic has been closed.