【已解决】数组越界问题
本帖最后由 itsky2 于 2019-11-1 20:40 编辑#include <String.au3>
#include <Array.au3>
$hWnd = FileOpen("名单.txt")
$Data = FileRead($hWnd)
$Name = _StringBetween($Data, '(', ')')
_ArrayDisplay($Name)
$Form = GUICreate("随机点名", 550, 300)
$Call = GUICtrlCreateButton("点名", 176, 208, 225, 49)
$Label_Name = GUICtrlCreateLabel("", 100, 50, 300, 100)
GUICtrlSetColor(-1, 0x0078DD)
GUICtrlSetFont(-1, 60)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Call
GUICtrlSetData($Label_Name, $Name)
EndSwitch
WEnd
名单:(王绍辉)(程序)(何子奇)(余可喜)(李诗怡)(刘一璇)(孔昱人)(岳佳琦)(冯伟峰)(赵家辉)(张宇辰)(王英齐)(常思远)(原旭阳)(靳媛媛)(张冰月)(许梦薇)(李珂)(姬心语)(魏英贤)(卢子琪)(赵禹霏)(买欣然)(毋丽娟)(陈嘉仪)(崔静婧)(李智莹)(申琳娜)(刘梦晴)(任翼雯)(常芷晴)(杨雅淇)(于卓冉)(栗语凡)(刘子怡)(崔雨曈)(宋一凡)(李晨冉)(岳淑华)(王祥宇)(陈凯)(张溪仁)(席致远)(刘森语)(陈柄睿)(冯磊)(杨琳)(韩子玉)(党承烨)(程明哲)(张硕)(闪子珅)(贾芷洋)(高志珅)(和千盛)(梅嘉辉)(常惠哲)(贺奕博)(许科)(李啟瑄)(王果)(曹树钦)(李彦辰)
问题描述:脚本在几次点名后会出现数组越界问题
GUICtrlSetData($Label_Name, $Name) zghwelcome 发表于 2019-11-1 19:38
GUICtrlSetData($Label_Name, $Name)
谢谢,原来是这样! 学习了。。。
页:
[1]