Shortcut inserts text in password field

Hi everyone, i am a noob, i found automator by accident in my macbook and i would like to use it, i would like to have a script that gives me possibility to insert a certain text when i press a shortcut i decide, it has to work in password fields too and to be more specific the ones used to register an account with yahoo, i say this because i tried typinator and it’s a good app but cannot type in password fields.
Can anyone please tell me which are the commands to create such script? I presume i will have to use the applesript editor in automator.
Thank you all for the time you will spend reading and answering.
:rolleyes:
UPDATE: i solved using keyboard maestro, creating a macro activated by hotkey trigger but can be only work in password fields if the hotkey is not typed, so i used shift+q and it works.
Sorry i did not use automator but this is so much simpler.