1

您好我制作了一个 gui,当您选中一个框并单击启动脚本时,它将自动打开该文件并运行它。

前 7 个工作,但之后的工作没有。而且我不理解这个问题,因为那些不起作用的问题与那些可以正常工作的问题的编写方式相同。

这是我使用的代码,也许我错过了一些东西或出错并且我自己没有看到它=[

Gui, Add, Text, x2 y0 w490 h20 +Center cred, Auto Castlot Babel Tower 

Scripts
Gui, Add, CheckBox, x2 y20 w70 h20 cwhite vfloor1, Floor 1
Gui, Add, CheckBox, x72 y20 w70 h20 cwhite vfloor2, Floor 2
Gui, Add, CheckBox, x142 y20 w70 h20 cwhite vfloor3, Floor 3
Gui, Add, CheckBox, x212 y20 w70 h20 cwhite vfloor4, Floor 4
Gui, Add, CheckBox, x282 y20 w70 h20 cwhite vfloor5, Floor 5
Gui, Add, CheckBox, x352 y20 w70 h20 cwhite vfloor6, Floor 6
Gui, Add, CheckBox, x422 y20 w70 h20 cwhite vfloor7, Floor 7
Gui, Add, Text, x2 y60 w490 h20 +Center cred, Auto Castlot Explore Mode 

Avalon Scripts
Gui, Add, CheckBox, x2 y80 w70 h20 cwhite v70ava, 70 Avalon
Gui, Add, CheckBox, x72 y80 w70 h20 cwhite v71ava, 71 Avalon
Gui, Add, CheckBox, x142 y80 w70 h20 cwhite v72ava, 72 Avalon
Gui, Add, CheckBox, x212 y80 w70 h20 cwhite v73ava, 73 Avalon
Gui, Add, CheckBox, x282 y80 w70 h20 cwhite v74ava, 74 Avalon
Gui, Add, CheckBox, x352 y80 w70 h20 cwhite v75ava, 75 Avalon
Gui, Add, CheckBox, x422 y80 w70 h20 cwhite v76ava, 76 Avalon
Gui, Add, CheckBox, x2 y100 w70 h20 cwhite v77ava, 77 Avalon
Gui, Add, CheckBox, x72 y100 w70 h20 cwhite v78ava, 78 Avalon
Gui, Add, CheckBox, x142 y100 w70 h20 cwhite v79ava, 79 Avalon
Gui, Add, CheckBox, x212 y100 w70 h20 cwhite v80ava, 80 Avalon
Gui, Add, CheckBox, x282 y100 w70 h20 cwhite v81ava, 81 Avalon
Gui, Add, CheckBox, x352 y100 w70 h20 cwhite v82ava, 82 Avalon
Gui, Add, CheckBox, x422 y100 w70 h20 cwhite v83ava, 83 Avalon
Gui, Add, CheckBox, x2 y120 w70 h20 cwhite v84ava, 84 Avalon
Gui, Add, CheckBox, x72 y120 w70 h20 cwhite v85ava, 85 Avalon
Gui, Add, Text, x2 y160 w490 h20 +Center cred, Auto Castlot Levy Troops 

Scripts
Gui, Add, CheckBox, x2 y180 w80 h20 cwhite, 1 Pages
Gui, Add, CheckBox, x82 y180 w80 h20 cwhite, 2 Pages
Gui, Add, CheckBox, x162 y180 w80 h20 cwhite, 3 Pages
Gui, Add, CheckBox, x242 y180 w80 h20 cwhite, 4 Pages
Gui, Add, CheckBox, x322 y180 w80 h20 cwhite, 5 Pages
Gui, Add, CheckBox, x402 y180 w80 h20 cwhite, 6 Pages
Gui, Add, CheckBox, x2 y200 w80 h20 cwhite, 7 Pages
Gui, Add, CheckBox, x82 y200 w80 h20 cwhite, 8 Pages
Gui, Add, CheckBox, x162 y200 w80 h20 cwhite, 9 Pages
Gui, Add, CheckBox, x242 y200 w80 h20 cwhite, 10 Pages
Gui, Add, CheckBox, x322 y200 w80 h20 cwhite, 15 Pages
Gui, Add, CheckBox, x402 y200 w80 h20 cwhite, 20 Pages
Gui, Add, CheckBox, x2 y220 w80 h20 cwhite, 25 Pages
Gui, Add, CheckBox, x82 y220 w80 h20 cwhite, 50 Pages
Gui, Add, CheckBox, x162 y220 w80 h20 cwhite, 75 Pages
Gui, Add, CheckBox, x242 y220 w80 h20 cwhite, 100 Pages
Gui, Add, CheckBox, x322 y220 w80 h20 cwhite, 150 Pages
Gui, Add, CheckBox, x402 y220 w80 h20 cwhite, 200 Pages
Gui, Add, Button, x162 y260 w150 h20 default gAuto cwhite, Start Selected 

Script
Gui, Show, x262 y115 h300 w521 , Auto Castlot - Castlot Empire
Gui, Color, Black
Return

Auto:

Gui, submit, nohide
If Floor1 = 1
{Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 1.ahk
 }
 return
 If Floor2 = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 2.ahk
 }
return
 If Floor3 = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 3.ahk
}
return
If Floor4 = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 4.ahk
 }
Return
If Floor5 = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 5.ahk
 }
return
If Floor6 = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 6.ahk
}
return
If Floor7 = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 7.ahk
 }
return
 If 70ava = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
 }
return

If ava71 = 1
{Run C:\Users\Lord Of Death\Desktop\AHK Scripts\71 ava.ahk
 }
return

If 72ava = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
}
return
If 73ava = 1
{Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
}
return
If 74ava = 1
{Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
}
return
If 75ava = 1
{Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
}
return
If 76ava = 1
{Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
}
return
If 77ava = 1
{Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
}
return
If 78ava = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
 }
return
If 79ava = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
 }
return
If 80ava = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
 }
return
If 81ava = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
}
return
If 82ava = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\82 ava.ahk
 }
return
If 83ava = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
 }
return
 If 84ava = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
 }
 return
If 85ava = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\unfinished.ahk
 }
 return

GuiClose:
ExitApp

^这是整个代码(部分未完成)

Gui, submit, nohide
If Floor1 = 1
{Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 1.ahk
 }
 return
 If Floor2 = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 2.ahk
 }
return
 If Floor3 = 1
{Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 3.ahk
}
return
If Floor4 = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 4.ahk
}  
 Return
If Floor5 = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 5.ahk
 }
return
If Floor6 = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 6.ahk
}
return
If Floor7 = 1
 {Run C:\Users\Lord Of Death\Desktop\AHK Scripts\floor 7.ahk
}
return  

这可以正常工作,但是从那里开始的代码减去关闭没有=[

对我可能做错的事情有任何帮助吗?

4

0 回答 0