Sign in to follow this  
Followers 0
salter

need help with list view plz

9 posts in this topic

hey there im having troubles with a list view search, i need to search the list for an exact match , im using the _GUICtrlListFindString but i just keep getting 0 as a return even when the string is in the list.

heres the code:

#include <GUIListView.au3>
#include <GUIConstants.au3>
#include <GuiList.au3>

$Form1_1 = GUICreate("Active Users", 346, 341, 193, 115)
$ActiveUserList = GUICtrlCreateListView("User|Pass", 8, 8, 250, 326,)

    GUISetState(@SW_SHOW)
While 1
    
    $Active = 0
    $data = UDPRecv($socket, 50);receive $data
    If $data <> "" Then ;if $data is something then
        $ret = _GUICtrlListFindString ($ActiveUserList, $data,1);search the list for $data
        If $ret <> 0 Then ;if $data is in the list then account is active
            $Active = 1
                Else
                    $Active = 0
                EndIf
            EndIf
            Wend

if anyone can help me out that would be awsome

Share this post


Link to post
Share on other sites



hey there im having troubles with a list view search, i need to search the list for an exact match , im using the _GUICtrlListFindString but i just keep getting 0 as a return even when the string is in the list.

heres the code:

#include <GUIListView.au3>
#include <GUIConstants.au3>
#include <GuiList.au3>

$Form1_1 = GUICreate("Active Users", 346, 341, 193, 115)
$ActiveUserList = GUICtrlCreateListView("User|Pass", 8, 8, 250, 326,)

    GUISetState(@SW_SHOW)
While 1
    
    $Active = 0
    $data = UDPRecv($socket, 50);receive $data
    If $data <> "" Then ;if $data is something then
        $ret = _GUICtrlListFindString ($ActiveUserList, $data,1);search the list for $data
        If $ret <> 0 Then ;if $data is in the list then account is active
            $Active = 1
                Else
                    $Active = 0
                EndIf
            EndIf
            Wend

if anyone can help me out that would be awsome

GUICtrlListFindString is for GuiList not GuiListView


SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

GUICtrlListFindString is for GuiList not GuiListView

what else could i use to find a string in the listview then?

Share this post


Link to post
Share on other sites

can anyone help me?

Share this post


Link to post
Share on other sites

what else could i use to find a string in the listview then?

well, if it's for a ListView, what about _GUICtrlListViewFindItem() ??


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

well, if it's for a ListView, what about _GUICtrlListViewFindItem() ??

its not in the helpfile how does it work _GUICtrlListViewFindItem(the Control,Item to find)

and its not a known function i have listview included

Edited by salter

Share this post


Link to post
Share on other sites

its not in the helpfile how does it work _GUICtrlListViewFindItem(the Control,Item to find)

and its not a known function i have listview included

Upgrade to the released version of AutoIt 3.2.2.0 ... you're obviously outdated.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

its not in the helpfile how does it work _GUICtrlListViewFindItem(the Control,Item to find)

and its not a known function i have listview included

Search for it in the current help file, it's there!

Syntax:

#Include <GuiListView.au3>

_GUICtrlListViewFindItem ( $h_listview, $v_find [, $i_Start = -1 [, $v_SearchType = 0x8 [, $v_direction = 0x28 ]]] )


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
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
Sign in to follow this  
Followers 0