ShadowElf Posted October 31, 2009 Posted October 31, 2009 (edited) RESOLVED I want to make a list who refresh every time I press a key for that i want to delete a list content for that new values take place /RESOLVED NEW PROBLEM: And how to detect a key is pressed event in a input? Now i have $cuvantcauta=GUICtrlCreateInput("", 32, 24, 385, 21) GUICtrlSetOnEvent(-1, "pcauta") but when i type a search and when I select another input start pcauta() I want to start pcauta() every time a tst is pressed in input $cuvantcauta this is the function expandcollapse popupFunc pcauta() Local $user, $pass, $db, $server, $connect, $niciuncod = 1 Local $query, $continut, $xcod[10000], $xnume[10000], $xpv[10000], $xstoc[10000], $x Local $ccauta ???????????RESET LIST????_GUICtrlListBox_DeleteString($Listaproduse, 1)???????????????? $ccauta = GUICtrlRead($cuvantcauta) $user = "root" $pass = "xxx" $db = "xxx" $server = "xxx" $connect = _MySQLConnect ($user, $pass, $db, $server) $query = "SELECT * FROM magazies WHERE CODBAR like '%" & $ccauta & "%'" $continut = _Query ($connect, $query) With $continut If .EOF Then $niciuncod = 0; EndIf EndWith If $niciuncod > 0 Then $x=0 With $continut While Not .EOF $xcod[$x] = .Fields ("CODBAR").value $xnume[$x] = .Fields ("Articol").value $xpv[$x] = .Fields ("pv").value $xstoc[$x] = .Fields ("pv").value $x=$x+1; $lastx=$x .MoveNext WEnd EndWith _MySQLEnd ($connect) for $x=0 to $lastx step 1 GUICtrlCreateListViewItem('' & $xcod[$x] & '|' & $xnume[$x] & '|' & $xpv[$x] & '|' & $xstoc[$x] & '', $Listaproduse) Next EndIf EndFunc Edited October 31, 2009 by ShadowElf I like IT: php, mysql, codeingiter, css, jquery and AUTOIT
Zedna Posted October 31, 2009 Posted October 31, 2009 GUICtrlSendMsg($ListView1, $LVM_DELETEALLITEMS, 0, 0) or _GUICtrlListView_DeleteAllItems($ListView1) Resources UDF ResourcesEx UDF AutoIt Forum Search
ShadowElf Posted October 31, 2009 Author Posted October 31, 2009 (edited) thx, and how to detect a key is pressen on event? as the user types data to call function pcauta() Edited October 31, 2009 by ShadowElf I like IT: php, mysql, codeingiter, css, jquery and AUTOIT
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