Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Write, type, enter or output text and/or password

Automator seems really good at 'asking for' or 'getting' text.
Even 'speaking' text.
But does it write text to a screen location???

Like Silent Steve on 10/31 and tpeasetiger on 10/30 in this forum, I'm frustrated at this apparent lack of functionality.

And specifically, even though I know that Safari will remember my password, that's not the point. I WANT to have automator insert it for me.

So, to those who have worked a lot with automator, is this possible? If not, I may groan... but I'll stop wracking my brain. 8-)

iMac 17" dual core, Mac OS X (10.5)

Posted on Nov 3, 2007 6:33 AM

Reply
3 replies

Nov 3, 2007 9:02 AM in response to Swampgoat

Simple answer is "No".

The real answer is along the lines of sort of, but not purely with Automator. It may be possible to use AppleScript to do it, and then insert that into a "Run AppleScript" action in an Automator workflow, but there's really no point when you'd have the AppleScript. In that case, it'd be best to ask in the AppleScript forum.

The issue of using AppleScript (or any scripting or programming) for inserting passwords is the lack of security for storing the passwords. The password would very likely have to be in plain text completely visible in the script. On the other hand, Safari uses your keychain of passwords which is encrypted so it can't be viewed in plain text. When Safari needs it, it gets the password from your keychain in a secure manner, but only because you gave Safari the okay to have permission to receive it, either for one time only or for all of the time.

As for Automator's lack of functionality for inserting text at a specific screen location, I'd say that is by design. The basic idea behind Automator is for repeating a workflow, which really doesn't mean becoming the computer user. Automator isn't for moving the mouse here and there, and pressing a key here and there. Instead, it's for getting results in the way the computer can itself, and the computer doesn't need to use a mouse or the keyboard to do the same tasks.

For example, if you need to save a web page, you might type in the URL address and press the Return key, wait for the page to load, then choose the Save command from the menu (or maybe use the keyboard shortcut), and then accept the settings for saving. Using Automator isn't about performing the steps of a person interacting with the computer, it's about getting the final results as a computer.

I find it helps to keep that in mind when creating workflows with Automator: what results do I want, and what methods (actions) can the computer do.

Nov 3, 2007 4:16 PM in response to Swampgoat

And specifically, even though I know that Safari will remember my password, that's not the point. I WANT to have automator insert it for me.


Fair enough. You might try something along these lines:

1) *Get Specified Text* -- from Automator's TextEdit library. Enter your password into the text box.

2) *Copy to Clipboard* -- from the System library.

3) *Run AppleScript* -- from the Automator library. Your AppleScript could look like this:

on run {input, parameters}
tell application "Safari"
activate
tell application "System Events"
keystroke "v" using command down
end tell
return input
end tell
end run

Save the workflow as an application so that it can be run from the Dock, or save it as a plug-in, to be run from the Scripts Menu.

The workflow is designed to work when the Safari page requiring the password is open and the flashing insertion point has been entered into the password field.

As a test, I tailored a version of the above workflow so that I could log into my Hotmail account in Safari, and it worked for me.

Good luck!

Andrew99

Write, type, enter or output text and/or password

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.