0

我正在尝试在自动热键中制作一个具有多个 GUI 的决策树类型程序。我已经想出了如何让它工作一次,但由于某种原因,我不能多次这样做。这是有效的代码:

Gui, Add, Text, x72 y20 w220 h20 , What type of request?
Gui, Add, Button, x12 y50 w100 h30 , Password
Gui, Add, Button, x132 y50 w100 h30 , AppError
Gui, Add, Button, x252 y50 w100 h30 , AccessRequest
Gui, Add, Button, x252 y90 w100 h30 , NotSure
Gui, Add, Button, x132 y90 w100 h30 , HardwareProblem
Gui, Add, Button, x12 y90 w100 h30 , RightsChangeRequest
Gui, Show,center, Decision Tree
Return
ExitApp

ButtonPassword:
Gui, Destroy
Gui, Add, Text, x72 y20 w220 h20 , Passwords: What is the user trying to access?
Gui, Add, Button, x12 y50 w100 h30 , Windows
Gui, Add, Button, x132 y50 w100 h30 , Outlook
Gui, Add, Button, x252 y50 w100 h30 , RemoteApps
Gui, Add, Button, x252 y90 w100 h30 , NotSure
Gui, Add, Button, x132 y90 w100 h30 , AO
Gui, Add, Button, x12 y90 w100 h30 , Voicemail
Gui, Add, button, x132 y130 w100 h30, Back
Gui, Show,center, Passwords
Return

ButtonWindows:
Gui, destroy

Msgbox, 4, Something, Is this a remote user?
IfMsgbox Yes
    Msgbox, Something
IfMsgbox No
    Msgbox, Say something
return

我为其余的按钮提供了更多代码,它们工作得很好。这是没有的部分:

ButtonAppError:
Gui, destroy

Gui, Add, Button, x142 y220 w100 h30 , ANA1
Gui, Add, Button, x22 y60 w100 h30 , ANA2
Gui, Add, Button, x22 y100 w100 h30 , ANA3
Gui, Add, Button, x22 y140 w100 h30 , ANA4
Gui, Add, Button, x22 y180 w100 h30 , ANA5
Gui, Add, Button, x22 y220 w100 h30 , ANA6
Gui, Add, Text, x62 y20 w130 h20 , What Program is erroring?
Gui, Show,center,Applications
Return

ButtonANA1:
Gui, destroy
Gui, Add, Text, x132 y20 w30 h20 , ANA
Gui, Add, Button, x162 y60 w100 h90 , Somestuff
Gui, Add, Button, x22 y170 w100 h90 , Somestuff2
Gui, Add, Button, x22 y60 w100 h90 , Somestuff3
Gui, Add, Button, x162 y170 w100 h90 , Somestuff4
Gui, Show, x260 y159 h307 w282, ANA
Return

按钮 ANA1(或 ANA2 或 ANA3 等)由于某种原因不起作用。我发现顶部和底部之间的格式没有区别。我觉得这是一个愚蠢的问题,但我已经让其他三个人来看看这个,似乎没有人能弄清楚。

4

0 回答 0