Re: Hidden Password
Re: Hidden Password
- Subject: Re: Hidden Password
- From: Gnarlodious <email@hidden>
- Date: Fri, 27 Dec 2002 08:51:44 -0700
Entity Sgt. Pepper spoke thus:
>
My question is how do I get the text typed in by the
>
user to be hidden as done by so many website
I couldn't do it so this is my solution:
property KeyNumber : 0
property theVolume : ""
if KeyNumber = 0 then
tell me to display dialog "Key number ?" default answer ,
"" buttons {"Cancel", "OK"} default button 2 with icon 1 giving up
after 60
set KeyNumber to the text returned of the result as integer
tell application "Keychain Scripting"
unlock current keychain
set theVolume to volume of AppleShare key KeyNumber of current
keychain as string
end tell
end if
tell application "Finder" to set volExists to exists (+class cdis;
theVolume)
if volExists = false then
tell application "Keychain Scripting"
unlock current keychain
set theAccount to account of AppleShare key KeyNumber of current
keychain as string
set theServer to server of AppleShare key KeyNumber of current
keychain as string
set theVolume to volume of AppleShare key KeyNumber of current
keychain as string
set thePassword to password of AppleShare key KeyNumber of current
keychain as string
end tell
try
mount volume theVolume on server theServer ,
as user name theAccount with password thePassword
on error
display dialog "Could not mount \"" & theVolume & " \"" buttons
{"Cancel"} with icon stop
return
end try
end if
>
>> ********************************
>
>> To see all keys in my keychain I run this:
tell application "Keychain Scripting"
set theName to ((name of current keychain) as string)
unlock current keychain
set theKey to 1
try
repeat
set theName to name of AppleShare key theKey of current keychain
as string
set theAccount to account of AppleShare key theKey of current
keychain as string
set theZone to zone of AppleShare key theKey of current keychain
as string
set theServer to server of AppleShare key theKey of current
keychain as string
set theVolume to volume of AppleShare key theKey of current
keychain as string
display dialog ,
"Key Number:" & theKey & return & ,
"Name: " & theName & return & ,
"Account: " & theAccount & return & ,
"Zone: " & theZone & return & ,
"Server: " & theServer & return & ,
"Volume: " & theVolume
set theKey to theKey + 1
end repeat (* *)
end try
end tell
>
>> ********************************
Still haven't worked the latter script into an error handler though, but
this method works well for me. There is some trick to setting an appleshare
key in Keychain, ask for details.
Hope that makes sense . . .
-- Rachel
http://www.Spectrumology.com
AIM Gnarlodious
_______________________________________________
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.