Verssuss Posted April 5, 2017 Share Posted April 5, 2017 (edited) at first i use win10... hello guys i have some random errors from UDF GUIListViewEx.au3 just by adding items to my list (hold KEY W) how can i fix my problem ?? here is script expandcollapse popup#include <GuiConstantsEx.au3> #include <GUIListViewEx.au3> #include <WindowsConstants.au3> #include <SendMessage.au3> HotKeySet("{ESC}", "_quit") HotKeySet("w", "_wait") Global $iCount = 0, $iEditMode = 0, $hGUI $GUI = GUICreate("Clicker", 430, 400, 100, 100) GUISetState() $ListView = GUICtrlCreateListView("Name|Funkcja|Os X|Os Y|Click|Wait", 10, 20, 350, 300, $LVS_SHOWSELALWAYS) _GUICtrlListView_SetExtendedListViewStyle($ListView, $LVS_EX_FULLROWSELECT + $LVS_EX_GRIDLINES ) $iLV_Index = _GUIListViewEx_Init($ListView, "", 0, 0, True, 1 + 2 + 8) _GUIListViewEx_SetEditStatus($iLV_Index, "0;2;3;4;5") ; Column 0 & 2 editable - simple text not selected on open _GUIListViewEx_MsgRegister() ; Register for sorting, dragging and editing $nazwa = 0 While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch $vRet = _GUIListViewEx_EventMonitor($iEditMode) WEnd Func _wait() $nazwa = $nazwa + 1 Global $vData[6] = ["Name " & $nazwa, "Wait", "", "", "", ""] $iCount += 1 _GUIListViewEx_Insert($vData) EndFunc ;==>_wait Func _quit() Exit EndFunc ;==>_quit ;~ "C:\Program Files (x86)\AutoIt3\Include\GUIListViewEx.au3" (5033) : ==> Subscript used on non-accessible variable.: ;~ For $i = 1 To $aLV_Array[0][0] ;~ For $i = 1 To $aLV_Array^ ERROR ;~ "C:\Program Files (x86)\AutoIt3\Include\GUIListViewEx.au3" (5211) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: ;~ $avArray[$iIndex] = $vInsert ;~ ^ ERROR ;~ "C:\Program Files (x86)\AutoIt3\Include\GUIListViewEx.au3" (1316) : ==> Subscript used on non-accessible variable.: ;~ If $aGLVEx_SrcArray[0][0] = 0 Then $iRow = 0 ;~ If $aGLVEx_SrcArray^ ERROR Edited April 5, 2017 by Verssuss Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 5, 2017 Moderators Share Posted April 5, 2017 Verssuss, Why did you not post in the UDF thread as I suggest to you earlier? After considerable testing since you PMed me about the problem I can now reproduce the same error on occasion - it happens if you keep the "w" key depressed permanently and the HotKey fires again before the previous _Insert function has completed - it interrupts that function in mid flow and so the error occurs as the new instance now thinks that the actual ListView content and the UDF shadow are not in sync. Quite why you would want to add items to a ListView in such quick succession is beyond me, but you can solve the problem by unsetting the HotKey as you enter the function and resetting it as you leave. That way the HotKey will only fire again once the UDF has completed inserting the previous row: Func _wait() HotKeySet("w") ; Unset HotKey <<<<<<<<<<<<<<<<<<<<<<<<<<< $nazwa = $nazwa + 1 Global $vData[6] = ["Name " & $nazwa, "Wait", "", "", "", ""] $iCount += 1 _GUIListViewEx_Insert($vData) HotKeySet("w", "_wait") ; Reset HotKey <<<<<<<<<<<<<<<<<<<<<<<<<<< EndFunc ;==>_wait M23 Verssuss 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Verssuss Posted April 5, 2017 Author Share Posted April 5, 2017 simle exapmle how do i need use it Func _getcoord() $nazwa = $nazwa + 1 $pos = MouseGetPos() Global $vData[5] = ["Name " & $nazwa, "Left Click", $pos[0], $pos[1], $click] $iCount += 1 _GUIListViewEx_Insert($vData) EndFunc ;==>_getcoord i want hold hotkey and take all possible mouse position while hotkey is pressed here u see why "you would want to add items to a ListView in such quick" after i use disable hotkey at start of function and enable it after function is done its works perfect btw i can read later my mouse coords from whole list i did and repeat each move by 1 click THX problem fixed Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 5, 2017 Moderators Share Posted April 5, 2017 Verssuss, if you are simply storing the mouse coordinates for later use I would argue that immediately entering them into a ListView is massively overcomplicating the issue - but if you are happy with that approach, then fine. However, given what you say you are doing, could I gently point you to the Forum rules - we would not want any subsequent threads of yours to stray into forbidden territory. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Verssuss Posted April 5, 2017 Author Share Posted April 5, 2017 what u mean ?? im sure im not broke any rules point nad i dont want to i cannot record my own mouse moves to use it any day how i want ??? i dont get it Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 5, 2017 Moderators Share Posted April 5, 2017 Verssuss, I accused you of nothing - it was just a gentle hint. Recording and replaying mouse coordinates are often associated with things we do not wish to support and I merely wanted you to be sure what they are. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now