acer20006 Posted February 14, 2010 Posted February 14, 2010 hii all i have script which included winlist _ my problem appeared when i add data to my winlist . winlist keep the the same data even if i add it again . all i wann to to make winlist get ride of the repeating data ( auto refresh it ) so is that possable ?????????!!!
Developers Jos Posted February 14, 2010 Developers Posted February 14, 2010 (edited) Please don't bump your topics within 24 hours. In general: When you post a clear question with the snippet that shows what you have and demonstrates your problem you find you get help. Edited February 14, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
acer20006 Posted February 15, 2010 Author Posted February 15, 2010 Please don't bump your topics within 24 hours.In general: When you post a clear question with the snippet that shows what you have and demonstrates your problem you find you get help.ty jos _ up
GEOSoft Posted February 15, 2010 Posted February 15, 2010 Your problem very likely is related to trying to refresh the array while you are already reading it in a loop. There are solutions to that but you can't expect any help with it if you don't do as Jos so very politely asked. Post some relevent code so we can actually see where you can make changes. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
acer20006 Posted February 15, 2010 Author Posted February 15, 2010 (edited) Your problem very likely is related to trying to refresh the array while you are already reading it in a loop. There are solutions to that but you can't expect any help with it if you don't do as Jos so very politely asked. Post some relevent code so we can actually see where you can make changes.There are solutions to that but you can't expect any help with it if you don't do as Jos so very politely asked.i asked Twice before about (ListView) _ and politely thay ignoring to answerhttp://www.autoitscript.com/forum/index.php?showtopic=109883&st=0&p=772335&#entry772335http://www.autoitscript.com/forum/index.php?showtopic=109933&st=0&p=772651&#entry772651 and plz read my reply i said( ty jos _ up) what i should do more than that ?? Edited February 15, 2010 by acer20006
GEOSoft Posted February 15, 2010 Posted February 15, 2010 and plz read my reply i said( ty jos _ up) what i should do more than that ??Post the code is the what part (as Jos so politely requested), and don't create multiple threads about the same problem. Do you really think we are going to jump all over the forum looking to see if you have asked the question in another thread? Not too likely to happen. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Developers Jos Posted February 15, 2010 Developers Posted February 15, 2010 (edited) and plz read my reply i said( ty jos _ up) what i should do more than that ??An idea could be to read my whole reply and not just the first sentence?On top of that it aint to smart to create multiple threads expecting you get better responses, now read that second part and comply to it.. I am sure it will do wonders.Jos Edited February 15, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
acer20006 Posted February 15, 2010 Author Posted February 15, 2010 this's apart of code > how to Refreshing winlist & delete the repeating data??? #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1_1 = GUICreate("Test", 195, 300, 335, 133) $Status = GUICtrlCreateListView("", 8, 8, 177, 105 ,BitOR($LVS_LIST,$LVS_SINGLESEL,$LVS_SHOWSELALWAYS,$LVS_SORTDESCENDING)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### TCPStartUp() ;~ ; Connect to "SOCKET" : ;========================= $socket = TCPConnect( $g_IP, 22580 ) If $socket = -1 Then MsgBox (0,"TCP Services","Can't make connection") While 1 $Packet = TCPRecv($socket, 10000) If (StringInStr($Packet, "0x180074B60200")) and (StringInStr($Packet, "45822")) Then ; specific packets $data = StringMid($Packet, 15, 8) GUICtrlCreateListViewItem($data, $Status) EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd i used _GUICtrlListView_DeleteAllItems before but it doesn't help __ and also i have problem with If (StringInStr($Packet, "0x180074B60200")) and (StringInStr($Packet, "45822")) Then ; specific packets $data = StringMid($Packet, 15, 8) GUICtrlCreateListViewItem($data, $Status) EndIf it doesn't work at well BTW sry if i was nerves with u
acer20006 Posted February 15, 2010 Author Posted February 15, 2010 An idea could be to read my whole reply and not just the first sentence?On top of that it aint to smart to create multiple threads expecting you get better responses, now read that second part and comply to it.. I am sure it will do wonders.Josi forced to make multiple threads _at the first link you will see that i put all of my question at it (stringInStr , listview , tcp ) >> 41 Views and only one give me answer(( ok , i willn't make multiple threads again _sry ))
GEOSoft Posted February 15, 2010 Posted February 15, 2010 Perhaps you better start from the beginning. Your first post in this thread mentions a problem with WinList() and you have not used WinList() at all in the code as far as I can see. Are you just trying to delete a ListViewItem? The reason I ask is the code also doesn't show where you are attempting to delete anything at all. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Developers Jos Posted February 15, 2010 Developers Posted February 15, 2010 i forced to make multiple threads _at the first link you will see that i put all of my question at it (stringInStr , listview , tcp ) >> 41 Views and only one give me answer(( ok , i willn't make multiple threads again _sry ))You are not forced to make multiple thread but we will force you to stick to single threads.As said:Ask clear questions and you will get answers.Take your last posted snippet. Do you seriously think its even close to being simple and clear?I am honestly not trying to make fun of anything here but you are really expecting too much from us.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
acer20006 Posted February 15, 2010 Author Posted February 15, 2010 Perhaps you better start from the beginning. Your first post in this thread mentions a problem with WinList() and you have not used WinList() at all in the code as far as I can see.Are you just trying to delete a ListViewItem? The reason I ask is the code also doesn't show where you are attempting to delete anything at all.winlist > Solved sry i forget to tell that but now i have new Obstacle wih listviewitem ( it's keep adding the same packets from TCPRecv ) i wann to delete the repeated dataand about StringInStr i cant make it work right _ script ignoring it
acer20006 Posted February 15, 2010 Author Posted February 15, 2010 You are not forced to make multiple thread but we will force you to stick to single threads.As said:Ask clear questions and you will get answers.Take your last posted snippet. Do you seriously think its even close to being simple and clear?I am honestly not trying to make fun of anything here but you are really expecting too much from us.Josi know that u didnt try to make fun of anything , but i'm newbie _ and dont know any where alse to ask for help _ i keep tyring to slove my own problem but when it become hopeless you know ...
GEOSoft Posted February 15, 2010 Posted February 15, 2010 winlist > Solved sry i forget to tell that but now i have new Obstacle wih listviewitem ( it's keep adding the same packets from TCPRecv ) i wann to delete the repeated data and about StringInStr i cant make it work right _ script ignoring it Now it's almost clear as mud. Try this line. ;GUICtrlCreateListViewItem($data, $Status);; This is your existing line, change as follows If _GUICtrlListView_FindText($status, $data) = -1 Then GUICtrlCreateListViewItem($data, $Status) George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
acer20006 Posted February 16, 2010 Author Posted February 16, 2010 Now it's almost clear as mud. Try this line. ;GUICtrlCreateListViewItem($data, $Status);; This is your existing line, change as follows If _GUICtrlListView_FindText($status, $data) = -1 Then GUICtrlCreateListViewItem($data, $Status) it's work _ ty but what about If (StringInStr($Packet, "0x180074B60200")) and (StringInStr($Packet, "45822")) Then ; specific packets $data = StringMid($Packet, 15, 8) GUICtrlCreateListViewItem($data, $Status) EndIfmy purpose to search for Specific packets started with "0x180074B60200" and included "45822" is that possable _ and thx again for help _ i really appreciate your help
GEOSoft Posted February 16, 2010 Posted February 16, 2010 Try again. This should be close If StringRegExp($packet, "(?i)0x180074B60200.*45822.*") Then $data = StringMid($Packet, 15, 8) If _GUICtrlListView_FindText($status, $data) = -1 Then GUICtrlCreateListViewItem($data, $Status) EndIf If that doesn't do it then post a few true examples of $packet without quotes. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
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