#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("QQ密码输入框", 502, 224, -1, -1)
GUISetBkColor(0xA6CAF0)
Global $Input[11],$Label[11]
$Input[1] = GUICtrlCreateInput("password", 88, 16, 137, 21, $GUI_SS_DEFAULT_INPUT)
$Input[2] = GUICtrlCreateInput("password", 88, 48, 137, 21, $GUI_SS_DEFAULT_INPUT)
$Input[3] = GUICtrlCreateInput("password", 88, 80, 137, 21, $GUI_SS_DEFAULT_INPUT)
$Input[4] = GUICtrlCreateInput("password", 88, 112, 137, 21, $GUI_SS_DEFAULT_INPUT)
$Input[5] = GUICtrlCreateInput("password", 88, 143, 137, 21, $GUI_SS_DEFAULT_INPUT)
$Input[6] = GUICtrlCreateInput("password", 341, 16, 137, 21, $GUI_SS_DEFAULT_INPUT)
$Input[7] = GUICtrlCreateInput("password", 341, 47, 137, 21, $GUI_SS_DEFAULT_INPUT)
$Input[8] = GUICtrlCreateInput("password", 341, 79, 137, 21, $GUI_SS_DEFAULT_INPUT)
$Input[9] = GUICtrlCreateInput("password", 341, 111, 137, 21, $GUI_SS_DEFAULT_INPUT)
$Input[10] = GUICtrlCreateInput("password", 341, 143, 137, 21, $GUI_SS_DEFAULT_INPUT)
$Button1 = GUICtrlCreateButton("确定(&O)", 120, 176, 105, 33)
GUICtrlSetBkColor(-1, 0x00FF00)
$Button2 = GUICtrlCreateButton("取消(&C)", 261, 176, 105, 33)
GUICtrlSetBkColor(-1, 0xFF0000)
$Label[1] = GUICtrlCreateLabel("QQ", 8, 16, 52, 17, 0)
$Label[2] = GUICtrlCreateLabel("QQ1", 8, 48, 58, 17, 0)
$Label[3] = GUICtrlCreateLabel("QQ2", 8, 112, 58, 17, 0)
$Label[4] = GUICtrlCreateLabel("QQ3", 8, 80, 58, 17, 0)
$Label[5] = GUICtrlCreateLabel("QQ4", 8, 144, 64, 17, 0)
$Label[6] = GUICtrlCreateLabel("QQ5", 261, 15, 64, 17, 0)
$Label[7] = GUICtrlCreateLabel("QQ6", 261, 47, 64, 17, 0)
$Label[8] = GUICtrlCreateLabel("QQ7", 261, 111, 58, 17, 0)
$Label[9] = GUICtrlCreateLabel("QQ8", 261, 79, 64, 17, 0)
$Label[10] = GUICtrlCreateLabel("QQ9", 261, 143, 64, 17, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
Exit
Case $Button1
#cs
代码是我自己想当然写成这个样子,还以为这是数组,呵呵!
我本来想用for函数,让$i从1到9变大后,ini文件的值也读到了。
各位大侠见笑了。
$i=1,$i=$Label[1]
IniWrite("QQ密码","config",GUICtrlRead($Label[i]))
#ce
For $i=1 To 10
IniWrite("password.ini","config",GUICtrlRead($Label[$i]),GUICtrlRead($Input[$i]))
Next
EndSwitch
WEnd