本帖最后由 c8520c 于 2017-5-26 20:58 编辑
回复 9# 1361739590 #Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include<Array.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("批量生成", 470, 440, 200, 130,-1,0x00000010)
$Label1 = GUICtrlCreateLabel("将 数字 改为 *", 8, 0, 350, 25)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
$Edit1 = GUICtrlCreateEdit('', 8, 30, 455, 50)
GUICtrlSetState(-1, 8)
$Label2 = GUICtrlCreateLabel("开始数", 8, 90, 60, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Edit2 = GUICtrlCreateInput("", 72, 90, 50, 21)
GUICtrlSetState(-1, 8)
$Label3 = GUICtrlCreateLabel("结束数", 136, 90, 60, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Edit3 = GUICtrlCreateInput("", 200, 90, 50, 21)
GUICtrlSetState(-1, 8)
$Label4 = GUICtrlCreateLabel("位数", 264, 90, 44, 28)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Edit4 = GUICtrlCreateInput("", 307, 90, 50, 21)
GUICtrlSetState(-1, 8)
$Edit5 = GUICtrlCreateEdit("", 8, 152, 454, 278)
GUICtrlSetState(-1, 8)
$Checkbox1 = GUICtrlCreateCheckbox("添加img src", 373, 90, 81, 25)
GUICtrlSetFont(-1, 11, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("生成", 8, 118, 44, 28)
$Button2 = GUICtrlCreateButton("保存", 56, 118, 44, 28)
GUISetState()
While 1
WEnd
以下代码可以放进while 与wend,但是如果再次拖放文件到第2至第4个控件,此时第2至第4个控件的内容会改变,但我不想改变 $nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case -13
$mouse = GUIGetCursorInfo($Form1)
$_str = ControlCommand($Form1, "", $mouse[4], "GetSelected","")
ControlSetText ( $Form1, "", "Edit1",$_str)
If $mouse[4] <> 4 Then
ControlSetText ( $Form1, "", $mouse[4],"")
EndIf
|