本帖最后由 p7749 于 2018-9-3 17:57 编辑
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=d:\autoit3\ppp\form1检测.kxf
$Form1 = GUICreate("检测预警", 313, 442, 376, 123)
$Label1 = GUICtrlCreateLabel("列", 0, 0, 16, 17)
$Label2 = GUICtrlCreateLabel("行", 32, 0, 16, 17)
$Label3 = GUICtrlCreateLabel("说明", 64, 0, 28, 17)
$Label4 = GUICtrlCreateLabel("值", 192, 0, 40, 17)
$Label5 = GUICtrlCreateLabel("差值", 248, 0, 52, 17)
$Input1 = GUICtrlCreateInput("", 0, 16, 25, 21)
$Input2 = GUICtrlCreateInput("", 32, 16, 25, 21)
$Input3 = GUICtrlCreateInput("", 64, 16, 121, 21)
$Input4 = GUICtrlCreateInput("", 192, 16, 41, 21)
$Input5 = GUICtrlCreateInput("", 248, 16, 49, 21)
$Input6 = GUICtrlCreateInput("", 0, 41, 25, 21)
$Input7 = GUICtrlCreateInput("", 32, 41, 25, 21)
$Input8 = GUICtrlCreateInput("", 64, 41, 121, 21)
$Input9 = GUICtrlCreateInput("", 192, 41, 41, 21)
$Input10 = GUICtrlCreateInput("", 248, 41, 49, 21)
$Input11 = GUICtrlCreateInput("", 0, 66, 25, 21)
$Input12 = GUICtrlCreateInput("", 32, 66, 25, 21)
$Input13 = GUICtrlCreateInput("", 64, 66, 121, 21)
$Input14 = GUICtrlCreateInput("", 192, 66, 41, 21)
$Input15 = GUICtrlCreateInput("", 248, 66, 49, 21)
$Input16 = GUICtrlCreateInput("", 0, 91, 25, 21)
$Input17 = GUICtrlCreateInput("", 32, 91, 25, 21)
$Input18 = GUICtrlCreateInput("", 64, 91, 121, 21)
$Input19 = GUICtrlCreateInput("", 192, 91, 41, 21)
$Input20 = GUICtrlCreateInput("", 248, 91, 49, 21)
$Input21 = GUICtrlCreateInput("", 0, 117, 25, 21)
$Input22 = GUICtrlCreateInput("", 32, 117, 25, 21)
$Input23 = GUICtrlCreateInput("", 64, 117, 121, 21)
$Input24 = GUICtrlCreateInput("", 192, 117, 41, 21)
$Input25 = GUICtrlCreateInput("", 248, 117, 49, 21)
$Input26 = GUICtrlCreateInput("", 0, 142, 25, 21)
$Input27 = GUICtrlCreateInput("", 32, 142, 25, 21)
$Input28 = GUICtrlCreateInput("", 64, 142, 121, 21)
$Input29 = GUICtrlCreateInput("", 192, 142, 41, 21)
$Input30 = GUICtrlCreateInput("", 248, 142, 49, 21)
$Input31 = GUICtrlCreateInput("", 0, 167, 25, 21)
$Input32 = GUICtrlCreateInput("", 32, 167, 25, 21)
$Input33 = GUICtrlCreateInput("", 64, 167, 121, 21)
$Input34 = GUICtrlCreateInput("", 192, 167, 41, 21)
$Input35 = GUICtrlCreateInput("", 248, 167, 49, 21)
$Input36 = GUICtrlCreateInput("", 0, 192, 25, 21)
$Input37 = GUICtrlCreateInput("", 32, 192, 25, 21)
$Input38 = GUICtrlCreateInput("", 64, 192, 121, 21)
$Input39 = GUICtrlCreateInput("", 192, 192, 41, 21)
$Input40 = GUICtrlCreateInput("", 248, 192, 49, 21)
$Input41 = GUICtrlCreateInput("", 0, 218, 25, 21)
$Input42 = GUICtrlCreateInput("", 32, 218, 25, 21)
$Input43 = GUICtrlCreateInput("", 64, 218, 121, 21)
$Input44 = GUICtrlCreateInput("", 192, 218, 41, 21)
$Input45 = GUICtrlCreateInput("", 248, 218, 49, 21)
$Input46 = GUICtrlCreateInput("", 0, 243, 25, 21)
$Input47 = GUICtrlCreateInput("", 32, 243, 25, 21)
$Input48 = GUICtrlCreateInput("", 64, 243, 121, 21)
$Input49 = GUICtrlCreateInput("", 192, 243, 41, 21)
$Input50 = GUICtrlCreateInput("", 248, 243, 49, 21)
$Input51 = GUICtrlCreateInput("", 0, 268, 25, 21)
$Input52 = GUICtrlCreateInput("", 32, 268, 25, 21)
$Input53 = GUICtrlCreateInput("", 64, 268, 121, 21)
$Input54 = GUICtrlCreateInput("", 192, 268, 41, 21)
$Input55 = GUICtrlCreateInput("", 248, 268, 49, 21)
$Input56 = GUICtrlCreateInput("", 0, 293, 25, 21)
$Input57 = GUICtrlCreateInput("", 32, 293, 25, 21)
$Input58 = GUICtrlCreateInput("", 64, 293, 121, 21)
$Input59 = GUICtrlCreateInput("", 192, 293, 41, 21)
$Input60 = GUICtrlCreateInput("", 248, 293, 49, 21)
$Input61 = GUICtrlCreateInput("", 0, 319, 25, 21)
$Input62 = GUICtrlCreateInput("", 32, 319, 25, 21)
$Input63 = GUICtrlCreateInput("", 64, 319, 121, 21)
$Input64 = GUICtrlCreateInput("", 192, 319, 41, 21)
$Input65 = GUICtrlCreateInput("", 248, 319, 49, 21)
$Input66 = GUICtrlCreateInput("", 0, 344, 25, 21)
$Input67 = GUICtrlCreateInput("", 32, 344, 25, 21)
$Input68 = GUICtrlCreateInput("", 64, 344, 121, 21)
$Input69 = GUICtrlCreateInput("", 192, 344, 41, 21)
$Input70 = GUICtrlCreateInput("", 248, 344, 49, 21)
$Input71 = GUICtrlCreateInput("", 0, 369, 25, 21)
$Input72 = GUICtrlCreateInput("", 32, 369, 25, 21)
$Input73 = GUICtrlCreateInput("", 64, 369, 121, 21)
$Input74 = GUICtrlCreateInput("", 192, 369, 41, 21)
$Input75 = GUICtrlCreateInput("", 248, 369, 49, 21)
$Input76 = GUICtrlCreateInput("", 0, 394, 25, 21)
$Input77 = GUICtrlCreateInput("", 32, 394, 25, 21)
$Input78 = GUICtrlCreateInput("", 64, 394, 121, 21)
$Input79 = GUICtrlCreateInput("", 192, 394, 41, 21)
$Input80 = GUICtrlCreateInput("", 248, 394, 49, 21)
$Button1 = GUICtrlCreateButton("保存", 248, 424, 49, 17)
GUISetState(@SW_SHOW)
;GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
_xieru()
Sleep(3000)
Exit
Func _xieru();数据写入文件
For $i=1 To 80
iniWrite(@AppDataDir & "\" & "configjw.ini", "检测", $i,GUICtrlRead($i, 0));控件ID怎么表示呢; $i+7 可以但没有什么道理
;设置一个变量 $a="$input"&$i 来代替不管用 直接用数组变量代替$input1 $input[1] 感觉麻烦
Next
EndFunc
|