本帖最后由 半芯竹 于 2012-2-11 12:15 编辑
回复 3# tcpuuu
你的问题,总是要人说得很清楚,一定要人帮你写好,你才满意……
明明都$a数组了。你还GLOBAL个P啊。。。
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate('ABC',200,430,-1,-1)
local $A[20]
$A[1] = GUICtrlCreateLabel ("",2, 45,42,16,0x00800000,0x01)
$A[2] = GUICtrlCreateLabel ("你大爷",2, 63,42,16,0x00800000,0x01)
$A[3] = GUICtrlCreateLabel ("",2, 81,42,16,0x00800000,0x01)
$A[4] = GUICtrlCreateLabel ("",2, 99,42,16,0x00800000,0x01)
$A[5] = GUICtrlCreateLabel ("",2, 117,42,16,0x00800000,0x01)
$A[6] = GUICtrlCreateLabel ("",2, 135,42,16,0x00800000,0x01)
$A[7] = GUICtrlCreateLabel ("",2, 153,42,16,0x00800000,0x01)
$A[8] = GUICtrlCreateLabel ("",2, 171,42,16,0x00800000,0x01)
$A[9] = GUICtrlCreateLabel ("",2, 189,42,16,0x00800000,0x01)
$A[10] = GUICtrlCreateLabel ("",2, 207,42,16,0x00800000,0x01)
$A[11] = GUICtrlCreateLabel ("",2, 225,42,16,0x00800000,0x01)
$A[12] = GUICtrlCreateLabel ("",2, 243,42,16,0x00800000,0x01)
$A[13] = GUICtrlCreateLabel ("",2, 261,42,16,0x00800000,0x01)
$A[14] = GUICtrlCreateLabel ("",2, 279,42,16,0x00800000,0x01)
$A[15] = GUICtrlCreateLabel ("",2, 297,42,16,0x00800000,0x01)
$A[16] = GUICtrlCreateLabel ("",2, 315,42,16,0x00800000,0x01)
$A[17] = GUICtrlCreateLabel ("",2, 333,42,16,0x00800000,0x01)
$A[18] = GUICtrlCreateLabel ("",2, 351,42,16,0x00800000,0x01)
$A[19] = GUICtrlCreateLabel ("WWW",2, 369,42,16,0x00800000,0x01)
GUISetState()
for $i=1 to 18
GUICtrlSetData($a[$i],GUICtrlRead($a[$i+1]))
next
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
以下是精简的。你自己看着办吧。
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
local $A[20],$b=45
GUICreate('ABC',200,430,-1,-1)
For $i = 1 To 19
$A[$i] = GUICtrlCreateLabel ("",2, $b,42,16,0x00800000,0x01)
$b+=18
If $i= 3 Then GUICtrlSetData($a[$i],'你大爷啊')
If $i =10 Then GUICtrlSetData($a[$i],'你大娘啊')
If $i= 19 Then GUICtrlSetData($a[$i],'www')
Next
GUISetState()
for $i=1 to 18
GUICtrlSetData($a[$i],GUICtrlRead($a[$i+1]))
next
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
|