Jump to content

Recommended Posts

Posted

Hey elitepvpers
I started working on a script but sadly i've got a problem while using the list view
all i wanted is to add a text to the list view coloms using a button

I searched on the net and othing helped
if someone can help me
btw the button  is $add & the inputs are $old , $new , $color
Thanks & there is the script

#EndRegion
    #RequireAdmin
    #include "detour.au3"
    #include "IDChanger_Funcs.au3"
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Meanfull Title v2 c:", 445, 294, 278, 195)
$old = GUICtrlCreateInput("Old ID", 40, 48, 121, 21)
$new = GUICtrlCreateInput("New ID", 176, 48, 121, 21)
$color = GUICtrlCreateInput("", 312, 48, 25, 21)
$add = GUICtrlCreateButton("Add", 360, 48, 75, 25)
$change = GUICtrlCreateButton("Change", 360, 88, 75, 25)
$close = GUICtrlCreateButton("Close", 360, 128, 75, 25)
$credits = GUICtrlCreateButton("Credits", 360, 168, 75, 25)
$itm = GUICtrlCreateButton("Item Manager", 152, 8, 75, 25)
$ListView1 = GUICtrlCreateListView("Old ID|New ID|Color", 40, 88, 298, 158)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 50)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 50)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
[/CODE]

I already tried this code 

Case $add 
            addItemToListView() 


Func addItemToListView() 
    $currLen = _GUICtrlListView_GetItemCount($ListView1) 
    _GUICtrlListView_AddItem($ListView1, GUICtrlRead($old)) 
    _GUICtrlListView_AddSubItem($ListView1, $currLen, GUICtrlRead($new), 1) 
    _GUICtrlListView_AddSubItem($ListView1, $currLen, GUICtrlRead($color), 2) 
EndFunc

But i got this 2 erros

[URL=http://epvpimg.com/IDilaab][IMG=http://i.epvpimg.com/IDilaab.png][/URL] this is the result without including

but wheni include the guilistview.au3 i got this
[URL=http://epvpimg.com/zuvecab][IMG=http://i.epvpimg.com/zuvecab.png][/URL]

Thanks for support

  • Moderators
Posted

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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