Jump to content

GUICtrlCreateListView and ...ListViewItem make an array when read


Rad
 Share

Recommended Posts

I dont even know why but its VERY ANOYING! For some reason if I use the value that is read from my listview, to get the FIRST selected item I have to use GUICtrlRead($List_Window)-33 ... Why is it putting the FIRST listitem as [33] in the variable?! Well, it adds 32 to the selected item I would guess, but why? Is there any way to fix this? Is this supposed to happen? Doesnt make much sense, but the rest of my listitems do list in order after that, just with 32 more on each one

Link to comment
Share on other sites

Last time when I showed my script nobody replied afterwords, plus if its just some bug with the function in the first place that could have fixed it.

Do not test the "apply" button until the window you have selected appeared in the status bar, with title as it is in the window... Otherwise you might have to change all the -33's to -32 or -34 for example... not sure though

Window_Property_Settings.au3

Link to comment
Share on other sites

Hi,

I don't usually use that here; if you are using beta I thinbk you can ;

#include <GuiListview.au3>
WinSetState($windows[_GUICtrlListViewGetCurSel($List_Window)+1][0],"",@SW_ENABLE)                                       ;
;~          WinSetState($windows[GUICtrlRead($List_Window)-33][0],"",@SW_ENABLE)                                        ;
instead; ?...

Don't know otherwise..

Best, Randall

Link to comment
Share on other sites

I cant even run the test script included in beta the files have to be moved around, then i do that and the files that were included had errors...

wtf?

This GUICtrlCreateListView doesnt even work right maybe it should be moved to BETA along with all the other things you have to severly tweak to make it work... thats why I use autoit because its so easy, and I aint about to start debugging these files that dont even go to a useable directory when installed to just read which item is clicked...

Edited by Rad
Link to comment
Share on other sites

Hi,

Not sure what you mean; are you NOT using Beta?

I cant even run the test script included in beta

which test script can youu not run? - probably means you should install again

the files have to be moved around,

not if you install in correct sequence; main version first, then beta.

This GUICtrlCreateListView doesnt even work right maybe it should be moved to BETA

It is BETA, isn't it?

these files that dont even go to a useable directory when installed

again, your installation may have failed?

Best, Randall

Link to comment
Share on other sites

After having au3 installed in its default directory I installed the beta into its default directory and tried to run it:

C:\Program Files\AutoIt3\Include\GuiListview.au3(590,51) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,"")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(592,51) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,"")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(594,57) : ERROR: SetError() [built-in] called with wrong number of args.
    If $i_Item = -1 Then Return SetError($LV_ERR,$LV_ERR,"")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(635,53) : ERROR: SetError() [built-in] called with wrong number of args.
            If @error Then Return SetError($LV_ERR,$LV_ERR,"")
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(637,127) : ERROR: SetError() [built-in] called with wrong number of args.
            If Not GUICtrlSendMsg($h_listview, $LVM_GETITEMTEXTA, $i_Item, DllStructGetPtr($p)) Then Return SetError($LV_ERR,$LV_ERR,"")
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(642,37) : ERROR: SetError() [built-in] called with wrong number of args.
        Return SetError($LV_ERR,$LV_ERR,"")
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(662,66) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Or $v_ret = "" Then Return SetError($LV_ERR,$LV_ERR,"")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(942,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(944,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(983,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(985,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1025,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1092,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1127,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1130,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1159,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1174,60) : ERROR: SetError() [built-in] called with wrong number of args.
    If (Not $ret) Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1297,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1339,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1341,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(132,23) : ERROR: IsHWnd(): undefined function.
    If IsHWnd($h_listview)
    ~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(362,36) : ERROR: DllStructCreate(): undefined function.
    Local $p = DllStructCreate($struct)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(365,157) : ERROR: DllStructGetPtr(): undefined function.
        Local $a_ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_listview, "int", $LVM_GETCOLUMNORDERARRAY, "int", $i_cols, "ptr", DllStructGetPtr($p)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(373,37) : ERROR: DllStructGetData(): undefined function.
        $s_cols &= DllStructGetData($p, $i)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(596,36) : ERROR: DllStructSetData(): undefined function.
    DllStructSetData($p, 1, $LVIF_TEXT)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Rad\Desktop\Window_Property_Settings2.au3 - 25 error(s), 0 warning(s)

QUOTE

This GUICtrlCreateListView doesnt even work right maybe it should be moved to BETA

----

It is BETA, isn't it?

No, GUICtrlCreateListView is NOT beta... it comes in the "stable" version Edited by Rad
Link to comment
Share on other sites

After having au3 installed in its default directory I installed the beta into its default directory and tried to run it:

C:\Program Files\AutoIt3\Include\GuiListview.au3(590,51) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,"")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(592,51) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,"")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(594,57) : ERROR: SetError() [built-in] called with wrong number of args.
    If $i_Item = -1 Then Return SetError($LV_ERR,$LV_ERR,"")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(635,53) : ERROR: SetError() [built-in] called with wrong number of args.
            If @error Then Return SetError($LV_ERR,$LV_ERR,"")
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(637,127) : ERROR: SetError() [built-in] called with wrong number of args.
            If Not GUICtrlSendMsg($h_listview, $LVM_GETITEMTEXTA, $i_Item, DllStructGetPtr($p)) Then Return SetError($LV_ERR,$LV_ERR,"")
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(642,37) : ERROR: SetError() [built-in] called with wrong number of args.
        Return SetError($LV_ERR,$LV_ERR,"")
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(662,66) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Or $v_ret = "" Then Return SetError($LV_ERR,$LV_ERR,"")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(942,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(944,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(983,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(985,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1025,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1092,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1127,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1130,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1159,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1174,60) : ERROR: SetError() [built-in] called with wrong number of args.
    If (Not $ret) Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1297,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1339,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(1341,56) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError($LV_ERR,$LV_ERR,$LV_ERR)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(132,23) : ERROR: IsHWnd(): undefined function.
    If IsHWnd($h_listview)
    ~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(362,36) : ERROR: DllStructCreate(): undefined function.
    Local $p = DllStructCreate($struct)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(365,157) : ERROR: DllStructGetPtr(): undefined function.
        Local $a_ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_listview, "int", $LVM_GETCOLUMNORDERARRAY, "int", $i_cols, "ptr", DllStructGetPtr($p)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(373,37) : ERROR: DllStructGetData(): undefined function.
        $s_cols &= DllStructGetData($p, $i)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\GuiListview.au3(596,36) : ERROR: DllStructSetData(): undefined function.
    DllStructSetData($p, 1, $LVIF_TEXT)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Rad\Desktop\Window_Property_Settings2.au3 - 25 error(s), 0 warning(s)

No, GUICtrlCreateListView is NOT beta... it comes in the "stable" version

All the errors your getting is because the script needs to be run in beta.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...