Search the Community
Showing results for tags 'incorrect number'.
-
I'm having a little difficulty getting beyond this error with the script below: C:\.....\Include\GuiListView.au3 (543) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: DllStructSetData($tBuffer, "Text", $aItems[$iI][0]) DllStructSetData($tBuffer, "Text", ^ ERROR Can someone point me in the right direction? Sample Lua script in spoiler. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> #include <String.au3> #include <Array.au3> #include <File.au3> #include <GuiListView.au3> ;Opt('GuiOnEventMode', 1) ; prevents application from exiting ?? $Form1_1 = GUICreate("Script Parser", 1001, 801, -1, -1) $Button1 = GUICtrlCreateButton("Open File", 16, 24, 91, 25) $Button2 = GUICtrlCreateButton("Parse File", 125, 24, 91, 25) $Button3 = GUICtrlCreateButton("{undefined}", 234, 24, 91, 25) $Button4 = GUICtrlCreateButton("{undefined}", 343, 24, 91, 25) $Button5 = GUICtrlCreateButton("{undefined}", 452, 24, 91, 25) $Button6 = GUICtrlCreateButton("{undefined}", 561, 24, 91, 25) $Button7 = GUICtrlCreateButton("{undefined}", 670, 24, 91, 25) $Button8 = GUICtrlCreateButton("Save Output", 779, 24, 91, 25) $Button9 = GUICtrlCreateButton("Exit", 888, 24, 91, 25) $List1 = GUICtrlCreateList("", 8, 128, 177, 564, -1, $WS_EX_STATICEDGE) GUICtrlSetData(-1, "") GUICtrlSetFont(-1, 10, 400, 0, "Courier New") $Edit1 = GUICtrlCreateEdit("", 200, 128, 793, 633, -1, $WS_EX_STATICEDGE) GUICtrlSetData(-1, "") GUICtrlSetFont(-1, 10, 400, 0, "Courier New") $Label1 = GUICtrlCreateLabel("{empty}", 10, 700, 200, 27) GUICtrlSetFont(-1, 14, 400, 0, "Calibri") GUISetState(@SW_SHOW) GetFunctions() ; Assign to button 2 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func OpenFile() EndFunc Func GetFunctions() Local $aFileName = FileOpenDialog("Select a file", @ScriptDir & "\", "(*.lua)", 0) Local $aArray = FileRead($aFileName) Local $aFunctions = _StringBetween($aArray, "Function ", "(") _ArrayDisplay($aFunctions) _GUICtrlListView_AddArray($List1,$aFunctions) ; ERROR EndFunc Func _ListViewEvent() For $i = 0 To $List1[0] If @GUI_CtrlId = $List1[$i] Then ExitLoop Next GUICtrlSetData($Label1, GUICtrlRead($List1[$i])) EndFunc Func _Exit() Exit EndFunc
- 10 replies
-
- _GUICtrlListView_AddArray
- Listview
-
(and 2 more)
Tagged with: