Sign in to follow this  
Followers 0
styles3000

How Do I Import Info?

11 posts in this topic

#1 ·  Posted (edited)

When I press the "Import Keywords 2" button. I need a script that will scan the first keyword under the "Import Keywords" edit box which is "act" . Then I want the script to go into D:\Objects To Burn\Documents and look for act.txt. I want this script to go within the file, scan it, copy all the keywords, then import(paste it) in the edit box underneath "Generate Subtopic Keywords".

After the keyword "act". I want the script to scan the second keyword under the "Import Keywords" edit box which is "aig" . Then I want the script to go into D:\Objects To Burn\Documents and look for aig.txt.

I want this script to go within the file, scan it, copy all the keywords within the text file, then import(paste it) in the edit box underneath "Generate Subtopic Keywords".

I would a like this cycle to take place on on all the keywords under the "Import Keywords" edit box" .(ie.aig stock,airsoft,ako,aol) until the last keyword.) Please make it dynamic and or global to were no matter what keyword it is ,its processed.

Unfinished Form6.au3

Form 1.pdf

Edited by styles3000

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

I just received your message.

I'm very busy at the moment.

I'm not sure if I have time today to look into your problem.

If I find some time I will send a PM.

Scriptonize

[[Edit: Removed some details since this message was a PM.]]

Edited by Scriptonize

If you learn from It, it's not a mistake

Share this post


Link to post
Share on other sites

Hello,

I have a GUI and I need a little help. If you could, take a look at Form 1 in the pdf file .

Put your self into my position,

i need to read something that looks more like lyric than the question, posted on "GUI Suport" and as far as i tryed to see its for "General Suport" and try to understand where i need to do what in 1000 line script with no info what part of the script is wrong. And that all i need to do only becose someone PM-ed me (me and other members of forum) with no explanations in PM (Title "I need your help") and only linck in it for this topic (to me this is worse than bumping topic ih 24h period isnt complited).

Pls put some more efforts in your writing on forum, noone need 1000 lines, we need only the part of script (or smaller rewrite of the script) where you have problem. So pls post on general support or at least reedit your post heare or probably noone will even try to help.


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Hi Styles:

Here's what u need..

1) guictrlread the edit box..

2) stringsplit the contents to read 1 lin at a time..

3) Fileopen the name that is read

4) _FileReadToArray the contents of the file..

5) populate the list with contents of the array..

6) read the next element of the stringsplit array.. and so on...

Tell me if u can't write this.. I m a bit busy but will help u write this..

N yeah, next time onwards, please avoid reposting and bumping the topic and PM ing ppl..


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I lost somewhere int he middle...!!!!!!!!!

_________

Carousel Microwave

Edited by Annie1122

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

@Annie

ya.. takes a lot of effort to understand..

Edited by Manjish

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

Thank you Mr. Manjish for your reply. My apologies for PM and reposting. That would great if you could assist me. Would it be possible if we can meet on Yahoo messenger?

Hi Styles:

Here's what u need..

1) guictrlread the edit box..

2) stringsplit the contents to read 1 lin at a time..

3) Fileopen the name that is read

4) _FileReadToArray the contents of the file..

5) populate the list with contents of the array..

6) read the next element of the stringsplit array.. and so on...

Tell me if u can't write this.. I m a bit busy but will help u write this..

N yeah, next time onwards, please avoid reposting and bumping the topic and PM ing ppl..

Share this post


Link to post
Share on other sites

no my friend.. My office blocks yahoo.. and usually i go home very late..

But I tell u what..

U start writing the script as i suggested and keep on posting in this topic as soon as u get stuck..

I will watch this topic and reply as soon as I can.. I think this can work!!


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

A buddy of mine helped me write a script a few weeks ago that does something similar. I want to alter it but I don't know where to start. Here it is.........

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListBoxConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#Include <Array.au3>
#include <file.au3>
#include <EditConstants.au3>

