Comments on: learns_to use Expect for Easy Automation http://urbanhonking.com/ideasfordozens/2006/10/20/learns_to_use_expect_for_easy/ Thu, 19 Jun 2014 09:26:37 +0000 hourly 1 By: Alex http://urbanhonking.com/ideasfordozens/2006/10/20/learns_to_use_expect_for_easy/#comment-219 Sat, 31 Mar 2007 00:09:21 +0000 http://urbanhonking.com/ideasfordozens/2006/10/20/learns_to_use_expect_for_easy/#comment-219 another comment, regarding “expect” –
you can add returns after commands by following them with r, as in
send “MySecretPasswordr”
which follows the command with a carriage return (which, for some reason, is preferred over the newline character).

]]>
By: Alex http://urbanhonking.com/ideasfordozens/2006/10/20/learns_to_use_expect_for_easy/#comment-218 Sat, 31 Mar 2007 00:06:15 +0000 http://urbanhonking.com/ideasfordozens/2006/10/20/learns_to_use_expect_for_easy/#comment-218 Re:curt:
If you applescript, I would suggest that you check out the “System Events” application. try calling it by opening up Smile (or whatever you use) and running the script
tell application “System Events” to activate
and then, if you use Smile, go to the System Events dictionary.
For helping you navigate UI’s, you should check out apple’s UI Element Inspector, a free download. The only thing you can’t script with System Events are those little triangles that are in some dialog boxes 🙁

]]>
By: Greg http://urbanhonking.com/ideasfordozens/2006/10/20/learns_to_use_expect_for_easy/#comment-217 Sat, 21 Oct 2006 12:11:03 +0000 http://urbanhonking.com/ideasfordozens/2006/10/20/learns_to_use_expect_for_easy/#comment-217 What applications did you want to automate? Expect only works from the command line, but lots of primarily GUI-based OS X applications come with command line tools as well so you might be able to figure out how to make it happen with expect.
Another way of thinking about it is: what task do you want to accomplish? Even if the particular app you normally use doesn’t have a command line tool, there might be one around that’ll get the job done.

]]>
By: curt http://urbanhonking.com/ideasfordozens/2006/10/20/learns_to_use_expect_for_easy/#comment-216 Sat, 21 Oct 2006 09:14:31 +0000 http://urbanhonking.com/ideasfordozens/2006/10/20/learns_to_use_expect_for_easy/#comment-216 Wow. Thanks for pointing this out. Do you know how well it interacts with GUI-based applications? I can think of some automation I’d like to accomplish among applications on my Mac that don’t have applescript or automator dictionaries.

]]>