zimy Posted October 15, 2006 Share Posted October 15, 2006 I posted before about dumping event log, now my boss wants me to do something different so i have to start over. Anyway haha.....havent programed in a while let alone with autoit. How can i get this to show up in the list view expandcollapse popupFunc _GetLog() Dim $line Dim $eType Dim $eEvent Dim $Array[5] Dim $x $foo = Run(@ComSpec & " /c " & @SystemDir & "\CSCRIPT.EXE EVENTQUERY.VBS /L System /R 20 /FO CSV //Nologo >> c:\sys.txt", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Sleep(400) If Not _FileReadToArray("c:\sys.txt", $line) Then MsgBox(4096, "Error", " Error reading file to Array - error:" & @error) Exit EndIf ;5$line = StringStripWs($line, 8) For $x = 1 To $line[0] $Array = StringSplit($line[$x], ",") _ArrayDisplay($Array,"") ;$eType = $line[1] ;msgbox(0,"",$eType) ;$eEvent = $line[2] ;MsgBox(0,"",$eEvent) ;$eTest = $line[$x] ;MsgBox(0,"",$eTest) GUICtrlCreateListViewItem($Array[1] & " | " & "" & " | " & "" & " | " & "" & " | " & "" & " | ", $lstViewGrid) ;MsgBox(0,"", $eType) ;MsgBOx(0,"", $eEvent) Next ;If FileExists("c:\sys.txt") Then ; $Open = FileOpen("c:\sys.txt",0) ; $Read = FileRead($Open) ; $file = StringStripWS(StringTrimLeft($Read, 220), 8) ; $new = StringSplit($file, ",") ; MsgBox(0,"",$new[1]) ; Msgbox(0,"",$new[2]) ;MsgBox(0,"",$file) ;EndIf EndFunc i have alot commented out for debugging crap, i know its a mess but im at a loss for the moment. Any help is appreciated -zimy Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted October 15, 2006 Share Posted October 15, 2006 why have the arraydisplay in there just curios and if you want to add somethign to the listview change the [1] to [$x] Link to comment Share on other sites More sharing options...
zimy Posted October 16, 2006 Author Share Posted October 16, 2006 why have the arraydisplay in there just curios and if you want to add somethign to the listview change the [1] to [$x] did the array display so i could make sure that its grabbing at least some info and stuffin it into an array. I did change the [1] to [$x] gave me an error about the subscript and would put the data into the list view Link to comment Share on other sites More sharing options...
GaryFrost Posted October 16, 2006 Share Posted October 16, 2006 not sure on the data, how about string replace and just put that in the listview? i.e. $s_text = StringReplace($line[$x], ",","|") GUICtrlCreateListViewItem($s_text, $lstViewGrid) 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...
zimy Posted October 16, 2006 Author Share Posted October 16, 2006 not sure on the data, how about string replace and just put that in the listview? i.e. $s_text = StringReplace($line[$x], ",","|") GUICtrlCreateListViewItem($s_text, $lstViewGrid) worked! THANK YOU! just gotta clean up the output now thanks again 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