您好,控件的执行逻辑是,当你点击控件的时候,v变量会保存你点击控件的的信息:
#SingleInstance Force#NoEnv
;#Include <FindText>
WinActivate ahk_class MapleStoryClass
WinGetPos, pX, pY, pW, pH, ahk_class MapleStoryClass
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
Gui Font, s9, Segoe UI
Gui Font, s10
Gui Add, Text, x60 y30 w38 h25 +0x200 , 自选:
Gui Font, s9, Segoe UI
Gui Add, ComboBox, x114 y30 w120 v自选, 物理攻击|魔法攻击|暴击率|伤害|移速
Gui Font, s15 cRed
Gui Add, Text, x15 y93 w85 h31 +0x200 , F1:开始
Gui Font, s9, Segoe UI
Gui Font, s15 cRed
Gui Add, Text, x126 y93 w85 h31 +0x200 , F5:刷新
Gui Font, s9, Segoe UI
Gui Font, s15 cRed
Gui Add, Text, x238 y93 w85 h31 +0x200 , 空格暂停
Gui Show, w330 h151, 自选洗怪怪
Return
Text1:="|<物理攻击>*142$90.qzw1zTyzxzzzzzzqz5hzTyzxzzzzzzK1hh1TU3xzzzrvh1Jg1r1yz03zvbnJLJhhqvyzxvrvrnHrJ5hpP01xvzUrfJmpg1rPyzxvzvrPW6hjjrLivvvzvr1mphg1ljivvvzzrverRbjDLivrvrzXlhqxDjyvU3jvzzzzzpns1xxzvT7zzzzzU"
Text2:="|<魔法攻击>*145$90.zTjTzTyzxzzzzzzU1rTzTyzxzzzzzzhrzT1TU3xzzzrvhUVs3r1yz03zvbnJZJTTqvyzxvrvrnHc3jTpP01xvzUrfJfPk1rPyzxvzvrPWc3yzrLivvvzvr1mevqrljivvvzzrvec3hvDLivrvrzXlhhJM1yvU3jvzzzzzHVzxxxzvT7zzzzzU"
;这是不是要把Text的值分别对应赋给这里面Gui Add, ComboBox, x114 y30 w120 v自选, 物理攻击|魔法攻击|暴击率|伤害|移速
F1::
gui,Submit,NoHide
MsgBox % 自选
;loop{
;Sleep 100
;Click 708, 95 2
;Sleep 100
;Click 411, 132
;Sleep 100
;Click 733, 443
;Sleep 200
;GuiControlGet, 自选 ;然后在这调用选项 ?
;if (ok:=FindText(X:=”wait”, Y:=1, pX, pY, pX+pW, pY+pH, 0, 0, Text1))
;{
;break
;}
;Sleep 500
;}
;Return
;Return
;space::
;Pause
;Return
;F5::
;Reload
;Return
Return
GuiEscape:
GuiClose:
ExitApp
下拉组合框算是弄明白了 感谢指点 可能是我表达的不够清楚 已经用笨办法解决了
#SingleInstance Force
#NoEnv
#Include
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
WinActivate ahk_class MapleStoryClass
WinGetPos, pX, pY, pW, pH, ahk_class MapleStoryClass
Gui -MinimizeBox -MaximizeBox
Gui Font, s9, Segoe UI
Gui Add, Text, x19 y133 w52 h29 +0x200, F1:开始
Gui Add, Text, x122 y133 w52 h29 +0x200, F5:刷新
Gui Add, Text, x116 y166 w62 h29 +0x200, ESC:退出
Gui Add, Text, x19 y166 w52 h29 +0x200, 空格暂停
Gui Add, Radio, x17 y17 w70 h22 v选择1, 物理攻击
Gui Add, Radio, x109 y17 w70 h22 v选择2, 魔法攻击
Gui Add, Radio, x66 y56 w70 h22 v选择3, 暴击率
Gui Add, Radio, x17 y89 w70 h22 v选择4, 伤害
Gui Add, Radio, x109 y89 w70 h22 v选择5, 移速
Gui Show, x1478 y806 w191 h203, 自选洗怪怪
Return
GuiEscape:
GuiClose:
ExitApp
~F1::
Gui, Submit, NoHide
if (选择1 = 1)
{
; MsgBox 物理攻击
loop{
WinActivate ahk_class MapleStoryClass
Sleep 100
Click 708, 95 2
Sleep 100
Click 411, 132
Sleep 100
Click 733, 443
Sleep 200
Text:=”|*142$90.qzw1zTyzxzzzzzzqz5hzTyzxzzzzzzK1hh1TU3xzzzrvh1Jg1r1yz03zvbnJLJhhqvyzxvrvrnHrJ5hpP01xvzUrfJmpg1rPyzxvzvrPW6hjjrLivvvzvr1mphg1ljivvvzzrverRbjDLivrvrzXlhqxDjyvU3jvzzzzzpns1xxzvT7zzzzzU”
if (ok:=FindText(X:=”wait”, Y:=1, pX, pY, pX+pW, pY+pH, 0, 0, Text))
{
break
}
Sleep 200
}
}
else if (选择2 = 1)
{
; MsgBox 魔法攻击
loop{
WinActivate ahk_class MapleStoryClass
Sleep 100
Click 708, 95 2
Sleep 100
Click 411, 132
Sleep 100
Click 733, 443
Sleep 200
Text:=”|*145$90.zTjTzTyzxzzzzzzU1rTzTyzxzzzzzzhrzT1TU3xzzzrvhUVs3r1yz03zvbnJZJTTqvyzxvrvrnHc3jTpP01xvzUrfJfPk1rPyzxvzvrPWc3yzrLivvvzvr1mevqrljivvvzzrvec3hvDLivrvrzXlhhJM1yvU3jvzzzzzHVzxxxzvT7zzzzzU”
if (ok:=FindText(X:=”wait”, Y:=1, pX, pY, pX+pW, pY+pH, 0, 0, Text))
{
break
}
Sleep 200
}
}
else if (选择3 = 1)
{
; MsgBox 暴击率
loop{
WinActivate ahk_class MapleStoryClass
Sleep 100
Click 708, 95 2
Sleep 100
Click 411, 132
Sleep 100
Click 733, 443
Sleep 200
Text:=”|*142$66.q3yzyzzzzzzqvyz01zzzzzm3U3xzzzXXhKvyzffzvRRJK3yzkLrvRRHLL01yzzUvRJK3yzpLzvrRWrLivc/zvjRmo1ivyzzzTReefiv01rz1Xhd5U3yzzzzzzSfzvyzzzzzzU”
if (ok:=FindText(X:=”wait”, Y:=1, pX, pY, pX+pW, pY+pH, 0, 0, Text))
{
break
}
Sleep 200
}
}
else if (选择4 = 1)
{
; MsgBox 伤害
loop{
WinActivate ahk_class MapleStoryClass
Sleep 100
Click 708, 95 2
Sleep 100
Click 411, 132
Sleep 100
Click 733, 443
Sleep 200
Text:=”|*144$54.vTyzzzzzzvT01zzzzzr1SxzzXXhqzU3zvRRJZjyzrvRRHLjU3zUvRJq1yzzvrRWrh01zvjRmrRyzzzTRerRU3rz1XhqxjvzzzzzpnU3zzzzzU”
if (ok:=FindText(X:=”wait”, Y:=1, pX, pY, pX+pW, pY+pH, 0, 0, Text))
{
break
}
Sleep 200
}
}
else if (选择5 = 1)
{
; MsgBox 移速
loop{
WinActivate ahk_class MapleStoryClass
Sleep 100
Click 708, 95 2
Sleep 100
Click 411, 132
Sleep 100
Click 733, 443
Sleep 200
Text:=”|*143$71.vTzjTTzTzzzyC77TE303zzzzPjyzxyrTzzSCezsD0Q0DzQvUvkPGqvRxyxrPfvqphq3zkPiaVjhc3jzzvrR6vLPQTE7zritOhqqpSrjzzRqys/hPRqyzwQRnzrPrvnzzzzuTzNc0gMzzzzU”
if (ok:=FindText(X:=”wait”, Y:=1, pX, pY, pX+pW, pY+pH, 0, 0, Text))
{
break
}
Sleep 200
}
}
Return
space::
Pause
Return
F5::
Reload
Return
Esc::
ExitApp
Return