Auto filling password/test

Hi there, I'm new here so please excuse my noob questions.

I have a mac app when i launch that app, i need to automate this process (if possible)

  1. Press a connect button
  2. After 10 seconds enter a password
  3. Switch to another text box automatically and enter a text, something like "sms"
  4. Finally click OK button

Can anyone tell me how to automate this?


Welcome to the group. Hope you have many KM macros ahead of you.
The quickest way to start on this is to record your steps within KM, then you will see what KM is doing.
Then you can edit it.
Pause or pause until will handle the delay
Suggest you write a DIFFERENT macro using say textedit so you understand insert text action,
Then the buttons connect and OK should be straightforward
If possible use dropdown menu options rather than position the cursor to hit a button.

1 Like

Yep. You can review the KM Wiki links below to get some ideas of Actions you can use.
If you have not yet written your first, macro, then you would be well served by first reading the "Getting Started" section below.

  1. Press a connect button
  2. After 10 seconds enter a password
  3. Switch to another text box automatically and enter a text, something like "sms"
  4. Finally click OK button
    • Same as #1


@cyberdevz, welcome to Keyboard Maestro (KM) and its Forum.
KM is one of the best Mac automation tools available, its Forum is one of the best and friendliest forums on the Internet. Whenever you reach a tough stumbling block trying to use KM, please feel free to post your question/problem here for help.

You will also find this helpful:
Tip: How Do I Get The Best Answer in the Shortest Time?

Getting Started with Keyboard Maestro

For more help, see Getting Started with Keyboard Maestro and the Forum .


1 Like

Thank you @jonathonl and @JMichaelTX

To be honest I have no idea how to write a macro especially when its this complicated but i will definitely go through those docs.

Thank you :slight_smile:

I have some good news!

With your help i managed to semi-automate this with these triggers / actions :slight_smile:

  1. First trigger - hotkey (shortcut key combo)
  2. Press button connect
  3. Pause until a button enabled
  4. Insert text by pasting - password
  5. Type the tab keystroke
  6. Insert text by pasting - 2nd text
  7. Press button ok

It's working great. However, I have few questions/concerns :

  1. Insert text by pasting action is not that safe because it's in plaintext. If i open the macro I can see the password. Can I hide this or use some masked text etc?

  2. This is working great so far, but I'd like to fully automate this. When I login to my mac by entering a password, can i open this app automatically, auto click the connect button etc? I'm trying to replace/automate the 1st hotkey trigger.

not sure about 1, but see later

try the following triggers as well as your hot key, just add them
trigger on login, km engine restart and status menu

also, this is not needed, but to give you ideas
try typing on string trigger e.g. if you type qqkf then it types Keyboard Maestro Forum
also use this technique to autocorrect your common typos
and qq== OR zx== types ===================================

I use both qq and zx as escape string triggers followed by two char
e.g. qq07 or zx07 for my mobile

Finally going back to 1 above
create three macros
macro a types first four chars of password
macro b types rest of password
macro c calls macro a slight pause then macro b

best i can think off

nb use type not paste

Finally again , create macro called loginrestart that is triggered by login and restart that calls your setup macro. then remove the triggers on the setup macro as it is now called and
add a comment action so you know what it is doing etc

You can use your Mac Keychain to make a more secure paste of your password:


Yes. You can use a Login trigger.
There is also a Wake trigger in case you might find that useful.

1 Like