あなたはこのAHKスクリプトコードを使用することができます - あなたはシンプルに任意のテキストを入力し、システム上の任意のテキストを選択することができます。コンピュータは、使用する必要のあるブラウザとgoogleを実行できる場所を自動的に見つけます。 YOUは、ワンボタンクリックで翻訳をDO(キーボードのF8キーをクリックして、それが行われ、その後、任意のテキストを選択します。)CAN
f8:: ; Select any text and then press f8 - you can do in one buttonclick a Google Translation with query parameters [us]
; + = Shift
; ! = Alt
;^= Ctrl
; # = Win (Windows logo key)
GroupAdd, Browser, ahk_class Chrome_WidgetWin_1 ; Chrome or Iron
GroupAdd, Browser, ahk_class IEFrame ; Internet Explorer
GroupAdd, Browser, ahk_class MozillaWindowClass ; FireFox
GroupAdd, Browser, ahk_class ApplicationFrameWindow ; Edge
If WinActive("ahk_group Browser")
{
send ^c
sleep 150
send ^t ; CTRL+t this will [open a new tab] + goto adress bar - and use CTRL+L for the active tab + goto address bar
sleep 150
texta = https://translate.google.com/#auto/us/
textb = %clipboard% ;selected text
clipboard=%texta%%textb%
sleep 150
send ^v ; paste the selected text
sleep 150
send {enter}
clipboard=%textb%
} else {
send ^c ;copy the selected text to clipboard memory
sleep 150
texta = https://translate.google.com/#auto/us/
textb = %clipboard% ;selected text
clipboard=%texta%%textb%
run %clipboard%
clipboard=%textb%
}
return
ヒント:私は(あなたが30日にそれをテストすることができbuttoncommanderソフトウェアでそれを使用しますトライアル) - これであなたのデスクトップ上で、自分のお気に入りのツールバーボタンのセットを作ることができます、任意のボタンは、写真からautohotkeyコマンドスクリプトを実行することができます。たとえばFlagsという言語で画像を作成できます。あなたのマウスまたはタッチデバイスでそれをプッシュし、それが行われます。 Click Here
ホットキーを使用して翻訳をナビゲートしてからクエリを入力する方が簡単ではないでしょうか? –
** IF **単語を入力する必要があるフィールドにカーソルがあります。 また、Gの翻訳ページを0.1秒間読み込むのを待つ必要があるというUXの突っ込みがあります。単語を入力するとより堪能で、翻訳を待つのではなく、翻訳待ちです単語を入力した後に翻訳ウィンドウを待つ...(しかし、それは純粋な推測だ、私はあなたのバージョンを試してみたい) –