Reputation: 499
I have recently been working on a project that requires the user's password to be copied to the clipboard. I have this much:
set usr to short user name of (system info)
repeat
display dialog "Please enter login password to continue:" default answer "" buttons {"Submit"} with title "Enter password" with icon stop with hidden answer
set pswd to text returned of the result
try
set a to do shell script "echo test" user name usr password pswd with administrator privileges
exit repeat
end try
end repeat
set the clipboard to a
However, the clipboard simply sets to "test," presumably from where it says "echo test"
How do I fix this problem to set the password entered to the clipboard?
Upvotes: 1
Views: 617