#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <Array.au3>
$Form1 = GUICreate("xxxxx", 874, 456)
Global $gu_Button[18]
$gu_Button[5] = GUICtrlCreateButton("开始", 392, 208, 89, 25)
$gu_Button[6] = GUICtrlCreateButton("退出", 392, 248, 89, 25)
$gu_Button[17] = GUICtrlCreateButton("批量网址", 392, 288, 89, 25)
GUISetState(@SW_SHOW, $Form1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $gu_Button[5]
_GOGOGO()
Case $gu_Button[6]
Exit
Case $gu_Button[17]
_BatchUrl()
EndSwitch
WEnd
Func _GOGOGO()
MsgBox(0, "", "按了【开始】")
EndFunc
Func _BatchUrl()
GUISetState(@SW_HIDE, $Form1)
$Form2 = GUICreate("Form2", 615, 260, -1, -1, -1, -1, $Form1)
$Group21 = GUICtrlCreateGroup("URL", 8, 8, 601, 73)
$Label21 = GUICtrlCreateLabel("A-固定不变", 232, 60, 62, 17)
$Label22 = GUICtrlCreateLabel("B-变动", 480, 60, 38, 17)
$Label23 = GUICtrlCreateLabel("C-固定不变", 536, 60, 62, 17)
$Input21 = GUICtrlCreateInput("http://www.abcdefg.com/abcd/keys-", 16, 32, 441, 21)
$Input22 = GUICtrlCreateInput("####", 464, 32, 65, 21, $ES_CENTER + $ES_READONLY)
$Input23 = GUICtrlCreateInput(".html", 536, 32, 65, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group22 = GUICtrlCreateGroup("B-变动", 8, 88, 601, 49)
$Input24 = GUICtrlCreateInput("1", 216, 104, 105, 21, $ES_NUMBER)
$Label24 = GUICtrlCreateLabel("起始数值:", 160, 108, 55, 17)
$Input25 = GUICtrlCreateInput("50", 464, 104, 105, 21, $ES_NUMBER)
$Label25 = GUICtrlCreateLabel("结束数值:", 408, 108, 55, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Edit21 = GUICtrlCreateEdit("", 8, 152, 601, 70)
$Button21 = GUICtrlCreateButton("确定", 171, 226, 105, 25)
$Button22 = GUICtrlCreateButton("取消", 339, 226, 105, 25)
GUISetState(@SW_SHOW, $Form2)
While 1
$nMsg = GUIGetMsg()
GUICtrlSetData($Edit21, GUICtrlRead($Input21) & GUICtrlRead($Input24) & GUICtrlRead($Input23) & @CRLF & "......" & _
@CRLF & GUICtrlRead($Input21) & GUICtrlRead($Input25) & GUICtrlRead($Input23))
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUISetState(@SW_HIDE, $Form2)
GUISetState(@SW_SHOW, $Form1)
ExitLoop
Case $Button21
If GUICtrlRead($Input24) < GUICtrlRead($Input25) Then
Local $n = GUICtrlRead($Input25) - GUICtrlRead($Input24)
Local $batArray[$n + 1][2]
For $i = 0 To $n
$batArray[$i][0] = "Url_" & $i + 1
$batArray[$i][1] = GUICtrlRead($Input21) & GUICtrlRead($Input24) + $i & GUICtrlRead($Input23)
Next
ExitLoop
Else
MsgBox(0, "", "“结束数值”必须大于“开始数值”")
EndIf
Case $Button22
GUISetState(@SW_HIDE, $Form2)
GUISetState(@SW_SHOW, $Form1)
ExitLoop
EndSwitch
WEnd
GUISetState(@SW_HIDE, $Form2)
GUISetState(@SW_SHOW, $Form1)
$sUrl_b = $batArray
_ArrayDisplay($sUrl_b)
EndFunc