Jump to content

Fresh Pair of Eyes Needed


Recommended Posts

Hey all,

Still working on my very first project as referenced >>Here<<. I've been getting a lot of help from Authenticity but he's currently working on some other things that keep them from visiting here as often. The completed project will compare the lines in three different types of log files to a large database, returning a list of "bad" entries. The bad entries will be compared to another large database. The results of that comparison will be used to script a text document formatted in either BBC or HTML code. The current code for my project reads as follows:

;#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListBoxConstants.au3>
#include <WindowsConstants.au3>
#include <file.au3>
#include <GuiListBox.au3>
#include <Misc.au3>
#include <String.au3>
#include <EditConstants.au3>
#include <Clipboard.au3>
#include<Array.au3>

Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Main = GUICreate("DB Scanner", 641, 443)
GUISetFont(10, 400, 0, "Tahoma")
GUISetOnEvent($GUI_EVENT_CLOSE, "MainClose")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "MainMinimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "MainMaximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "MainRestore")
$Scan = GUICtrlCreateButton("Scan", 28, 359, 90, 35, 0)
GUICtrlSetFont(-1, 14, 400, 0, "Tahoma")
GUICtrlSetOnEvent(-1, "ScanClick")
GUICtrlSetTip(-1, "Scans Database for items in current Log")
$Add = GUICtrlCreateButton("Add", 185, 368, 75, 25, 0)
GUICtrlSetFont(-1, 12, 400, 0, "Tahoma")
GUICtrlSetOnEvent(-1, "AddClick")
GUICtrlSetTip(-1, "Add selection to Database")
$Clear = GUICtrlCreateButton("Clear", 302, 369, 75, 25, 0)
GUICtrlSetFont(-1, 12, 400, 0, "Tahoma")
GUICtrlSetOnEvent(-1, "ClearClick")
GUICtrlSetTip(-1, "Clears selected line")
$Button4 = GUICtrlCreateButton("Create Solution", 451, 360, 150, 35, 0)
GUICtrlSetFont(-1, 14, 400, 0, "Tahoma")
GUICtrlSetOnEvent(-1, "Button4Click")
GUICtrlSetTip(-1, "Generates Formatted Post")
$List1 = GUICtrlCreateList("", 4, 14, 625, 326, BitOR($WS_BORDER, $LBS_NOTIFY, $LBS_DISABLENOSCROLL, $LBS_MULTIPLESEL, $LBS_HASSTRINGS, $WS_HSCROLL, $WS_VSCROLL))
GUICtrlSetBkColor(-1, 0xFFFBF0)
GUICtrlSetFont(-1, 12, 400, 0, "Tahoma")
GUICtrlSetOnEvent(-1, "List1Click")
$Log1 = GUICtrlCreateMenu("&Log")
GUICtrlSetOnEvent(-1, "Log1Click")
$Open = GUICtrlCreateMenuItem("Open (Ctrl+O)", $Log1)
GUICtrlSetOnEvent(-1, "OpenClick")
$Save = GUICtrlCreateMenuItem("Save (Ctrl+S)", $Log1)
GUICtrlSetOnEvent(-1, "SaveClick")
$SavAS = GUICtrlCreateMenuItem("Save As...", $Log1)
GUICtrlSetOnEvent(-1, "SavAsClick")
$Close = GUICtrlCreateMenuItem("Close Log", $Log1)
GUICtrlSetOnEvent(-1, "CloseClick")
$MenuItem1 = GUICtrlCreateMenuItem("Exit", $Log1)
GUICtrlSetOnEvent(-1, "MenuItem1Click")
$Edit = GUICtrlCreateMenu("&Edit")
GUICtrlSetOnEvent(-1, "EditClick")
$Copy = GUICtrlCreateMenuItem("Copy (Ctrl+C)", $Edit)
GUICtrlSetOnEvent(-1, "CopyClick")
$Paste = GUICtrlCreateMenuItem("Paste (Ctrl+V)", $Edit)
GUICtrlSetOnEvent(-1, "PasteClick")
$Delete = GUICtrlCreateMenuItem("Delete (Del)", $Edit)
GUICtrlSetOnEvent(-1, "DeleteClick")
$Database = GUICtrlCreateMenu("&Database")
GUICtrlSetOnEvent(-1, "DatabaseClick")
$Update = GUICtrlCreateMenuItem("Update Database", $Database)
GUICtrlSetOnEvent(-1, "UpdateClick")
$Solution = GUICtrlCreateMenu("&Solution")
GUICtrlSetOnEvent(-1, "Solutionclick")
$CREditor = GUICtrlCreateMenuItem("Cannes Fix Editor", $Solution)
GUICtrlSetOnEvent(-1, "CREditorClick")
$Translator = GUICtrlCreateMenuItem("Translator", $Solution)
GUICtrlSetOnEvent(-1, "TranslatorClick")
$Help = GUICtrlCreateMenu("&Help")
GUICtrlSetOnEvent(-1, "HelpClick")
$MenuItem2 = GUICtrlCreateMenuItem("Help Topics", $Help)
GUICtrlSetOnEvent(-1, "MenuItem2Click")
$About = GUICtrlCreateMenuItem("About DB Scanner", $Help)
GUICtrlSetOnEvent(-1, "AboutClick")
$List1context = GUICtrlCreateContextMenu($List1)
$Cop = GUICtrlCreateMenuItem("Copy Ctrl+C", $List1context)
GUICtrlSetOnEvent(-1, "CopClick")
$Past = GUICtrlCreateMenuItem("Paste Ctrl+V", $List1context)
GUICtrlSetOnEvent(-1, "PastClick")
$Google = GUICtrlCreateMenuItem("Google Ctrl+G", $List1context)
GUICtrlSetOnEvent(-1, "GoogleClick")
GUISetState(@SW_SHOW)
Dim $Main_AccelTable[8][2] = [["^o", $Open],["^s", $Save],["^c", $Copy],["^v", $Paste],["{DEL}", $Delete],["^c", $Cop],["^v", $Past],["^g", $Google]]
GUISetAccelerators($Main_AccelTable)
#EndRegion ### END Koda GUI section ###