$Form1_1 = GUICreate("Form1", 609, 414, 186, 127)
$Button1 = GUICtrlCreateButton("Get Popular Keyword ", 32, 40, 241, 25)
$Button2 = GUICtrlCreateButton("Website Creation", 32, 136, 241, 33)
$Button3 = GUICtrlCreateButton("Generate Subtopic Keywords", 440, 40, 139, 33, 0)
$Button4 = GUICtrlCreateButton("Generate Websites", 32, 272, 243, 49)
$List1 = GUICtrlCreateEdit("", 280, 72, 129, 357)
$Button5 = GUICtrlCreateButton("Import Keywords", 296, 40, 105, 33)
$List2 = GUICtrlCreateList("", 440, 72, 137, 266)
GUICtrlSetData(-1, "")
$Button6 = GUICtrlCreateButton("Import Keywords 2", 456, 344, 105, 25, 0)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            _Button1_Pressed()
        Case $Button5
            _GetKeywords() ;-----------------------------------------------o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
            Sleep(3000)
            _PopulateKeyWords()
        Case $Button3
            ;_Button3_Pressed()
            _Button3_Pressed_NEW()
        Case $Button2
            _Button2_Pressed()
    EndSwitch
WEnd


EndFunc

Func _Button3_Pressed()
EndFunc

Func _Button2_Pressed()
EndFunc

Func _findChecksum($pixel,$chksum)
EndFunc

Func _Button1_Pressed()
EndFunc

Func _GetKeywords()
    Local $hFile = FileOpen("D:\Documents and Settings\Taevon Jones\Desktop\New Text document.txt", 2)

    Dim $aRecords
    If Not _FileReadToArray("D:\Objects To Burn\Documents\iGoogle.txt",$aRecords) Then
        MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
        Exit
    EndIf

    For $i = 1 to $aRecords[0]

        If StringInStr( $aRecords[$i] ,'Location: United States') > 1 Then
            For $x = $i+1 to $aRecords[0]
                $aRecords[$x] = StringRegExpReplace($aRecords[$x], "\+\d+%", "")
                If StringInStr( $aRecords[$x],'View full report') > 1 Then ExitLoop
                If not $aRecords[$x] = "" and _
                    not (StringInStr( $aRecords[$x],'Not enough search') > 1) and _
                    not (StringInStr( $aRecords[$x],'criteria and try') > 1) Then FileWriteLine($hFile,StringStripWS($aRecords[$x],1) )
            Next
        EndIf
        If StringInStr( $aRecords[$i] ,'Category: Automotive') > 1 Then
            For $x = $i+1 to $aRecords[0]
                $aRecords[$x] = StringRegExpReplace($aRecords[$x], "\+\d+%", "")
                If StringInStr( $aRecords[$x] ,'View full report') > 1 Then ExitLoop
                If not $aRecords[$x] = "" and _
                    not (StringInStr( $aRecords[$x],'Not enough search') > 1) and _
                    not (StringInStr( $aRecords[$x],'criteria and try') > 1) Then FileWriteLine($hFile,StringStripWS($aRecords[$x],1) )
            Next
        EndIf

    Next
    FileClose($hFile)
EndFunc

Func _PopulateKeyWords()
    Dim $chars, $data
    ;-----------------------------------------------o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
    _FileReadToArray("D:\Documents and Settings\Taevon Jones\Desktop\New Text document.txt", $chars)
    _ArraySort($chars)
    For $i = 1 to $chars[0]
        GUICtrlSetData($List1,GUICtrlRead($List1)&$chars[$i]&@CRLF)
    Next

EndFunc

Func _ReadFile($File)
    $file = FileOpen($File, 0)

    $chars = FileRead($file)

    FileClose($file)
    Return $chars
EndFunc

I know I have to create a new function , I'm going to call it Func _GetKeywords2().......

Func _GetKeywords2()

EndFunc

I know I have to place Local $hFile = FileOpen("D:\Documents and Settings\Taevon Jones\Desktop\New Text document.txt", 2).........

