Code: Select all
#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode 2
hasExecuted := 0
~v::
if (hasExecuted = 0) {
hasExecuted := 1
Run, chrome.exe "http://www.google.com/search?q=traductor español ingles"
WinGet, browserWindowID, ID, ahk_exe chrome.exe
Sleep 600
ControlClick, x62 y500, ahk_id %browserWindowID%, , left
Send ^{Tab}
Send ^{w}
Sleep 30
Send !{Tab}
}
return
~v Up::
if (hasExecuted = 1) {
hasExecuted := 0
Send {CapsLock Down}
Sleep 6000
Send {CapsLock Up}
}
return
[Mod action: Topic moved to v1 section since this is v1 code.]