text = clipboard.get_selection()
window.activate("Firefox")
if window.wait_for_focus(".*Firefox.*"):
keyboard.send_keys("<ctrl>+t")
keyboard.send_keys("<tab>python "+text+"<enter>")
This assumes Firefox is already open somewhere. The <tab> gets the
cursor into the search box for my browser configuration. It might
have to be adjusted if your search box is somewhere else. Otherwise,
you could just put the google url with search terms into the url box.
Derek
import time
text = clipboard.get_selection()
output = system.exec_command("chromium-browser https://translate.google.com/#en/sk/")
keyboard.send_keys(output)
time.sleep(1.25)
keyboard.send_keys(text)
keyboard.send_keys("<shift>+<ctrl>+n")
import time
keyboard.send_keys("<alt>+e")
time.sleep(0.05)
keyboard.send_key("d")
import easygui
myname = easygui.enterbox("Enter your name")
#first syntax version for msgbox
easygui.msgbox("Your name is :\n" + myname)
#second syntax version for msgbox
#easygui.msgbox("Your name is :\n '%s'" % myname)
This is brilliant, we need more posts like this. I am not a python guy, I use mainly text expansion, but will post some of my "best" uses for autokey. We need to get a bigger audience!
Steve
Sent from Blue Mail
This is brilliant, we need more posts like this. I am not a python guy, I use mainly text expansion, but will post some of my "best" uses for autokey. We need to get a bigger audience!
Steve
--
You received this message because you are subscribed to the Google Groups "autokey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autokey-user...@googlegroups.com.
if 'Mail.Thunderbird' in winClass:
#copy emails reply-to address (try to get email address for message)
keyboard.send_keys('<ctrl>+r')
time.sleep(0.6)
#if expected reply window open then continue
subwinClass = window.get_active_class()
if 'Msgcompose.Thunderbird' in subwinClass:
keyboard.send_keys('<alt>+r<tab><tab>')
time.sleep(0.1)
keyboard.send_keys('<ctrl>+c<ctrl>+<f4>')
elif 'Msgcompose.Thunderbird' in winClass:
keyboard.send_keys('<alt>+r<tab><tab>')
time.sleep(0.1)
keyboard.send_keys('<ctrl>+c')
#cleanup email
if 'Msgcompose.Thunderbird' in winClass or 'Mail.Thunderbird' in winClass:
time.sleep(0.1)
strEmail = clipboard.get_clipboard()
if strEmail:
if "<" in strEmail:
strPos = strEmail.find("<")
strPos=strPos+1
strEmail = strEmail[strPos:]
if ">" in strEmail:
strPos = strEmail.find(">")
strEmail = strEmail[:strPos]
if "(" in strEmail:
strPos = strEmail.find("(")
strPos=strPos+1
strEmail = strEmail[strPos:]
if ")" in strEmail:
strPos = strEmail.find(")")
strEmail = strEmail[:strPos]
time.sleep(0.2)
clipboard.fill_clipboard(strEmail)