Func _GetKeywords2()
Local $hFile = FileOpen("D:\Documents and Settings\Taevon Jones\Desktop\New Text document.txt", 2)

EndFunc

I know this does something.....Dim $aRecords

If Not _FileReadToArray("D:\Objects To Burn\Documents\act.txt",$aRecords) Then

MsgBox(4096,"Error", " Error reading log to Array error:" & @error)

Exit

EndIf. Right here is where I need a function to search (I guess the stringsplit) the $List1 (the edit box) for the first keyword, which is "act". Once it finds "act". I need autoit to go into D:\Objects To Burn\Documents and look for the file with the exact name(act.txt)

Func _GetKeywords2()
Local $hFile = FileOpen("D:\Documents and Settings\Taevon Jones\Desktop\New Text document.txt", 2)

Dim $aRecords
    If Not _FileReadToArray("D:\Objects To Burn\Documents\act.txt",$aRecords) Then
        MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
        Exit
    EndIf
EndFunc

My buddy made this function below, I'm not sure how it works. All I know is that it does work. I'm not sure if its even needed in what I'm trying to accomplish. I know it needs to be altered in order to go into each document; pull out the keywords and place them into $List2(edit box 2).......

For $i = 1 to $aRecords[0]

        If StringInStr( $aRecords[$i] ,'Location: United States') > 1 Then
            For $x = $i+1 to $aRecords[0]
                $aRecords[$x] = StringRegExpReplace($aRecords[$x], "\+\d+%", "")
                If StringInStr( $aRecords[$x],'View full report') > 1 Then ExitLoop
                If not $aRecords[$x] = "" and _
                    not (StringInStr( $aRecords[$x],'Not enough search') > 1) and _
                    not (StringInStr( $aRecords[$x],'criteria and try') > 1) Then FileWriteLine($hFile,StringStripWS($aRecords[$x],1) )
            Next
        EndIf
        If StringInStr( $aRecords[$i] ,'Category: Automotive') > 1 Then
            For $x = $i+1 to $aRecords[0]
                $aRecords[$x] = StringRegExpReplace($aRecords[$x], "\+\d+%", "")
                If StringInStr( $aRecords[$x] ,'View full report') > 1 Then ExitLoop
                If not $aRecords[$x] = "" and _
                    not (StringInStr( $aRecords[$x],'Not enough search') > 1) and _
                    not (StringInStr( $aRecords[$x],'criteria and try') > 1) Then FileWriteLine($hFile,StringStripWS($aRecords[$x],1) )
            Next
        EndIf

    Next
    FileClose($hFile)
EndFunc

This is what we have so far........

Func _GetKeywords2()

Local $hFile = FileOpen("D:\Documents and Settings\Taevon Jones\Desktop\New Text document.txt", 2)

Dim $aRecords

If Not _FileReadToArray("D:\Objects To Burn\Documents\act.txt",$aRecords) Then

MsgBox(4096,"Error", " Error reading log to Array error:" & @error)

Exit;I need this function able to be dynamic and global able to go to

; any keyword file ,not just act.txt

EndIf

For $i = 1 to $aRecords[0]

If StringInStr( $aRecords[$i] ,'Location: United States') > 1 Then

For $x = $i+1 to $aRecords[0]

$aRecords[$x] = StringRegExpReplace($aRecords[$x], "\+\d+%", "")

If StringInStr( $aRecords[$x],'View full report') > 1 Then ExitLoop

If not $aRecords[$x] = "" and _

not (StringInStr( $aRecords[$x],'Not enough search') > 1) and _

not (StringInStr( $aRecords[$x],'criteria and try') > 1) Then FileWriteLine($hFile,StringStripWS($aRecords[$x],1) )

Next

EndIf

If StringInStr( $aRecords[$i] ,'Category: Automotive') > 1 Then

For $x = $i+1 to $aRecords[0]