While 1
    Sleep(100)
WEnd

Func ScanClick()

EndFunc   ;==>ScanClick
Func AboutClick()
    
EndFunc   ;==>AboutClick
Func AddClick()

EndFunc   ;==>AddClick
Func Button4Click()

EndFunc   ;==>Button4Click
Func ClearClick()
    Local $iIndex
    $hListbox = $List1
    $iIndex = _GUICtrlListBox_GetCurSel($hListbox)
    _GUICtrlListBox_DeleteString($hListbox, $iIndex)
EndFunc   ;==>ClearClick

Func CloseClick()
    GUICtrlSendMsg(7, $LB_RESETCONTENT, 0, 0)
EndFunc   ;==>CloseClick
Func CopClick()
    Local $aItems, $sItems
    $hListbox = $List1
    $aItems = _GUICtrlListBox_GetSelItemsText($hListbox)
    For $iI = 1 To $aItems[0]
        $sItems &= @LF & "" & $aItems[$iI] & "" & @LF
        ClipPut($sItems)
    Next

EndFunc   ;==>CopClick
Func CopyClick()
    Local $aItems, $sItems, $sStr, $aStr, $sPatt
    $hListbox = $List1
    $aItems = _GUICtrlListBox_GetSelItemsText($hListbox)
    For $iI = 1 To $aItems[0]
        $sItems &= @LF & $aItems[$iI]
    Next
    ClipPut($sItems)

    Switch StringLeft($sStr, StringInStr($sStr, ' ') - 1)
        Case 'R0', 'R1', 'R2', 'O14'

            Dim $pos, $Return, $Text
            Dim $sStr = $sItems
            $pos = StringInStr($sStr, '=', -1)
            $Return = StringTrimLeft($sStr, $pos)
            ClipPut(Chr(34) & $Return & Chr(34))

        Case 'O2', 'O3', 'R3', 'O9', 'O18', 'O20', 'O21', 'O22'

            Dim $aArray, $CLSID, $pos, $Return
            Dim $sStr = $sItems

            $pos = StringInStr($sStr, '\', 0, -1)
            $Return = StringTrimLeft($sStr, $pos)

            $aArray = _StringBetween($sStr, '{', '}', -1)
            $CLSID = _ArrayToString($aArray)

            If StringInStr($sStr, '\', 0, -1) Then
                ClipPut(Chr(34) & $CLSID & Chr(34) & @TAB & Chr(34) & $Return & Chr(34) & @LF)
            EndIf

        Case '(No File)', '(File Missing)'
            Dim $aArray, $CLSID, $pos, $Return
            Dim $sStr = $sItems

            $pos = StringInStr($sStr, ')', 0, -1)
            $Return = StringTrimLeft($sStr, $pos)

            $aArray = _StringBetween($sStr, '{', '}', -1)
            $CLSID = _ArrayToString($aArray)

            If StringInStr($sStr, ')', 0, -1) Then
                ClipPut(Chr(34) & $CLSID & Chr(34) & @LF)
            EndIf

        Case 'O4'
            Dim $aArray, $Name, $pos, $Return, $NewString, $Filename, $Text
            Dim $sStr = $sItems
            $aArray = _StringBetween($sStr, '[', ']', -1)
            $Name = _ArrayToString($aArray)

            $pos = StringInStr($sStr, '\', 0, -1)
            $Return = StringTrimLeft($sStr, $pos)
            $Right = StringInStr($sStr, '-', 0, -1)
            $NewString = StringTrimLeft($sStr, $Right)
            $Text = StringReplace($Return, $NewString, '')
            $Filename = StringTrimRight($Text, 2)

            If StringInStr($sStr, '\', 0, -1) Then
                ClipPut(Chr(34) & $Name & Chr(34) & @TAB & Chr(34) & $Return & Chr(34) & @LF)
                If StringTrimRight($Text, 2) Then
                    ClipPut(Chr(34) & $Name & Chr(34) & @TAB & Chr(34) & $Filename & Chr(34) & @LF)
                EndIf
            EndIf

        Case 'O23'
            Dim $pos, $Return, $Text, $aArray, $Filename, $Replace
            Dim $sStr = $sItems
            $pos = StringInStr($sStr, '\', 0, -1)
            $Return = StringTrimLeft($sStr, $pos)
            $aArray = _StringBetween($Return, '(', ')', -1)
            $Text = _ArrayToString($aArray)
            $Replace = StringReplace($Return, $Text, '')
            $Filename = StringTrimRight($Replace, 4)

            If StringInStr($sStr, '\', 0, -1) Then
                ClipPut(Chr(34) & $Return & Chr(34))
                If StringReplace($Return, $Text, '') Then
                    ClipPut(Chr(34) & $Filename & Chr(34))
                EndIf
            EndIf
    EndSwitch
    EndFunc   ;==>CopyClick
Func CREditorClick()

EndFunc   ;==>CREditorClick
Func DatabaseClick()

EndFunc   ;==>DatabaseClick
Func DeleteClick()

EndFunc   ;==>DeleteClick
Func EditClick()

EndFunc   ;==>EditClick
Func GoogleClick()

EndFunc   ;==>GoogleClick
Func HelpClick()

EndFunc   ;==>HelpClick
Func List1Click()

EndFunc   ;==>List1Click
Func Log1Click()

EndFunc   ;==>Log1Click
Func MainClose()
    Exit
EndFunc   ;==>MainClose
Func MainMaximize()

EndFunc   ;==>MainMaximize
Func MainMinimize()

EndFunc   ;==>MainMinimize
Func MainRestore()

EndFunc   ;==>MainRestore
Func MenuItem1Click()
    Exit
EndFunc   ;==>MenuItem1Click
Func MenuItem2Click()

EndFunc   ;==>MenuItem2Click

Func OpenClick()
    Dim $aRecords
    $hListbox = $List1
    $handle = FileOpenDialog("", @WorkingDir, "Text Files (*.log; *.txt)")

    If Not _FileReadToArray($handle, $aRecords) Then
        MsgBox(4096, "Error", " Error reading log to Array     error:" & @error)
        Exit
    EndIf

    ; Add strings
    _GUICtrlListBox_BeginUpdate($hListbox)
    For $x = 1 To $aRecords[0]
        _GUICtrlListBox_AddString($hListbox, $aRecords[$x] & @CR)
    Next

    _GUICtrlListBox_UpdateHScroll($hListbox)
    _GUICtrlListBox_EndUpdate($hListbox)

EndFunc   ;==>OpenClick

Func PastClick()
    Dim $Text, $aArray, $sStr
    $hListbox = $List1
    $Text = ClipGet()
    $sStr = StringReplace(StringReplace($Text, @CRLF, @LF), @CR, @LF)
    $aArray = StringSplit($sStr, @LF)
    _GUICtrlListBox_BeginUpdate($hListbox)
    For $i = 1 To $aArray[0]
        _GUICtrlListBox_AddString($hListbox, $aArray[$i] & @CR)
    Next
    _GUICtrlListBox_UpdateHScroll($hListbox)
    _GUICtrlListBox_EndUpdate($hListbox)
EndFunc   ;==>PastClick
Func PasteClick()
    Dim $Text, $aArray, $sStr
    $hListbox = $List1
    $Text = ClipGet()
    $sStr = StringReplace(StringReplace($Text, @CRLF, @LF), @CR, @LF)
    $aArray = StringSplit($sStr, @LF)
    _GUICtrlListBox_BeginUpdate($hListbox)
    For $i = 1 To $aArray[0]
        _GUICtrlListBox_AddString($hListbox, $aArray[$i] & @CR)
    Next
    _GUICtrlListBox_UpdateHScroll($hListbox)
    _GUICtrlListBox_EndUpdate($hListbox)
EndFunc   ;==>PasteClick
Func SavAsClick()
    Local $aItems
    $count = _GUICtrlListBox_GetCount(7) - 1
    $Read1 = ""
    For $i = 0 To $count
        $Read1 = $Read1 & _GUICtrlListBox_GetText(7, $i) & @CRLF
    Next
    $var = FileSaveDialog("", @WorkingDir, "Text Files (*.log; *.txt)", 2)
    If StringRight($var, 4) <> ".txt" Then
        If StringRight($var, 4) <> ".log" Then
            $var = $var & ".txt"
        EndIf
    EndIf
    FileOpen($var, 2)
    FileWrite($var, $Read1)
    FileClose($var)
EndFunc   ;==>SavAsClick

Func SaveClick()

EndFunc   ;==>SaveClick


Func Solutionclick()

EndFunc   ;==>Solutionclick
Func TranslatorClick()

EndFunc   ;==>TranslatorClick
Func UpdateClick()

EndFunc   ;==>UpdateClick

The current function I'm working on will automatically place selected text into the search box at Google. I'm at the parsing the lines stage so I have plugged the code into the CopyClick() function of the main GUI for testing purposes. This is what I have so far:

Func CopyClick()
    Local $aItems, $sItems, $sStr, $aStr, $sPatt
    $hListbox = $List1
    $aItems = _GUICtrlListBox_GetSelItemsText($hListbox)
    For $iI = 1 To $aItems[0]
        $sItems &= @LF & $aItems[$iI]
    Next
    ClipPut($sItems)

    Switch StringLeft($sStr, StringInStr($sStr, ' ') - 1)
        Case 'R0', 'R1', 'R2', 'O14'

            Dim $pos, $Return, $Text
            Dim $sStr = $sItems
            $pos = StringInStr($sStr, '=', -1)
            $Return = StringTrimLeft($sStr, $pos)
            ClipPut(Chr(34) & $Return & Chr(34))

        Case 'O2', 'O3', 'R3', 'O9', 'O18', 'O20', 'O21', 'O22'

            Dim $aArray, $CLSID, $pos, $Return
            Dim $sStr = $sItems

            $pos = StringInStr($sStr, '\', 0, -1)
            $Return = StringTrimLeft($sStr, $pos)

            $aArray = _StringBetween($sStr, '{', '}', -1)
            $CLSID = _ArrayToString($aArray)

            If StringInStr($sStr, '\', 0, -1) Then
                ClipPut(Chr(34) & $CLSID & Chr(34) & @TAB & Chr(34) & $Return & Chr(34) & @LF)
            EndIf

        Case '(No File)', '(File Missing)'
            Dim $aArray, $CLSID, $pos, $Return
            Dim $sStr = $sItems

            $pos = StringInStr($sStr, ')', 0, -1)
            $Return = StringTrimLeft($sStr, $pos)

            $aArray = _StringBetween($sStr, '{', '}', -1)
            $CLSID = _ArrayToString($aArray)

            If StringInStr($sStr, ')', 0, -1) Then
                ClipPut(Chr(34) & $CLSID & Chr(34) & @LF)
            EndIf

        Case 'O4'
            Dim $aArray, $Name, $pos, $Return, $NewString, $Filename, $Text
            Dim $sStr = $sItems
            $aArray = _StringBetween($sStr, '[', ']', -1)
            $Name = _ArrayToString($aArray)

            $pos = StringInStr($sStr, '\', 0, -1)
            $Return = StringTrimLeft($sStr, $pos)
            $Right = StringInStr($sStr, '-', 0, -1)
            $NewString = StringTrimLeft($sStr, $Right)
            $Text = StringReplace($Return, $NewString, '')
            $Filename = StringTrimRight($Text, 2)

            If StringInStr($sStr, '\', 0, -1) Then
                ClipPut(Chr(34) & $Name & Chr(34) & @TAB & Chr(34) & $Return & Chr(34) & @LF)
                If StringTrimRight($Text, 2) Then
                    ClipPut(Chr(34) & $Name & Chr(34) & @TAB & Chr(34) & $Filename & Chr(34) & @LF)
                EndIf
            EndIf

        Case 'O23'
            Dim $pos, $Return, $Text, $aArray, $Filename, $Replace
            Dim $sStr = $sItems
            $pos = StringInStr($sStr, '\', 0, -1)
            $Return = StringTrimLeft($sStr, $pos)
            $aArray = _StringBetween($Return, '(', ')', -1)
            $Text = _ArrayToString($aArray)
            $Replace = StringReplace($Return, $Text, '')
            $Filename = StringTrimRight($Replace, 4)

            If StringInStr($sStr, '\', 0, -1) Then
                ClipPut(Chr(34) & $Return & Chr(34))
                If StringReplace($Return, $Text, '') Then
                    ClipPut(Chr(34) & $Filename & Chr(34))
                EndIf
            EndIf
    EndSwitch
    EndFunc   ;==>CopyClick

The lines that I'm parsing come from a HijackThis log file. The problem I have run into is that each Case block of code parses its intended line perfectly but none of them work when I put them all together. I've obviously misunderstood or misinterpreted an important piece of information from the AutoIt help files in the help I've gotten from Authenticity. If someone could take a look and perhaps point out where I'm going wrong I would be truly grateful. Sometimes it takes a fresh pair of eyes I have a nose my eyes are far from fresh. LOL Thanks a lot in advance. --SpotCheckBilly

[font="Tahoma"]"I was worried 'bout rich and skinny, 'til I wound up poor and fat."-- Delbert McClinton[/font]

Link to comment
Share on other sites

First thing i noticed is that your useing many conditions for a single Case.

Example: Case 'R0', 'R1', 'R2', 'O14'

you need to either separate each condition into its own case or use Select:Case instead of Switch.

So this:

Switch StringLeft($sStr, StringInStr($sStr, ' ') - 1)
    Case 'R0'
        <code>
    Case 'R1'
        <code>
    Case 'R2'
        <code>
    Case 'O14'
        <code>
endswitch

or this:

Select
    Case StringLeft($sStr, StringInStr($sStr, ' ') - 1) = 'R0' Or Case StringLeft($sStr, StringInStr($sStr, ' ') - 1) = 'R1'
        <code>
;etc
EndSelect
Edited by Marlo
Click here for the best AutoIt help possible.Currently Working on: Autoit RAT
Link to comment
Share on other sites

First thing i noticed is that your useing many conditions for a single Case.

Example: Case 'R0', 'R1', 'R2', 'O14'

you need to either separate each condition into its own case or use Select:Case instead of Switch.

So this:

Switch StringLeft($sStr, StringInStr($sStr, ' ') - 1)
    Case 'R0'
        <code>
    Case 'R1'
        <code>
    Case 'R2'
        <code>
    Case 'O14'
        <code>
endswitch

Ummm... not!

This works:

For $i = 1 to 10
$sStr = "R" & $i & " blahblahblah blahblahblah"
    Switch StringLeft($sStr, StringInStr($sStr, ' ') - 1)
        Case "R1", "R3", "R5", "R7", "R9"
            ConsoleWrite("Number with 'R' is Odd: " & StringLeft($sStr, StringInStr($sStr, ' ') - 1) & @crlf)
        Case "R2", "R4", "R6", "R8", "R10"
            ConsoleWrite("Number with 'R' is Even: " &  StringLeft($sStr, StringInStr($sStr, ' ') - 1) & @crlf)
    EndSwitch
Next

@SpotCheckBilly

When you say

The problem I have run into is that each Case block of code parses its intended line perfectly but none of them work when I put them all together

Do you mean that the Switch statements aren't executing properly/as expected?

What does happen?

Link to comment
Share on other sites

Maybe I'm missing something but I can see where you declared $sStr but not where you assigned it a value and yet you are trying to use it in a case statement.

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!"

Link to comment
Share on other sites

Hey all,

Thanks for the responses. I think things will be more clear if you have an example of a HijackThis log file. This is taken from my own machine:

Logfile of Trend Micro HijackThis v2.0.2
Scan saved at 1:07:30 PM, on 5/6/2009
Platform: Windows Vista SP1 (WinNT 6.00.1905)
MSIE: Internet Explorer v7.00 (7.00.6001.18226)
Boot mode: Normal

Running processes:
C:\Program Files (x86)\Say the Time\SayTimeMain.exe
C:\Program Files (x86)\Say the Time\SayTimeMain.exe
C:\Program Files (x86)\Corel\Corel Paint Shop Pro Photo X2\CorelIOMonitor.exe
C:\Windows\SysWOW64\DllHost.exe
C:\Program Files (x86)\Nuance\NaturallySpeaking10\Program\natspeak.exe
C:\Users\George Ritter Jr\Desktop\MyDocs-Folders\Spyware Stuff\Diagnostic Tools\HJT\HijackThisv2.0.2.exe

R1 - HKCU\Software\Microsoft\Internet Explorer\Main,Default_Page_URL = http://g.msn.com/USCON/1
R1 - HKCU\Software\Microsoft\Internet Explorer\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=54896
R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Default_Page_URL = http://go.microsoft.com/fwlink/?LinkId=69157
R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Default_Search_URL = http://go.microsoft.com/fwlink/?LinkId=54896
R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=54896
R0 - HKLM\Software\Microsoft\Internet Explorer\Main,Start Page = http://go.microsoft.com/fwlink/?LinkId=69157
R0 - HKLM\Software\Microsoft\Internet Explorer\Search,SearchAssistant = 
R0 - HKLM\Software\Microsoft\Internet Explorer\Search,CustomizeSearch = 
R1 - HKCU\Software\Microsoft\Internet Explorer\Main,Window Title = Internet Explorer provided by Dell
R0 - HKCU\Software\Microsoft\Internet Explorer\Toolbar,LinksFolderName = 
O1 - Hosts: ::1 localhost
O2 - BHO: AcroIEHelperStub - {18DF081C-E8AD-4283-A596-FA578C2EBDC3} - C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroIEHelperShim.dll
O2 - BHO: (no name) - {5C255C8A-E604-49b4-9D64-90988571CECB} - (no file)
O2 - BHO: Search Helper - {6EBF7485-159F-4bff-A14F-B9E3AAC4465B} - C:\Program Files (x86)\Microsoft\Search Enhancement Pack\Search Helper\SearchHelper.dll
O2 - BHO: SSVHelper Class - {761497BB-D6F0-462C-B6EB-D4DAF1D92D43} - C:\Program Files (x86)\Java\jre6\bin\ssv.dll
O2 - BHO: Windows Live Sign-in Helper - {9030D464-4C02-4ABF-8ECC-5164760863C6} - C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live\WindowsLiveLogin.dll
O2 - BHO: Java(tm) Plug-In 2 SSV Helper - {DBC80044-A445-435b-BC74-9C25C1C588A9} - C:\Program Files (x86)\Java\jre6\bin\jp2ssv.dll
O2 - BHO: Windows Live Toolbar Helper - {E15A8DC0-8516-42A1-81EA-DC94EC1ACF10} - C:\Program Files (x86)\Windows Live\Toolbar\wltcore.dll
O3 - Toolbar: &Windows Live Toolbar - {21FA44EF-376D-4D53-9B0F-8A89D3229068} - C:\Program Files (x86)\Windows Live\Toolbar\wltcore.dll
O4 - HKLM\..\Run: [Corel Photo Downloader] "C:\Program Files (x86)\Common Files\Corel\Corel PhotoDownloader\Corel Photo Downloader.exe" -startup
O4 - HKLM\..\Run: [Corel File Shell Monitor] C:\Program Files (x86)\Corel\Corel Paint Shop Pro Photo X2\CorelIOMonitor.exe
O4 - HKCU\..\Run: [ehTray.exe] C:\Windows\ehome\ehTray.exe
O4 - HKCU\..\Run: [WMPNSCFG] C:\Program Files (x86)\Windows Media Player\WMPNSCFG.exe
O4 - HKCU\..\Run: [ISUSPM Startup] C:\PROGRA~2\COMMON~1\INSTAL~1\UPDATE~1\ISUSPM.exe -startup
O4 - HKCU\..\Run: [ISUSScheduler] "C:\Program Files (x86)\Common Files\InstallShield\UpdateService\issch.exe" -start
O4 - HKUS\S-1-5-20\..\Run: [WindowsWelcomeCenter] rundll32.exe oobefldr.dll,ShowWelcomeCenter (User 'NETWORK SERVICE')
O4 - .DEFAULT User Startup: Dell Dock First Run.lnk = C:\Program Files\Dell\DellDock\DellDock.exe (User 'Default user')
O4 - Global Startup: Say the Time.lnk = C:\Program Files (x86)\Say the Time\SayTime.exe
O9 - Extra button: Blog This - {219C3416-8CB2-491a-A3C7-D9FCDDC9D600} - C:\Program Files (x86)\Windows Live\Writer\WriterBrowserExtension.dll
O9 - Extra 'Tools' menuitem: &Blog This in Windows Live Writer - {219C3416-8CB2-491a-A3C7-D9FCDDC9D600} - C:\Program Files (x86)\Windows Live\Writer\WriterBrowserExtension.dll
O13 - Gopher Prefix: 
O18 - Protocol: cozi - {5356518D-FE9C-4E08-9C1F-1E872ECD367F} - C:\Program Files (x86)\Cozi Express\CoziProtocolHandler.dll
O23 - Service: Andrea RT Filters Service (AERTFilters) - Andrea Electronics Corporation - C:\Program Files\Realtek\Audio\HDA\AERTSr64.exe
O23 - Service: @%SystemRoot%\system32\Alg.exe,-112 (ALG) - Unknown owner - C:\Windows\System32\alg.exe (file missing)
O23 - Service: Ati External Event Utility - Unknown owner - C:\Windows\system32\Ati2evxx.exe (file missing)
O23 - Service: @dfsrres.dll,-101 (DFSR) - Unknown owner - C:\Windows\system32\DFSR.exe (file missing)
O23 - Service: Dock Login Service (DockLoginService) - Stardock Corporation - C:\Program Files\Dell\DellDock\DockLogin.exe
O23 - Service: ESET HTTP Server (EhttpSrv) - ESET - C:\Program Files\ESET\ESET NOD32 Antivirus\EHttpSrv.exe
O23 - Service: ESET Service (ekrn) - ESET - C:\Program Files\ESET\ESET NOD32 Antivirus\x86\ekrn.exe
O23 - Service: @keyiso.dll,-100 (KeyIso) - Unknown owner - C:\Windows\system32\lsass.exe (file missing)
O23 - Service: @comres.dll,-2797 (MSDTC) - Unknown owner - C:\Windows\System32\msdtc.exe (file missing)
O23 - Service: @%SystemRoot%\System32\netlogon.dll,-102 (Netlogon) - Unknown owner - C:\Windows\system32\lsass.exe (file missing)
O23 - Service: @%systemroot%\system32\psbase.dll,-300 (ProtectedStorage) - Unknown owner - C:\Windows\system32\lsass.exe (file missing)
O23 - Service: Protexis Licensing V2 (PSI_SVC_2) - Protexis Inc. - C:\Program Files (x86)\Common Files\Protexis\License Service\PsiService_2.exe
O23 - Service: @%systemroot%\system32\Locator.exe,-2 (RpcLocator) - Unknown owner - C:\Windows\system32\locator.exe (file missing)
O23 - Service: @%SystemRoot%\system32\samsrv.dll,-1 (SamSs) - Unknown owner - C:\Windows\system32\lsass.exe (file missing)
O23 - Service: @%SystemRoot%\system32\SLsvc.exe,-101 (slsvc) - Unknown owner - C:\Windows\system32\SLsvc.exe (file missing)
O23 - Service: @%SystemRoot%\system32\snmptrap.exe,-3 (SNMPTRAP) - Unknown owner - C:\Windows\System32\snmptrap.exe (file missing)
O23 - Service: @%systemroot%\system32\spoolsv.exe,-1 (Spooler) - Unknown owner - C:\Windows\System32\spoolsv.exe (file missing)
O23 - Service: stllssvr - MicroVision Development, Inc. - C:\Program Files (x86)\Common Files\SureThing Shared\stllssvr.exe
O23 - Service: @%SystemRoot%\system32\ui0detect.exe,-101 (UI0Detect) - Unknown owner - C:\Windows\system32\UI0Detect.exe (file missing)
O23 - Service: @%SystemRoot%\system32\vds.exe,-100 (vds) - Unknown owner - C:\Windows\System32\vds.exe (file missing)
O23 - Service: @%systemroot%\system32\vssvc.exe,-102 (VSS) - Unknown owner - C:\Windows\system32\vssvc.exe (file missing)
O23 - Service: @%Systemroot%\system32\wbem\wmiapsrv.exe,-110 (wmiApSrv) - Unknown owner - C:\Windows\system32\wbem\WmiApSrv.exe (file missing)
O23 - Service: @%ProgramFiles%\Windows Media Player\wmpnetwk.exe,-101 (WMPNetworkSvc) - Unknown owner - C:\Program Files (x86)\Windows Media Player\wmpnetwk.exe (file missing)

--
End of file - 7061 bytes

@Marlo -- If you look down the left side of the log file, you'll notice that there are several sections each designated by different members (actually all of the ones that start with "O" are capital letter O and not zero). Anyway in the first Case statement, it's supposed to designate that that particular block of code will output the correct results for lines R0, R1, R2', and O14 and so forth. Since there are three different types of log files it would be better if the lines were designated by the StringInStr parameters rather than by the StringLeft. In our example, the desired output it would be the URL. Hopefully that makes things a little more clear.

@ResNullius --

Do you mean that the Switch statements aren't executing properly/as expected?

That is correct. For instance in the case of the R , R1, etc. the return is supposed to be the URL wrapped in quotation marks. If I use that block of code by itself, that's what I get. As soon as I try to put it together with the others in a Switch... EndSwitch loop the return I get is the entire line.

@GEOSoft -- The $sStr=$sItems from the "copy" part of the function (in bold below):

Func CopyClick()

Local $aItems, $sItems, $sStr, $aStr, $sPatt

$hListbox = $List1

$aItems = _GUICtrlListBox_GetSelItemsText($hListbox)

For $iI = 1 To $aItems[0]

$sItems &= @LF & $aItems[$iI]

Next

ClipPut($sItems)

So, using the "R" examples from the earlier posts, for the very first line,

$sStr = "R1 - HKCU\Software\Microsoft\Internet Explorer\Main,Default_Page_URL = http://g.msn.com/USCON/1"

The desired output from Case in this instance would be:

"http://g.msn.com/USCON/1"

Using the StringinStr parameters rather than the StringLeft parameters is actually more desirable since it will produce a URL wrapped in quotation marks for any line in the log containing "Text=URL".

Hopefully that helps to clear up any questions. Please let me know if it doesn't since I am aware that sometimes my explanations are more confusing than the original. **Big sigh** it's a curse. :D SCB

[font="Tahoma"]"I was worried 'bout rich and skinny, 'til I wound up poor and fat."-- Delbert McClinton[/font]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...