One final note - it actually didn't work until I added an extra
backslash for every one in the original - I guess in Autokey the
backslash is some sort of escape thingie. Anyway, for those who are
interested, here's the final script that works - its handy for
checking just the titles of emails really quickly.
If anyone can figure out how to get it to write the list out to a file
instead of print it, I think that would be even more valuable.
if window.wait_for_exist(".*david@linux.*", timeOut=.5):
window.activate("david@linux", switchDesktop=False)
keyboard.send_keys("clear<enter>")
keyboard.send_keys("""curl -u accountname --silent "https://
mail.google.com/mail/feed/atom" | perl -ne 'print "\\t" if //; print
"$2\\n" if /<(title)>(.*)<\/\\1>/;'""")
keyboard.send_key("<enter>")
keyboard.send_keys("accountpassword<enter>")
else:
system.exec_command("gnome-terminal", False)
time.sleep(0.5)
keyboard.send_keys("""curl -u accountname --silent "https://
mail.google.com/mail/feed/atom" | perl -ne 'print "\\t" if //; print
"$2\\n" if /<(title)>(.*)<\/\\1>/;'""")
keyboard.send_key("<enter>")
keyboard.send_keys("accountpassword<enter>")