$aRecords[$x] = StringRegExpReplace($aRecords[$x], "\+\d+%", "")

If StringInStr( $aRecords[$x] ,'View full report') > 1 Then ExitLoop

If not $aRecords[$x] = "" and _

not (StringInStr( $aRecords[$x],'Not enough search') > 1) and _

not (StringInStr( $aRecords[$x],'criteria and try') > 1) Then FileWriteLine($hFile,StringStripWS($aRecords[$x],1) )

Next

EndIf

Next

FileClose($hFile)

EndFunc

Not to sure, but I guess this next section is where the $List2 gets populated. ........

Func _PopulateKeyWords()
    Dim $chars, $data
    ;-----------------------------------------------o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
    _FileReadToArray("D:\Documents and Settings\Taevon Jones\Desktop\New Text document.txt", $chars)
    _ArraySort($chars)
    For $i = 1 to $chars[0]
        GUICtrlSetData($List2,GUICtrlRead($List2)&$chars[$i]&@CRLF)
    Next

EndFunc

Func _ReadFile($File)
    $file = FileOpen($File, 0)

    $chars = FileRead($file)

    FileClose($file)
    Return $chars
EndFunc

I want all this to take place when I press $Button6.

D:\Objects To Burn\Documents\act.txt

D:\Objects To Burn\Documents\aig.txt

Share this post


Link to post
Share on other sites

tested it with act.txt and aig.txt located in scriptdir. Note that i only added new func and not edited any that you puted in there.

Hope itl help you

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListBoxConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#Include <Array.au3>
#include <file.au3>
#include <EditConstants.au3>
Global $split
Dim $arrayread

$Form1_1 = GUICreate("Form1", 609, 414, 186, 127)
$Button1 = GUICtrlCreateButton("Get Popular Keyword ", 32, 40, 241, 25)
$Button2 = GUICtrlCreateButton("Website Creation", 32, 136, 241, 33)
$Button3 = GUICtrlCreateButton("Generate Subtopic Keywords", 440, 40, 139, 33, 0)
$Button4 = GUICtrlCreateButton("Generate Websites", 32, 272, 243, 49)
$List1 = GUICtrlCreateEdit("act"&@CRLF&"aig", 280, 72, 129, 357) ; added "act"&@CRLF&"aig" for testing
$Button5 = GUICtrlCreateButton("Import Keywords", 296, 40, 105, 33)
$List2 = GUICtrlCreateList("", 440, 72, 137, 266)
GUICtrlSetData(-1, "")
$Button6 = GUICtrlCreateButton("Import Keywords 2", 456, 344, 105, 25, 0)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            _Button1_Pressed()
        Case $Button5
            _GetKeywords() ;-----------------------------------------------o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
            Sleep(3000)
            _PopulateKeyWords()
        Case $Button3
            ;_Button3_Pressed()
            _Button3_Pressed_NEW()
        Case $Button2
            _Button2_Pressed()
        Case $Button6 ;this i did add
            _Button6_Pressed()
    EndSwitch
WEnd

Func _Button6_Pressed() ;this i did add
    $split = StringSplit(GUICtrlRead($List1),@CRLF)
