Send info to google translation

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
empardopo
Posts: 336
Joined: 06 Oct 2013, 12:50
Location: Spain
Contact:

Send info to google translation

04 Apr 2014, 06:23

I have this source

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
^!I::
Send ^c
Run http://translate.google.es/#en|es|%Clipboard%
Return
I need to be able to select a text from any application and when I press ^!I my program has to open the default navigator with the selected text.
My problem is that the program not copy the selected text to the clipboard.

Any help, please?
Thanks in advance.
Everything is possible!
User avatar
noname
Posts: 515
Joined: 19 Nov 2013, 09:15

Re: Send info to google translation

04 Apr 2014, 11:55

You can try it like this:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
^!I::
Send ^c
ClipWait, 2
google_url:="http://translate.google.com/#en/es/" clipboard
Run %google_url%
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, Google [Bot], mikeyww and 420 guests