本帖最后由 xyx115 于 2015-10-9 22:48 编辑 Global $a[3][4] = [ _
["句柄名称A",1,2,3], _
["句柄名称B",4,5,6], _
["句柄名称C",7,8,9]]
;........可以更多,这里的“A”可以设定为自己的句柄名称......
For $b = 0 To 2 Step +1
$a[$b][0] = $a[$b][1] & $a[$b][2] & $a[$b][3]
MsgBox(0,$a[$b][3],$a[$b][0])
Next
感谢A大的帮助,回家后登陆才看到。我最后是这样解决的。如果调用句柄,我是使用类似这样写的: $Wo[2][0]
这是我正在写的一段: Global $Wo[10][10] = [ _
["Wo0", "0x000000", 400, 0, 90, 556, 23, $ES_CENTER, -1, "使用帮助"], _
["Wo1", "0x999999", Default, 20, 120, 556, 23, -1, -1, "1.使用帮助"], _
["Wo2", "0x999999", Default, 20, 150, 556, 23, -1, -1, "2.使用帮助"], _
["Wo3", "0x999999", Default, 20, 180, 556, 23, -1, -1, "3.使用帮助"], _
["Wo4", "0x999999", Default, 20, 210, 556, 23, -1, -1, "4.使用帮助"], _
["Wo5", "0x999999", Default, 20, 240, 556, 23, -1, -1, "5.使用帮助"], _
["Wo6", "0x999999", Default, 20, 270, 556, 23, -1, -1, "6.使用帮助"], _
["Wo7", "0x999999", Default, 20, 300, 556, 23, -1, -1, "7.使用帮助"], _
["Wo8", "0x999999", Default, 20, 330, 556, 23, -1, -1, "8.使用帮助"], _
["Wo9", "0x999999", Default, 20, 360, 556, 23, -1, -1, "9.使用帮助"]]
For $k = 0 To 9 Step +1
$Wo[$k][0] = GUICtrlCreateLabel($Wo[$k][9], $Wo[$k][3], $Wo[$k][4], $Wo[$k][5], $Wo[$k][6], $Wo[$k][7], $Wo[$k][8])
GUICtrlSetColor($Wo[$k][0], $Wo[$k][1]);更改文本颜色
GUICtrlSetFont($Wo[$k][0], Default, $Wo[$k][2]);设置文本字体
Next
d_1()
d_2()
Func d_1()
Global $i, $j, $size[3 * 3], $x = -1
For $i = 1 To 3
For $j = 1 To 3
$x += 1
$size[$x] = "这是第 " & $i & " - " & $j & " 次出现"
; MsgBox(0, '', $size[$x])
Next
Next
Global $a[3][4] = [ _
["句柄名称A", 1, 2, 3], _
["句柄名称B", 4, 5, 6], _
["句柄名称C", 7, 8, 9]]
;........可以更多,这里的“A”可以设定为自己的句柄名称......
For $b = 0 To 2 Step +1
$a[$b][0] = $a[$b][1] & $a[$b][2] & $a[$b][3]
;MsgBox(0,$a[$b][3],$a[$b][0])
Next
EndFunc ;==>d_1
Func d_2()
MsgBox(0, 0, $size[2])
MsgBox(0, 0, $a[1][0])
EndFunc ;==>d_2
A大的代码更好。 |