Re: Hidden password entry in applescript
Re: Hidden password entry in applescript
- Subject: Re: Hidden password entry in applescript
- From: Graff <email@hidden>
- Date: Wed, 30 Jun 2004 00:34:16 -0400
You either need to use an OSAX that provides a password dialog box or
you have to use AppleScript Studio and use the password dialog field
from Project Builder. There is no native AppleScript password dialog
box or field.
However! In the case of the mount volume I believe if you simply leave
the password out a password dialog will automatically pop up. In fact
if you leave out the username and the password then the same password
dialog box will pop up and ask for both. So you probably don't need
most of this script. You only really need the "mount volume" command:
mount volume "smb://192.168.1.10/"
I'm not certain on this because I hardly ever use the "mount volume"
command but I'm pretty sure that's all you need.
- Ken
On Jun 29, 2004, at 10:55 PM, email@hidden wrote:
I am trying to get a script that prompts for a username and password
then mounts a smb share based on the username. Unfortunately the
way that I have done it the password shows up instead of being masked
from people looking over my shoulder. I need a text feild for which
the
characters of the password are replaced by dots.
Does anyone have any suggections. I have tried to get Dialog Director
to
work but couldn't get any of the examples to work. I am using Mac OS X
10.2 and 10.3 on the various machines. Here is what the script looks
like
+now:
tell application "Finder"
activate
display dialog "Enter your username" default answer ""
set dialogInfo to result
set userName to text returned of dialogInfo
display dialog "Enter your password" default answer ""
set dialogInfo to result
set yourpassword to text returned of dialogInfo
--if not (exists disk userName & "$") then
mount volume "smb://" & userName & ":" & yourpassword & "@" &
+"192.168.1.10/" & userName & "$"
--end if
end tell
_______________________________________________
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.