0

Autohotkey で GUI を使用する方法を学習しており、小さなスクリプトを作成しているので、挿入ボタンを押すと Google をすばやく検索できます。ラジオ ボタンの使い方がわからないので、たとえば、Google または Bing の検索を選択できるとします。「Google が選択されている場合は、Google でクエリを検索してください」のコードがわかりません。

^Insert::
MsgBox,4,, Would you like to reload?, 3

IfMsgBox, no
Return
IfMsgBox, Timeout
Return
Reload

Insert::
Gui, Add, Text,, Search Google:
Gui, Add, Edit, vSearchQuery ym  ; 
Gui, Add, Button, default, Search  
Gui, Show,, Quick Search
return


GuiClose:
ButtonSearch:
Gui, Submit  
Run, http://www.google.com/search?hl=en&q=%searchQuery% 
Reload

4

1 に答える 1

0

簡単な例を次に示します。

Gui Add, Radio, vEngine, Google
Gui Add, Radio,, Bing
Gui Add, Button, h25 w126 Default,OK
Gui Show
Return

ButtonOK:
Gui Submit
if Engine = 1
    msgbox % "You chose Google!"    
else if Engine = 2
    msgbox % "You chose Bing!"
ExitApp
于 2013-09-23T14:14:48.687 に答える