salter Posted January 29, 2007 Share Posted January 29, 2007 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 Link to comment Share on other sites More sharing options...
GaryFrost Posted January 29, 2007 Share Posted January 29, 2007 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. Link to comment Share on other sites More sharing options...
salter Posted January 30, 2007 Author Share Posted January 30, 2007 GUICtrlListFindString is for GuiList not GuiListViewwhat else could i use to find a string in the listview then? Link to comment Share on other sites More sharing options...
salter Posted January 30, 2007 Author Share Posted January 30, 2007 can anyone help me? Link to comment Share on other sites More sharing options...
/dev/null Posted January 30, 2007 Share Posted January 30, 2007 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 * Link to comment Share on other sites More sharing options...
salter Posted January 30, 2007 Author Share Posted January 30, 2007 (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 January 30, 2007 by salter Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 30, 2007 Moderators Share Posted January 30, 2007 its not in the helpfile how does it work _GUICtrlListViewFindItem(the Control,Item to find)and its not a known function i have listview includedUpgrade to the released version of AutoIt 3.2.2.0 ... you're obviously outdated. 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. Link to comment Share on other sites More sharing options...
BrettF Posted January 30, 2007 Share Posted January 30, 2007 Are You Sure?? I sure found it. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
/dev/null Posted January 30, 2007 Share Posted January 30, 2007 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 * 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