Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5934855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:10:21+00:00 2026-05-22T15:10:21+00:00

Hey guys. Working on Mac OSX 10.6, My problem is that I would like

  • 0

Hey guys.
Working on Mac OSX 10.6,
My “problem” is that I would like a secure password on my user account, but hate the trouble of having to paste it in whenever a process needs admin privileges.

I use Autopilot, and figure it’s the best way to input this, so i can
1 use straight applescript to input,
2 use a shell script with “osascript…”
3 launch an applescript compiled application
4 use the text expansion facility in Autopilot (doesn’t seem to work in this case)

The script that I have so far is:

    set the clipboard to "FooBar"
    set resultAnything to the clipboard as text

When I execute in script editor my result is “FooBar”
But I can’t get it to work anywhere else.

I can’t use

    set the clipboard to "FooBar"
    tell application "System Events"
    keystroke "v" using command down
    end tell

Because the password dialogue doesn’t seem to accept the command+v paste method.

Any help?
By the way I did scour the net and stackoverflow before posting this question, so forgive me if I overlooked anything already posted.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:10:22+00:00Added an answer on May 22, 2026 at 3:10 pm

    Security-wise it’s probably better to store your password in the login keychain and retrieve it from there when you need it. (That way you must be logged-in for the password to be available. If you just keep the password in an applescript, it is accessible to anyone who has access to the applescript file.)

    Try the following:

    1. Open Keychain Access (/Applications/Utilities)
    2. Press the ‘+’ button at the bottom of the window while the login keychain is selected
    3. Enter a Keychain Item Name, Account Name and your server Password. You will need the Keychain Item Name again.
    4. Make a new Applescript containing the following code, replacing myKeyname with the Keychain Item Name
    5. Select ‘Always Allow’ and ‘Allow’ when you first run the script. This will allow Keychain Access to get the password automatically when you are logged in.

    The code:

    set keyName to "myKeyname" -- replace myKeyname with the Keychain Item Name from step 3
    tell application "Keychain Scripting"
        tell keychain "login.keychain"
            set myPass to password of (some key whose name is keyName)
        end tell
    end tell
    tell application "System Events"
        keystroke myPass
    end tell
    

    Credits:

    • Keychain scripting code came from anika123 here: http://hintsforums.macworld.com/showthread.php?t=108626
    • System events code came from Lri in the first answer to this question
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hey guys im working on a task to make my story's links like this
Hey guys, I'm working on a status-Updater. It works, there is just one problem,
Hey guys, I'm working on a program for a university course that uses a
Hey guys, Im working with wpf 3d, im currently writing a program that will
Hey guys. I'm working in WinForms and trying to create a ComboBox control that
Hey guys I'm currenlty working on something and I want if I click a
Hey guys, working on an event calendar. I'm having some trouble getting my column
Hey guys, I was working on a simple chat program to brush up on
Hey Guys...need help. Working on a project and get this error on the Output
Hey guys, I am working on a game, and wanted to add a screen

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.