;~  _ArrayDisplay($split)
    For $x = 1 to $split[0]
        If $split[$x] <> "" And FileExists($split[$x]&".txt") Then ; If FileExists("C:\filepath\"&$split[$x]&".txt")
;~          MsgBox(0,"",@ScriptDir&$split[$x]&".txt")
             _FileReadToArray($split[$x]&".txt",$arrayread) ; $arrayread = _FileReadToArray("C:\filepath\"&$split[$x]&".txt",$arrayread)
            For $y = 1 To $arrayread[0]
                GUICtrlSetData($List2,$arrayread[$y])
            Next
        EndIf
    Next
EndFunc


Func _Button3_Pressed()
EndFunc

Func _Button2_Pressed()
EndFunc

Func _findChecksum($pixel,$chksum)
EndFunc

Func _Button1_Pressed()
EndFunc

Func _GetKeywords()
    Local $hFile = FileOpen("D:\Documents and Settings\Taevon Jones\Desktop\New Text document.txt", 2)

    Dim $aRecords
    If Not _FileReadToArray("D:\Objects To Burn\Documents\iGoogle.txt",$aRecords) Then
        MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
        Exit
    EndIf

    For $i = 1 to $aRecords[0]

        If StringInStr( $aRecords[$i] ,'Location: United States') > 1 Then
            For $x = $i+1 to $aRecords[0]
                $aRecords[$x] = StringRegExpReplace($aRecords[$x], "\+\d+%", "")
                If StringInStr( $aRecords[$x],'View full report') > 1 Then ExitLoop
                If not $aRecords[$x] = "" and _
                    not (StringInStr( $aRecords[$x],'Not enough search') > 1) and _
                    not (StringInStr( $aRecords[$x],'criteria and try') > 1) Then FileWriteLine($hFile,StringStripWS($aRecords[$x],1) )
            Next
        EndIf
        If StringInStr( $aRecords[$i] ,'Category: Automotive') > 1 Then
            For $x = $i+1 to $aRecords[0]
                $aRecords[$x] = StringRegExpReplace($aRecords[$x], "\+\d+%", "")
                If StringInStr( $aRecords[$x] ,'View full report') > 1 Then ExitLoop
                If not $aRecords[$x] = "" and _
                    not (StringInStr( $aRecords[$x],'Not enough search') > 1) and _
                    not (StringInStr( $aRecords[$x],'criteria and try') > 1) Then FileWriteLine($hFile,StringStripWS($aRecords[$x],1) )
            Next
        EndIf

    Next
    FileClose($hFile)
EndFunc

Func _PopulateKeyWords()
    Dim $chars, $data
    ;-----------------------------------------------o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
    _FileReadToArray("D:\Documents and Settings\Taevon Jones\Desktop\New Text document.txt", $chars)
    _ArraySort($chars)
    For $i = 1 to $chars[0]
        GUICtrlSetData($List1,GUICtrlRead($List1)&$chars[$i]&@CRLF)
    Next

EndFunc

Func _ReadFile($File)
    $file = FileOpen($File, 0)

    $chars = FileRead($file)

    FileClose($file)
    Return $chars
EndFunc

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Mr.BogQ,

Thanks. The script seems to be almost there. I tried to test but when I pressed the "import keywords2" button, nothing happened. I was hoping that when I pressed the "import keywords2" button the script would grab the keyword in the edit box to the left then go into D:\Objects To Burn\Documents\act.txt and bring all the keywords into the edit box to the right. Then move onto the "aig" and go back into D:\Objects To Burn\Documents\aig.txt grab the content and import it to the edit box on the right. Be mindful, that I need the script dynamic and global able to work for any keyword thats in the edit box on the right($List1).

tested it with act.txt and aig.txt located in scriptdir. Note that i only added new func and not edited any that you puted in there.

Hope itl help you

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListBoxConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#Include <Array.au3>
#include <file.au3>
#include <EditConstants.au3>
Global $split
Dim $arrayread

$Form1_1 = GUICreate("Form1", 609, 414, 186, 127)
$Button1 = GUICtrlCreateButton("Get Popular Keyword ", 32, 40, 241, 25)
$Button2 = GUICtrlCreateButton("Website Creation", 32, 136, 241, 33)
$Button3 = GUICtrlCreateButton("Generate Subtopic Keywords", 440, 40, 139, 33, 0)
$Button4 = GUICtrlCreateButton("Generate Websites", 32, 272, 243, 49)
$List1 = GUICtrlCreateEdit("act"&@CRLF&"aig", 280, 72, 129, 357) ; added "act"&@CRLF&"aig" for testing
$Button5 = GUICtrlCreateButton("Import Keywords", 296, 40, 105, 33)
$List2 = GUICtrlCreateList("", 440, 72, 137, 266)
GUICtrlSetData(-1, "")
$Button6 = GUICtrlCreateButton("Import Keywords 2", 456, 344, 105, 25, 0)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            _Button1_Pressed()
        Case $Button5
            _GetKeywords() ;-----------------------------------------------o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
            Sleep(3000)
            _PopulateKeyWords()
        Case $Button3
            ;_Button3_Pressed()
            _Button3_Pressed_NEW()
        Case $Button2
            _Button2_Pressed()
        Case $Button6 ;this i did add
            _Button6_Pressed()
    EndSwitch
WEnd

Func _Button6_Pressed() ;this i did add
    $split = StringSplit(GUICtrlRead($List1),@CRLF)
;~  _ArrayDisplay($split)
    For $x = 1 to $split[0]
        If $split[$x] <> "" And FileExists($split[$x]&".txt") Then ; If FileExists("C:\filepath\"&$split[$x]&".txt")
;~          MsgBox(0,"",@ScriptDir&$split[$x]&".txt")
             _FileReadToArray($split[$x]&".txt",$arrayread) ; $arrayread = _FileReadToArray("C:\filepath\"&$split[$x]&".txt",$arrayread)
            For $y = 1 To $arrayread[0]
                GUICtrlSetData($List2,$arrayread[$y])
            Next
        EndIf
    Next
EndFunc


Func _Button3_Pressed()
EndFunc

Func _Button2_Pressed()
EndFunc

Func _findChecksum($pixel,$chksum)
EndFunc

Func _Button1_Pressed()
EndFunc

Func _GetKeywords()
    Local $hFile = FileOpen("D:\Documents and Settings\Taevon Jones\Desktop\New Text document.txt", 2)

    Dim $aRecords
    If Not _FileReadToArray("D:\Objects To Burn\Documents\iGoogle.txt",$aRecords) Then
        MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
        Exit
    EndIf

    For $i = 1 to $aRecords[0]

        If StringInStr( $aRecords[$i] ,'Location: United States') > 1 Then
            For $x = $i+1 to $aRecords[0]
                $aRecords[$x] = StringRegExpReplace($aRecords[$x], "\+\d+%", "")
                If StringInStr( $aRecords[$x],'View full report') > 1 Then ExitLoop
                If not $aRecords[$x] = "" and _
                    not (StringInStr( $aRecords[$x],'Not enough search') > 1) and _
                    not (StringInStr( $aRecords[$x],'criteria and try') > 1) Then FileWriteLine($hFile,StringStripWS($aRecords[$x],1) )
            Next
        EndIf
        If StringInStr( $aRecords[$i] ,'Category: Automotive') > 1 Then
            For $x = $i+1 to $aRecords[0]
                $aRecords[$x] = StringRegExpReplace($aRecords[$x], "\+\d+%", "")
                If StringInStr( $aRecords[$x] ,'View full report') > 1 Then ExitLoop
                If not $aRecords[$x] = "" and _
                    not (StringInStr( $aRecords[$x],'Not enough search') > 1) and _
                    not (StringInStr( $aRecords[$x],'criteria and try') > 1) Then FileWriteLine($hFile,StringStripWS($aRecords[$x],1) )
            Next
        EndIf

    Next
    FileClose($hFile)
EndFunc

Func _PopulateKeyWords()
    Dim $chars, $data
    ;-----------------------------------------------o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
    _FileReadToArray("D:\Documents and Settings\Taevon Jones\Desktop\New Text document.txt", $chars)
    _ArraySort($chars)
    For $i = 1 to $chars[0]
        GUICtrlSetData($List1,GUICtrlRead($List1)&$chars[$i]&@CRLF)
    Next

EndFunc

Func _ReadFile($File)
    $file = FileOpen($File, 0)

    $chars = FileRead($file)

    FileClose($file)
    Return $chars
EndFunc

Share this post


Link to post
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
Sign in to follow this  
Followers 0