Can Automator do ALL that Quickeys used to? (workflow question)

I'd like to be able to restart my xserve nightly to help one of my (pee-c) apps run more smoothly. I understand how to make an iCal-related trigger, and tossing the apps I want running into the start-up folder, but what about the typing of the text necessary for the server log in screen? How do I get Automator to add text, tab, then text, return?

I miss Quickeys. It seemed a lot more robust than Automator.

Thanks

XServe G4, Mac OS X (10.4.11)

Posted on Jun 3, 2008 3:19 AM

Reply
3 replies

Jun 4, 2008 9:40 AM in response to papiamento

How do I get Automator to add text, tab, then text, return?


papiamento,

Not having any experience with XServe I can't give you a definitive answer. As a guide, I can offer the following Automator workflow example, one which is designed to enter text into a field, tab to the next field, enter some different text, and then hit Return.

This example launches an application (Safari), opens a URL (my hotmail.com login page), types in my hotmail email address, hits the Tab key, types in my hotmail password and then hits Return (hotmail's Sign in button), thus logging me in to hotmail:

1) *Launch Application* -- From Automator's Finder library. From the drop-down menu I chose Safari.

2) *Get Specified URLs* -- From the Safari library. I deleted the default apple.com address, hit the "+" sign, added the URL for my hotmail login page and checked the box to make it active.

3) *Display Webpages* -- From the Safari library.

4) *Get Specified Text* -- From the TextEdit library. I simply typed my hotmail email address into the field provided.

5) *Copy to Clipboard* -- From the System library.

6) *Type Keystroke* -- this Automator action can be downloaded here. After installing the action and adding it to my workflow, I typed the letter "v" without the quotes into the field provided and checked Hold Down Command Key.

As an alternative, a Run Applescript action can be used in step 6 (and in step 10):

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

7) *Run AppleScript* -- From the Automator library. This step is designed to press the Tab key. Here's the script:

*on run {input, parameters}*
*tell application "System Events"*
*keystroke tab*
*end tell*
*return input*
*end run*

8) *Get Specified Text* -- Now that step 7 has tabbed the insertion point into the next (password) field, I needed to enter my hotmail password. I typed my password into the field provided.

9) *Copy To Clipboard*

10) *Type Keystroke* -- A repeat of step 6; I typed "v" and checked Hold Down Command Key.

11) *Run AppleScript* -- Needed in order to press Hotmail's Sign In button (hits the Return key):

*on run {input, parameters}*
*tell application "System Events"*
*keystroke return*
*end tell*
*return input*
*end run*

Note that GUI scripting must be enabled. Under System Preferences > Universal Access, make sure "Enable access for assistive devices" is checked.

Also note that an AppleScript by itself can be used to accomplish the same thing. Below is a modified version. Those with a hotmail account interested in trying it would first need to change the email address and password where indicated:

tell application "Safari"
activate
open location "http://login.live.com/login.srf?id=
2&svc=mail&cbid=24325&msppjph=
1&tw=0&fs=1&fsa=1&fsat=1296000&lc=
1033&_lang=EN&RU=http%3a%2f%2f
www.hotmail.msn.com%2fcgi-bin%2fsbox%
3frru%3d%252fcgi-bin%252fhmhome%
26reason%3dnocookies"
delay 3
tell application "System Events"
tell process "Safari"
set the clipboard to " MyEmailAddress@hotmail.com"
keystroke "v" using command down
keystroke tab
delay 1
set the clipboard to " MyPassword"
keystroke "v" using command down
keystroke return
end tell
end tell
end tell

Either the Automator workflow or the Applescript can be saved as an application, opened as a login item or opened via iCal.

Good luck!

Andrew99

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can Automator do ALL that Quickeys used to? (workflow question)

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