Sign in to follow this  
Followers 0
styles3000

Why Won't This Code Work?

3 posts in this topic

#1 ·  Posted (edited)

Could someone look at this code for me? It worked outside the GUI, but not within the GUI.

I keep getting this error.....

-------------------------

>"D:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /AU3Check /in "D:\Objects To Burn\Adsense\Auto IT Scripts\Unfinished Form7 v2.au3"

+>14:27:26 Starting AutoIt3Wrapper v.1.10.1.14 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X86 ANSI)

>Running AU3Check (1.54.14.0) from:D:\Program Files\AutoIt3

D:\Objects To Burn\Adsense\Auto IT Scripts\Unfinished Form7 v2.au3(3329,22) : ERROR: _GetTitle() called by a previous line with 0 arg(s). Min = 1. First previous line calling this Func is 1043.

Func _GetTitle($File)

~~~~~~~~~~~~~~~~~~~~~^

D:\Objects To Burn\Adsense\Auto IT Scripts\Unfinished Form7 v2.au3 - 1 error(s), 0 warning(s)

!>14:27:27 AU3Check ended.rc:2

+>14:27:27 AutoIt3Wrapper Finished

>Exit code: 0 Time: 1.366

#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, $FirstLine


$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(""&@CRLF&"", 280, 72, 129, 357) ; added "act"&@CRLF&"aig" for testing
$Button5 = GUICtrlCreateButton("Import Keywords", 296, 40, 105, 33)
$List2 = GUICtrlCreateEdit("", 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
            $ResultsOfRead = GUICtrlRead($List2)
            $FirstLine = StringMid($ResultsOfRead,1,StringInStr($ResultsOfRead,@CRLF))
            ClipPut($FirstLine)
            _Button2_Pressed()
        Case $Button6 ;this i did add
            _Button6_Pressed()
        Case $Button4
            $ResultsOfRead = GUICtrlRead($List2)
            $FirstLine = StringMid($ResultsOfRead,1,StringInStr($ResultsOfRead,@CRLF))
            ClipPut($FirstLine)
            _Button4_Pressed()
    EndSwitch
WEnd


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

Func _Button3_Pressed_NEW()
    $sKeyword = GUICtrlRead($List1)

    While 1
        $SM = StringMid($sKeyword,1,StringInStr($sKeyword,@CRLF))
        $sKeyword = StringTrimLeft($sKeyword,StringInStr($sKeyword,@CRLF)+1)
        GUICtrlSetData($List1,$sKeyword)
        If $SM = '' Then
            MsgBox(0,'','All Keywords Done')
            Return 0
        EndIf

        ;MsgBox(0,'',$SM,1)

         _Button3_Pressed_SUB($SM)

        Sleep(4000)
        If WinExists("Keyword Elite","Please select the ke") Then
            MouseMove(178,77);This closes the box.
            MouseMove(178,77)
            MouseMove(178,77)
            MouseMove(178,77)
            MouseDown("left")
            MouseUp("left")
        EndIf

    Wend


EndFunc

Func _Button3_Pressed_SUB($FirstLine)
    Opt("WinWaitDelay",100)
    Opt("WinTitleMatchMode",4)
    Opt("WinDetectHiddenText",1)
    Opt("MouseCoordMode",0)
    sleep(4000)
    ShellExecute("D:\Program Files\Keyword Elite\Keyword Elite.exe")
    MouseMove(249,16)
    MouseDown("left")
    MouseUp("left")
    WinWait("Keyword Elite :: New Project","Step 1: Select the p")
    If Not WinActive("Keyword Elite :: New Project","Step 1: Select the p") Then WinActivate("Keyword Elite :: New Project","Step 1: Select the p")
    WinWaitActive("Keyword Elite :: New Project","Step 1: Select the p")
    MouseMove(128,125);This is where the cursor moves over the "enter main phrase or keywords.
    MouseDown("left")
    MouseUp("left")
    ;Send("{CTRLDOWN}v{CTRLUP}")
    Send($FirstLine)
    sleep(4000)
    MouseMove(210,363);This is were the mouse over the 'ok' button.
    MouseDown("left")
    MouseUp("left")
    sleep(30000)
    MouseMove(647,95);This is were the mouse over the 'report view' button.
    MouseDown("left")
    MouseUp("left")
    sleep(30000)
    ;ControlClick('Keyword Elite','Pause','1862270986', 'left')
    ;MouseMove(190,47);This is were 'pause' button is pressed.
    sleep(3000)
    MouseMove(190,47)
    MouseDown("left")
    MouseUp("left")
    sleep(3000)
    ;MouseDown("left")
    ;MouseUp("left")
    sleep(3000)
    ;MouseDown("left")
    ;MouseUp("left")
    sleep(4000)
    MouseMove(520,227);This is where the cursor moves to "Only Show Phrases Containing" section.
    MouseDown("left")
    MouseUp("left")
    Send($FirstLine)
    sleep(4000)
    MouseMove(24,128)
    sleep(7000)
    MouseDown("left")
    MouseUp("left")
    Send("{CTRLDOWN}a{CTRLUP}")
    MouseDown("right")
    MouseUp("right")
    sleep(3000)
    MouseMove(70,106)
    sleep(3000)
    MouseDown("left")
    MouseUp("left")
While 1

    If WinExists("Keyword Elite","Please select the ke") Then;This occurs after you place the keyword in the "Only Show Phrases Containing" section, and no keywords came up.
        close_box()
    EndIf

    If WinExists("Save As","Save as &type:") Then
        save_as_()
    EndIf
WEnd
EndFunc

Func _Button2_Pressed()
;remember, you have to be logged into webhost
;and into the subdomain creation section in order for this script to activate.
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",1)

;In order to keep the HOME and PAGE-MASTER-PHP.htm your templates,you've gotta copy them once. this
;is what this section does.
FileCopy('D:\Documents and Settings\Taevon Jones\Desktop\HOME-MASTER-PHP.htm', _
'D:\Objects To Burn\Adsense\websites\HOME-MASTER-PHP2.htm',0)

FileCopy('D:\Documents and Settings\Taevon Jones\Desktop\PAGE-MASTER-PHP.htm', _
            'D:\Objects To Burn\Adsense\websites\PAGE-MASTER-PHP2.htm',0)
        ;Next
;This part is responsible for the linking the pages together.
$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\"
$sFile_Title_Extract = 'Copy of OutputofFreshkeywords.txt'
$sDir_Title_Insert = 'D:\Objects To Burn\Adsense\websites\'
$sFile_Title_Insert = 'HOME-MASTER-PHP2.htm'

$sTitle_Ins = _Get_Title( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$sTitle_Rep = _Get_Title( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,0) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\"
$sFile_Title_Extract = 'OutputofFreshkeywords.txt'
$sDir_Title_Insert = 'D:\Objects To Burn\Adsense\websites\'
$sFile_Title_Insert = 'PAGE-MASTER-PHP2.htm'


;------------------- TITLE -----------------------------
$sTitle_Ins = _Get_Title( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$sTitle_Rep = _Get_Title( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,0) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking
;------------------------------------------------

;Right here, the script needs to select(copy) the 1st keyword from the edit box then send it
;This section adds the adsense and analytics code.
sleep(6000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("orps.host22.com")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}");this closes the find box
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{ENTER}");This is where orps.com control panel is selected.
sleep(6000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("Parked Domains")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(5000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(5000)
Send("{ENTER}")
sleep(5000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("Create new subdomain")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(5000)
Send("{TAB}");This is where the "create button is pressed.
sleep(6000)
Send($FirstLine);This is where you need to paste the keyword.
sleep(5000)
Send("{ENTER}")
sleep(5000)
Send("{CTRLDOWN}t{CTRLUP}")
sleep(10000)
Send("www.adsense.com{ENTER}")
sleep(15000)
mousemove(153,335)
mousedown("left")
mouseup("left")
;_findChecksum('255','3760163120');This is where AdSense Setup is clicked.
sleep(9000)
ControlFocus("Security Warning", "", "Button1")
ControlSend("Security Warning", "", "Button1","{ENTER}")
sleep(6000)
Send("https://www.google.com/adsense/adslot-add")
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("AdSense for Content")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{ENTER}");This is where "AdSense for Content "is clicked.
sleep(5000)
ControlFocus("Security Warning", "", "Button1")
ControlSend("Security Warning", "", "Button1","{ENTER}")
sleep(4000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("AdSense Blog")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{ENTER}")
sleep(4000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("AdSense Blog")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{ENTER}")
;exit
sleep(10000);Line 279
MouseMove(223,239)
MouseDown("left")
MouseUp("left")
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("add{SPACE}new")
sleep(4000)
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{ENTER}");This is where 'add new channel is pressed'
sleep(4000)
Send("{ALTDOWN}{ALTUP}e")
sleep(400)
Send("f")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{SHIFTDOWN}{TAB}{TAB}{TAB}{SHIFTUP}")
sleep(400)
Send("{ENTER}")
sleep(5000)
;_findChecksum('3238957','718721344')
MouseMove(328,247)
MouseDown("right")
MouseUp("right")
sleep(4000)
Send("{DOWN}{ENTER}")
sleep(4000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("add{SPACE}new")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{ENTER}")
sleep(5000)
Send("^{v}")
sleep(5000)
ControlFocus("Explorer User Prompt", "", "Button1")
ControlSend("Explorer User Prompt", "", "Button1","{ENTER}")
sleep(5000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("Log{SPACE}Out")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(500)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(500)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(5000)
Send("{LEFT}{ENTER}");This is the to webhost tab is pressed.
sleep(3000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("^{v}")
sleep(4000)
Send(".orps.host22.com")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{CTRLDOWN}c{CTRLUP}{RIGHT}{LEFT}")
sleep(4000)
Send("{RIGHT}{ENTER}")
sleep(4000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("Account")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{RIGHT}")
sleep(400)
Send("{ENTER}")
sleep(4000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("AdSense Blog")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(400)
Send("{ENTER}")
sleep(4000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("Homepage")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{RIGHT}")
sleep(400)
Send("^{v}")
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("Back to Get Ads")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("Preview this AdSense ")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}")
sleep(4000);Line 453
;Send("{CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}")
;sleep(4000)
;ShellExecute("D:\Documents and Settings\Taevon Jones\Desktop\HOME-MASTER-PHP")
;sleep(4000)
;Send("{ALTDOWN}{ALTUP}e{SPACE}")
;sleep(4000)
;Send("f")
;sleep(4000)
;Send("<script type=","")
;sleep(4000)
;Send("{SHIFTDOWN}'{SHIFTUP}")
;sleep(4000)
;Send("text/")




;sleep(4000)
;MouseMove(16,189);this closes the find box
;MouseDown("left")
;MouseUp("left")
;ControlFocus("Find", "", "Button2")
;ControlSend("Find", "", "Button2","{CHECK}")
sleep(7000)

Global $hFile
Global $SomeTxt
Global $StartPos, $EndPos
Global $Find_This, $Find_This_Too
Global $MyResult

$Find_This = "<googlecode>"
$Find_This_Too = "</googlecode>"
$hFile = FileOpen("D:\Objects To Burn\Adsense\websites\HOME-MASTER-PHP2.htm ",0)    ;Open file in read mode

If @error Then
    MsgBox(0,"Warning", "Unable to open file")
    Exit
EndIf

$SomeTxt = FileRead($hFile)    ;reads the complete file
FileClose($hFile)
$StartPos = StringInStr($SomeTxt,$Find_This) + StringLen($Find_This) ;finds the first string and puts the pos direct behind the found string

If $StartPos = 0 Then        ;means $Find_This not found, no need to continue
    MsgBox(0,"Warning", "Unable to find: " & $StartPos)
    Exit
Else
    ConsoleWrite("$StartPos= " & $StartPos & @CRLF)        ;not needed just added to check if code works
EndIf

$EndPos = StringInStr($SomeTxt,$Find_This_Too,0,1,$StartPos) ;finds the first occurence of $Find_This_Too after $Start_pos

If $EndPos = 0 Then        ;means $Find_This_Too was not found, no need to continue
    MsgBox(0,"Warning", "Unable to find: " & $EndPos)
    Exit
Else
    ConsoleWrite("$EndPos= " & $EndPos & @CRLF)        ;not needed just added to check if code works
EndIf

$MyResult = (StringMid($SomeTxt,$StartPos,$EndPos-$StartPos))
$MyResult = StringStripWS($MyResult,3)


If StringLen($MyResult) <> 0 Then
    MsgBox(0,"Finished", "You were looking for: " & $MyResult    )
    $text_from_clip = ClipGet()    ;Takes the result off the clipboard
    $result = StringReplace($SomeTxt, $MyResult, $text_from_clip)
    Clipput($Result)    ;Put the result on the clipboard
Else
    MsgBox(0,"Warning", "Unable to find the wanted string")
EndIf
sleep(4000)
;ControlFocus("Finished", "Yes", "Button1")
;ControlSend("Finished", "Yes", "Button1","{ENTER}")
sleep(4000)
;If StringLen($MyResult) <> 0 Then
 ;   MsgBox(0,"Finished", "You were looking for: " & $MyResult    )
  ;  ClipGet()    ;Takes the result off the clipboard
    ;Clipput($MyResult)    ;Put the result on the clipboard
;'Else
 ;'   MsgBox(0,"Warning", "Unable to find the wanted string")
;'EndIf

;Opt("WinWaitDelay",100)
;Opt("WinTitleMatchMode",4)
;Opt("WinDetectHiddenText",1)
;Opt("MouseCoordMode",0)
;WinWait("Google AdSense - AdSense for Content - Windows Internet Explorer","Address Combo Contro")
;If Not WinActive("Google AdSense - AdSense for Content - Windows Internet Explorer","Address Combo Contro") Then WinActivate("Google AdSense - AdSense for Content - Windows Internet Explorer","Address Combo Contro")
;WinWaitActive("Google AdSense - AdSense for Content - Windows Internet Explorer","Address Combo Contro")
;MouseMove(730,18)
;MouseDown("left")
;MouseUp("left")
Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 1)
Sleep(5000)
ShellExecute("D:\Objects To Burn\Adsense\websites\HOME-MASTER-PHP2.htm ");Line 550
Sleep(5000)
Send("{ALTDOWN}{ALTUP}e")
Sleep(500)
Send("a")
Sleep(500)
Send("{CTRLDOWN}v{CTRLUP}")
Sleep(5000)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",1)
Sleep(5000)
MouseMove(782,48)
sleep(3000)
MouseDown("left")
MouseUp("left")
Sleep(5000)
MouseMove(321,393)
sleep(3000)
MouseDown("left")
MouseUp("left")
Sleep(5000);Line 572
;Opt("WinWaitDelay",100)
;Opt("WinTitleMatchMode",4)
;Opt("WinDetectHiddenText",1)
;Opt("MouseCoordMode",0)
;WinWait("classname=Shell_TrayWnd","Running Applications")
;If Not WinActive("classname=Shell_TrayWnd","Running Applications") Then WinActivate("classname=Shell_TrayWnd","Running Applications")
;WinWaitActive("classname=Shell_TrayWnd","Running Applications")
;MouseMove(250,24)
;sleep(3000)
;MouseDown("left")
;MouseUp("left")
;MouseMove(256,-60)
;sleep(3000)
;MouseDown("left")
;MouseUp("left")
;WinWait("Google AdSense - AdSense for Content - Windows Internet Explorer","Address Combo Contro")
;If Not WinActive("Google AdSense - AdSense for Content - Windows Internet Explorer","Address Combo Contro") Then WinActivate("Google AdSense - AdSense for Content - Windows Internet Explorer","Address Combo Contro")
;WinWaitActive("Google AdSense - AdSense for Content - Windows Internet Explorer","Address Combo Contro")
;sleep(6000)
;MouseClick("left",647,321,2)
;MouseDown("left")
;MouseUp("left")
;MouseMove(229,311)
;MouseDown("left")
;MouseUp("left")
;sleep(3000)
;Send("{CTRLDOWN}c{CTRLUP}")
;sleep(3000)
;MouseMove(732,18)
;sleep(3000)
;MouseDown("left")
;MouseUp("left")
sleep(7000)
;#include <file.au3>
Global $hFile
Global $SomeTxt
Global $StartPos, $EndPos
Global $Find_This, $Find_This_Too
Global $MyResult

$Find_This = "<googlecode>"
$Find_This_Too = "</googlecode>"
$hFile = FileOpen("D:\Objects To Burn\Adsense\websites\PAGE-MASTER-PHP2.htm ",0)    ;Open file in read mode

If @error Then
    MsgBox(0,"Warning", "Unable to open file")
    Exit
EndIf

$SomeTxt = FileRead($hFile)    ;reads the complete file
FileClose($hFile)
$StartPos = StringInStr($SomeTxt,$Find_This) + StringLen($Find_This) ;finds the first string and puts the pos direct behind the found string

If $StartPos = 0 Then        ;means $Find_This not found, no need to continue
    MsgBox(0,"Warning", "Unable to find: " & $StartPos)
    Exit
Else
    ConsoleWrite("$StartPos= " & $StartPos & @CRLF)        ;not needed just added to check if code works
EndIf

$EndPos = StringInStr($SomeTxt,$Find_This_Too,0,1,$StartPos) ;finds the first occurence of $Find_This_Too after $Start_pos

If $EndPos = 0 Then        ;means $Find_This_Too was not found, no need to continue
    MsgBox(0,"Warning", "Unable to find: " & $EndPos)
    Exit
Else
    ConsoleWrite("$EndPos= " & $EndPos & @CRLF)        ;not needed just added to check if code works
EndIf

$MyResult = (StringMid($SomeTxt,$StartPos,$EndPos-$StartPos))
$MyResult = StringStripWS($MyResult,3)


If StringLen($MyResult) <> 0 Then
    MsgBox(0,"Finished", "You were looking for: " & $MyResult    )
    $text_from_clip = ClipGet()    ;Takes the result off the clipboard
    $result = StringReplace($SomeTxt, $MyResult, $text_from_clip)
    Clipput($Result)    ;Put the result on the clipboard
Else
    MsgBox(0,"Warning", "Unable to find the wanted string")
EndIf
sleep(4000)
;ControlFocus("Finished", "Yes", "Button1")
;ControlSend("Finished", "Yes", "Button1","{ENTER}")
sleep(4000)

;If StringLen($MyResult) <> 0 Then
 ;   MsgBox(0,"Finished", "You were looking for: " & $MyResult    )
  ;  ClipGet()    ;Takes the result off the clipboard
    ;Clipput($MyResult)    ;Put the result on the clipboard
;'Else
 ;'   MsgBox(0,"Warning", "Unable to find the wanted string")
;'EndIf
Sleep(5000)
ShellExecute("D:\Objects To Burn\Adsense\websites\PAGE-MASTER-PHP2.htm ")
Sleep(5000)
Send("{ALTDOWN}{ALTUP}e")
Sleep(500)
Send("a")
Sleep(500)
Send("{CTRLDOWN}v{CTRLUP}")
Sleep(5000)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",1)
Sleep(5000)
MouseMove(782,48)
sleep(3000)
MouseDown("left")
MouseUp("left")
Sleep(5000)
MouseMove(321,393)
sleep(3000)
MouseDown("left")
MouseUp("left")
Sleep(5000)
;Opt("WinWaitDelay",100)
;Opt("WinTitleMatchMode",4)
;Opt("WinDetectHiddenText",1)
;Opt("MouseCoordMode",0)
;WinWait("Program Manager","FolderView")
;If Not WinActive("Program Manager","FolderView") Then WinActivate("Program Manager","FolderView")
;WinWaitActive("Program Manager","FolderView")
;MouseMove(177,591)
;Sleep(3000)
;MouseDown("left")
;MouseUp("left")
;Sleep(5000)
;Send("{CTRLDOWN}{TAB}{CTRLUP}")
;Sleep(5000)
;Send("{ALTDOWN}{ALTUP}e{SPACE}")
;sleep(4000)
;Send("f")
;sleep(4000)
;exit
;Send($FirstLine);this is where the $FirstLine will go.
;sleep(8000)
;Send(".orps.host22.com")
;sleep(4000)
;Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
;sleep(4000)
;Send("{ENTER}")
;sleep(4000)
;Send("{CTRLDOWN}c{CTRLUP}")
;Sleep(5000);
;Send("{CTRLDOWN}t{CTRLUP}")
;Sleep(5000)
;Send("www.google.com/webmasters/tools/")
;Sleep(4000)
;Send("{ENTER}")
;Sleep(4000)
;Send("{ALTDOWN}{ALTUP}e{SPACE}")
;Sleep(4000)
;Send("f")
;Sleep(4000)
;Send("Sites")
;Sleep(2000)
;Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
;Sleep(2000)
;Send("{ENTER}")
;Sleep(4000)
;Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
;Sleep(4000)
;Send("{ENTER}")
;Sleep(4000)
;Send($FirstLine);this is where the $FirstLine will go.
;Sleep(10000)
;Send(".orps.host22.com")
;Sleep(4000)
;Send("{TAB}")
;Sleep(6000)
;Send("{ENTER}")
;sleep(7000)
;Send("{ALTDOWN}{ALTUP}f")
;sleep(3000)
;Send("a")
;sleep(3000)
;MouseMove(48,162)
;sleep(3000)
;MouseDown("left")
;MouseUp("left")
;sleep(3000)
;Send("dddddd")
;sleep(300)
;Send("{TAB}")
;sleep(300)
;Send("{DOWN}")
;sleep(300)
;Send("{DOWN}")
;sleep(300)
;Send("{DOWN}")
;sleep(300)
;Send("{ENTER}")
;sleep(300)
;Send("{ENTER}")
;sleep(3000)
;MouseMove(731,24);This minimizes the IE window.
;sleep(3000)
;MouseDown("left")
;MouseUp("left")
;sleep(3000)
;$hFile = FileOpen("D:\Documents and Settings\Taevon Jones\Desktop\dddddd.txt ", 0) ;Open file in read mode

;If @error Then
 ;   MsgBox(0, "Warning", "Unable to open file")
  ;  Exit
;EndIf

;$SomeTxt = FileRead($hFile) ;reads the complete file
;FileClose($hFile)

;$start = "<meta name="
;$finish = "/>"
;ClipPut($start & _StringBetween($SomeTxt, $start, $finish) & $finish)

;Sleep(5000)
;ShellExecute("D:\Documents and Settings\Taevon Jones\Desktop\HOME-MASTER-PHP.htm ")
;Sleep(5000)
;Opt("WinWaitDelay",100)
;Opt("WinTitleMatchMode",4)
;Opt("WinDetectHiddenText",1)
;Opt("MouseCoordMode",0)
;Sleep(5000)
;Send("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}")
;Sleep(5000)
;Send("^{v}")
;Sleep(5000)
;Opt("WinWaitDelay",100)
;Opt("WinTitleMatchMode",4)
;Opt("WinDetectHiddenText",1)
;Opt("MouseCoordMode",0)
;WinWait("HOME-MASTER-PHP - Notepad","")
;If Not WinActive("HOME-MASTER-PHP - Notepad","") Then WinActivate("HOME-MASTER-PHP - Notepad","")
;WinWaitActive("HOME-MASTER-PHP - Notepad","")
;MouseMove(299,21)
;MouseDown("left")
;MouseUp("left")
;WinWait("Notepad","The text in the D:\D")
;If Not WinActive("Notepad","The text in the D:\D") Then WinActivate("Notepad","The text in the D:\D")
;WinWaitActive("Notepad","The text in the D:\D")
;MouseMove(96,126)
;MouseDown("left")
;MouseUp("left")
Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 1)
;Don't forget, you've gotta be signed in as payitforward*******@gmail.com first.

Sleep(5000)
Send("{CTRLDOWN}t{CTRLUP}")
Sleep(10000)
Send("https://www.google.com/analytics/reporting/login?ctu=https%3A%2F%2Fwww.google.com%2Fanalytics%2Fsettings%2F%3F{ENTER}")
Sleep(5000)
Send("*******")
Sleep(5000)
Send("{TAB}");This is where it gets tabbed over to the "Sign In"button.
Sleep(5000)
Send("{ENTER}");This is where the "Sign In"button gets pressed.
Sleep(5000)
;Send("{CTRLDOWN}t{CTRLUP}")
MouseMove(307, 565);This is where the cursor gets moved over the bottom slider and moved to the right.
MouseDown("LEFT")
MouseMove(531, 565);moved to the right.
MouseUp("LEFT")
Sleep(2000)
MouseMove(700, 474);This is were the cursor moves over the "+ Add new profile" button.
Sleep(6000)
MouseDown("LEFT");This is where the cursor gets moved over the right hand side slider and moved down.
MouseUp("LEFT")
Sleep(5000)
MouseMove(788, 324)
MouseDown("LEFT")
MouseMove(789, 477)
MouseUp("LEFT")
Sleep(2000)
MouseMove(108, 335)
MouseDown("LEFT")
Mouseup("LEFT")
Sleep(2000)
MouseMove(105,219);This is where the mouse moves over 000webhost tab.
MouseDown("LEFT")
Mouseup("LEFT")
sleep(6000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
ControlFocus("000webhost.com Members Area - Windows Internet Explorer", "", "Edit3")
ControlSend("000webhost.com Members Area - Windows Internet Explorer", "", "Edit3",$FirstLine)
;Send($FirstLine)
sleep(4000)
Send(".orps.host22.com")
sleep(4000)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{ENTER}");this closes the find box
sleep(4000)
Send("{CTRLDOWN}c{CTRLUP}")
Sleep(2000)
MouseMove(353,215);This is where the mouse moves over GoogleAnalytics tab.
MouseDown("LEFT")
Mouseup("LEFT")
sleep(6000)
;Send("qsook.orps.host22.com")
Send("^{v}")
MouseMove(127,483);This is where the mouse moves over the "Finis"button.
MouseDown("LEFT")
Mouseup("LEFT")
sleep(6000)
MouseMove(789,289);This is where the mouse moves over the right hand slider.
sleep(7000)
MouseDown("LEFT")
MouseMove(790,419);This is where the mouse moves.
sleep(7000)
Mouseup("LEFT")
sleep(5000)
MouseMove(230,265)
MouseDown("LEFT")
Mouseup("LEFT")
Send("{CTRLDOWN}a{CTRLUP}")
sleep(5000)
Send("{CTRLDOWN}c{CTRLUP}")



Global $hFile
Global $SomeTxt
Global $StartPos, $EndPos
Global $Find_This, $Find_This_Too
Global $MyResult

$Find_This = "<googleanalyticscode>"
$Find_This_Too = "</googleanalyticscode>"
$hFile = FileOpen("D:\Objects To Burn\Adsense\websites\HOME-MASTER-PHP2.htm ",0)    ;Open file in read mode

If @error Then
    MsgBox(0,"Warning", "Unable to open file")
    Exit
EndIf

$SomeTxt = FileRead($hFile)    ;reads the complete file
FileClose($hFile)
$StartPos = StringInStr($SomeTxt,$Find_This) + StringLen($Find_This) ;finds the first string and puts the pos direct behind the found string

If $StartPos = 0 Then        ;means $Find_This not found, no need to continue
    MsgBox(0,"Warning", "Unable to find: " & $StartPos)
    Exit
Else
    ConsoleWrite("$StartPos= " & $StartPos & @CRLF)        ;not needed just added to check if code works
EndIf

$EndPos = StringInStr($SomeTxt,$Find_This_Too,0,1,$StartPos) ;finds the first occurence of $Find_This_Too after $Start_pos

If $EndPos = 0 Then        ;means $Find_This_Too was not found, no need to continue
    MsgBox(0,"Warning", "Unable to find: " & $EndPos)
    Exit
Else
    ConsoleWrite("$EndPos= " & $EndPos & @CRLF)        ;not needed just added to check if code works
EndIf

$MyResult = (StringMid($SomeTxt,$StartPos,$EndPos-$StartPos))
$MyResult = StringStripWS($MyResult,3)


If StringLen($MyResult) <> 0 Then
    MsgBox(0,"Finished", "You were looking for: " & $MyResult    )
    $text_from_clip = ClipGet()    ;Takes the result off the clipboard
    $result = StringReplace($SomeTxt, $MyResult, $text_from_clip)
    Clipput($Result)    ;Put the result on the clipboard
Else
    MsgBox(0,"Warning", "Unable to find the wanted string")
EndIf
sleep(4000)
Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 1)
Sleep(5000)
ShellExecute("D:\Objects To Burn\Adsense\websites\HOME-MASTER-PHP2.htm ");Line 550
Sleep(5000)
Send("{ALTDOWN}{ALTUP}e")
Sleep(500)
Send("a")
Sleep(500)
Send("{CTRLDOWN}v{CTRLUP}")
Sleep(5000)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",1)
Sleep(5000)
MouseMove(782,48)
sleep(3000)
MouseDown("left")
MouseUp("left")
Sleep(5000)
MouseMove(321,393)
sleep(3000)
MouseDown("left")
MouseUp("left")
;This part is what copies the files.
Sleep(5000)
$sTotalFiles = _GetFileCount("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\")
;MsgBox(0,'Total Files',$sTotalFiles)
sleep(5000)
$Firstline = 'christmas greetings'
DirCreate('D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\'&$Firstline)
FileCopy('D:\Objects To Burn\Adsense\websites\HOME-MASTER-PHP2.htm', _
'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\'&$Firstline&'\index.htm',8)
sleep(5000)
For $i = 1 To $sTotalFiles
   FileCopy('D:\Objects To Burn\Adsense\websites\PAGE-MASTER-PHP2.htm', _
            'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\'&$Firstline& '\index' & $i & '.htm',8)
        Next

EndFunc

$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0001.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index1.htm'


;$sDir_Title_Extract = "C:\Temp\"
;$sFile_Title_Extract = '0001.txt'
;$sDir_Title_Insert = 'C:\Temp\'
;$sFile_Title_Insert = 'index.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking







$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0002.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index2.htm'

;$sDir_Title_Extract = "C:\Temp\"
;$sFile_Title_Extract = '0001.txt'
;$sDir_Title_Insert = 'C:\Temp\'
;$sFile_Title_Insert = 'index.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking



$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0003.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index3.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0004.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index4.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0005.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index5.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking



$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0006.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index6.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0007.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index7.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0008.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index8.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking



$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0009.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index9.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0010.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index10.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0011.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index11.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0012.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index12.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0013.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index13.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0014.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index14.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0015.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index15.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0016.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index16.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0017.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index17.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


$sDir_Title_Extract = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sFile_Title_Extract = '0018.txt'
$sDir_Title_Insert = 'D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\'
$sFile_Title_Insert = 'index18.htm'


$sTitle_Ins = _GetTitle( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted

$sTitle_Rep = _GetTitle( $sDir_Title_Insert & $sFile_Title_Insert ) ;Get the string to be replaced

$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,$sTitle_Rep,$sTitle_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking

;----------------- CONTENT -------------------------
$sContent_Ins = _Get_Content( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#ARTICLE_CONTENT1#',$sContent_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


;------------------ AUTHOR ----------------------------
$sAuthor_Ins = _Get_Author( $sDir_Title_Extract & $sFile_Title_Extract ) ;Get the String to be inserted
$retval = _ReplaceStringInFile($sDir_Title_Insert & $sFile_Title_Insert,'#authorname#',$sAuthor_Ins,0,1) ;replace the title string
if $retval = -1 then msgbox(0, "ERROR", "The pattern could not be replaced in file: " & $sDir_Title_Insert & $sFile_Title_Insert & " Error: " & @error) ;Error checking


sleep(5000)

;-------This is where "rename files4" begans---------
$sKeywordsDir = "D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\"
$sIndexDir = "D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\"
$sTitleDir = "D:\Documents and Settings\Taevon Jones\My Documents\One a be HyperVRE Webpages\christmas greetings\"

$search = FileFindFirstFile($sKeywordsDir&"*.*")
$FileCount = '1'
While 1
    $file = FileFindNextFile($search)
    If @error Then ExitLoop
    ;MsgBox(4096, "File:", $file)
    $Title = _GetTitle($sKeywordsDir&$file)
    $Title = StringReplace($Title,'"',"'")
    $Title = StringReplace($Title,'?','')
    ;MsgBox(0,'',$Title)
    sleep(3000)
    FileMove($sIndexDir&"index"&$FileCount&".htm", $sTitleDir&$title&".htm",1)
    sleep(5000)
    $FileCount = $FileCount+1
WEnd

FileClose($search)

;http://www.autoitscript.com/forum/index.php?showtopic=19718&view=findpost&p=136319
Func _StringBetween($s_String, $s_Start, $s_End = 0)
    $s_Start = StringInStr($s_String, $s_Start) + StringLen($s_Start)
    Return StringMid($s_String, $s_Start, StringInStr($s_String, $s_End) - $s_Start)
EndFunc   ;==>_StringBetween

Func _Get_Author($File)
    $text = FileRead($File)

    $posStart = StringInStr($text,'<authorname>')
    $posEnd   = StringInStr($text,'</authorname>')

    If $posStart = 0 or $posEnd = 0 Then
        MsgBox(0,'ERROR','This File doesnt Contain content')
        $result = '' ; This File doesnt Contain a Title
    Else
        $result = StringMid($text,$posStart+12,$posEnd-($posStart+12))
    EndIf
    $result= StringLower($result)
    Return $result
EndFunc


Func _Get_Content($File)
    $text = FileRead($File)

    $posStart = StringInStr($text,'<content>')
    $posEnd   = StringInStr($text,'</content>')

    If $posStart = 0 or $posEnd = 0 Then
        MsgBox(0,'ERROR','This File doesnt Contain content')
        $result = '' ; This File doesnt Contain a Title
    Else
        $result = StringMid($text,$posStart+9,$posEnd-($posStart+9))
    EndIf
    $result= StringLower($result)
    Return $result
EndFunc
Func _GetFileCount($Directory)
    Local $sTotalFiles = 0

    $search = FileFindFirstFile($Directory&"*.*")
    If $search = -1 Then
        MsgBox(0, "Error", "No files/directories matched the search pattern")
        Exit
    EndIf

    While 1
        $file = FileFindNextFile($search)
        If @error Then ExitLoop
        $attrib = FileGetAttrib($Directory&$file)
        If StringInStr($attrib,"D") < 1 Then
            $sTotalFiles = $sTotalFiles+1
        EndIf
    WEnd

    FileClose($search)
    Return $sTotalFiles

EndFunc

Func _findChecksum($pixel,$chksum)

    $x = 5 ;LEFT pixel of Total Area to Search for $pixel
    $y = 5 ;TOP
    $xpixel = @DesktopWidth - 5 ;Right
    $ypixel = @DesktopHeight - 5 ;Bottom

    While 1
        $xy = PixelSearch($x,$y,$xpixel,$ypixel,$pixel, 0)

        If @error And $ypixel = (@DesktopHeight - 5)Then
            MsgBox(4096,"@Error ","Could not find Checksum" & @LF & '     Finished Searching all of Screen', 4)

            exit

        ElseIf @error Then
            $y = $ypixel + 1
            $ypixel = (@DesktopHeight - 5)
            $x = 0
        ElseIf $chksum = PixelCheckSum($xy[0]-4, $xy[1]-20, $xy[0]+4, $xy[1]+20) Then
            ToolTip("Found Checksum")
            MouseMove($xy[0],$xy[1], 20)
            MouseClick("Left",$xy[0],$xy[1])
            Sleep(500)
            ;Exit
            Return 1
        Else
            $y = $xy[1]
            $ypixel = $y
            $x = $xy[0] + 1
        EndIf
    WEnd

EndFunc



Func _Button1_Pressed()

    Opt("WinWaitDelay",100)
    Opt("WinTitleMatchMode",4)
    Opt("WinDetectHiddenText",1)
    Opt("MouseCoordMode",0)

    $oIE = _IECreate ("www.igoogle.com")
    Send("{TAB 12}")
    Send("{ENTER}")
    _IELoadWait ($oIE)

    sleep(5000)
    ;_findChecksum('14547148','3663187224');This is where the cursor moves over the "maximize" button right next to Google Insights For Search.
    ;sleep(7000)
    ;_findChecksum('14547148','3707155282');This is where the cursor moves over the "Edit Settings" selection.
    ;sleep(7000)
    ;MouseMove(783,249);This is where the cursor slides the slider down.
    ;MouseDown("left")
    ;MouseMove(775,296)
    ;MouseUp("left")
    ;sleep(7000)
    ;MouseMove(546,348)
    ;MouseDown("left")
    ;MouseUp("left")
    ;sleep(1000)
    ;_findChecksum('16777215','2377961821');This is where the cursor moves over the "Arts and Humanities" selection.
    ;sleep(7000)
    ;_findChecksum('67','3026216628')
    sleep(12000)
    MouseMove(21,80);Cursor moves over the "File" tab at the top of the screen.
    sleep(7000)
    MouseDown("left")
    MouseUp("left")
    MouseMove(46,212);Cursor moves over "Save As" .
    sleep(11000)
    MouseDown("left")
    MouseUp("left")
    sleep(8000)
    MouseMove(373,394);Cursor moves over "Save As Type" .
    sleep(7000)
    MouseDown("left")
    MouseUp("left")
    MouseMove(345,451);Cursor moves over "Text File.txt" .
    sleep(6000)
    MouseDown("left")
    MouseUp("left")
    sleep(7000)
    sleep(4000)
    MouseMove(510,371);Cursor moves over the "Save" button .
    sleep(4000)
    MouseDown("left")
    MouseUp("left")
    sleep(7000)

EndFunc

Func _Button4_Pressed()
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
shellexecute("D:\Objects To Burn\Documents\Document 2.txt");Right here instead going, I need a function to
;select(copy) the first keyword in the $List2.
shellexecute("D:\Program Files\HyperVRE\HyperVRE.exe")
sleep(30000)
ControlFocus("HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1")
ControlSend("HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1","{ENTER}")
sleep(5000)
ControlFocus("Step 1 - Keyword Selection", "", "ThunderRT6TextBox1" )
sleep(9000)
ControlSend("Step 1 - Keyword Selection", "", "ThunderRT6TextBox1",$FirstLine)
sleep(3000)
ControlFocus ("Step 1 - Keyword Selection", "", "ThunderRT6UserControlDC2" );This is the "Suggest Keywords"
ControlSend("Step 1 - Keyword Selection", "", "ThunderRT6UserControlDC2","{ENTER}")
sleep(3000)
ControlFocus("Keyword Suggestion Tool", "", "ThunderRT6UserControlDC2" );This is were the mouse moves over the 'get keywords' button.
ControlSend("Keyword Suggestion Tool", "", "ThunderRT6UserControlDC2","{ENTER}")
sleep(20000)
MouseMove(40,234);This is where the cursor moves over the first checkbox for the first keyword.
MouseDown("left")
MouseUp("left")
;func dont_call()
MouseMove(37,251)
MouseDown("left")
MouseUp("left")
MouseMove(32,269)
MouseDown("left")
MouseUp("left")
MouseMove(36,289)
MouseDown("left")
MouseUp("left")
MouseMove(33,307)
MouseDown("left")
MouseUp("left")
MouseMove(35,326)
MouseDown("left")
MouseUp("left")
MouseMove(36,343)
MouseDown("left")
MouseUp("left")
MouseMove(35,359)
MouseDown("left")
MouseUp("left")
MouseMove(36,378)
MouseDown("left")
MouseUp("left")
MouseMove(33,394)
MouseDown("left")
MouseUp("left")
MouseMove(40,413)
MouseDown("left")
MouseUp("left")
MouseMove(35,432)
MouseDown("left")
MouseUp("left")
MouseMove(35,453)
MouseDown("left")
MouseUp("left")
MouseMove(39,468)
MouseDown("left")
MouseUp("left")
MouseMove(38,480)
MouseDown("left")
MouseUp("left")
Send("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}")
MouseMove(33,253)
MouseDown("left")
MouseUp("left")
MouseMove(34,273)
MouseDown("left")
MouseUp("left")
MouseMove(37,291)
MouseDown("left")
MouseUp("left")
MouseMove(35,305)
MouseDown("left")
MouseUp("left")
MouseMove(35,323)
MouseDown("left")
MouseUp("left")
;endfunc
sleep(5000)
ControlFocus("Keyword Suggestion Tool", "", "ThunderRT6UserControlDC6" );This is were the mouse moves over the add to master list button.
ControlSend("Keyword Suggestion Tool", "", "ThunderRT6UserControlDC6","{ENTER}")
;MouseMove(611,342)
;MouseDown("left")
;MouseUp("left")
;Opt("WinTextMatchMode", 1) ;1=complete, 2=quick
;Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
While 1

    If WinExists("HyperVRE", "20 Selected keywords")or WinExists("HyperVRE", "10 Selected keywords") Or WinExists("HyperVRE", "9 Selected keywords") Or WinExists("HyperVRE", "8 Selected keywords") Or WinExists("HyperVRE", "7 Selected keywords") Or WinExists("HyperVRE", "6 Selected keywords") Or WinExists("HyperVRE", "5 Selected keywords") Or WinExists("HyperVRE", "4 Selected keywords") Or WinExists("HyperVRE", "3 Selected keywords") Or WinExists("HyperVRE", "2 Selected keywords") Then
        script_2()
    EndIf

    If WinExists("HyperVRE", "0 Selected keywords") Or WinExists("HyperVRE", "1 Selected keywords") or WinExists("HyperVRE", "91 - Object variable ") or WinExists("HyperVRE","424 - Object require") Or WinExists("HyperVRE","92 - For loop not in")  Then
        script_1b()
    EndIf

    If WinExists("HyperVRE", "Run-time error") Then
        script_1c()
    EndIf
WEnd
 EndFunc
Func script_2();this is the script AutoIT follows if 2 to 10 keywords are selected.
    ;-----------------------------------------------------------------------------------------
    ;This is script 2
    ;Opt("WinWaitDelay",100)
    ;Opt("WinTitleMatchMode",4)
    ;Opt("WinDetectHiddenText",1)
    ;Opt("MouseCoordMode",0)
    ;WinWait("HyperVRE","10 Selected keywords")
    ;If Not WinActive("HyperVRE","10 Selected keywords") Then WinActivate("HyperVRE","10 Selected keywords")
    ;WinWaitActive("HyperVRE","10 Selected keywords")
    sleep(5000)
    ControlFocus("HyperVRE", "", "Button1");this is where the mouse over the Msgbox for 0 or 1 selected keywords.
    ControlSend("HyperVRE", "", "Button1","{ENTER}")
    sleep(4000)
    ControlFocus("Keyword Suggestion Tool", "", "ThunderRT6UserControlDC10" );This is were the mouse moves over the 'close' button.
    ControlSend("Keyword Suggestion Tool", "", "ThunderRT6UserControlDC10","{ENTER}")
    sleep(5000)
    ControlFocus("Step 1 - Keyword Selection", "", "ThunderRT6TextBox1" )
    ControlSend("Step 1 - Keyword Selection", "", "ThunderRT6TextBox1","")
    sleep(4000)
    MouseMove(471,167)
    MouseDown("left")
    MouseUp("left")
    Send("{SHIFTDOWN}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{LEFT}{SHIFTUP}{CTRLDOWN}v{CTRLUP}"); keyword is placed in box
    MouseMove(180,200)
    MouseDown("left")
    MouseUp("left")
    MouseMove(180,217)
    MouseDown("left")
    MouseUp("left")
    MouseMove(181,235)
    MouseDown("left")
    MouseUp("left")
    MouseMove(181, 255)
    MouseDown("left")
    MouseUp("left")
    MouseMove(177, 274)
    MouseDown("left")
    MouseUp("left")
    MouseMove(181, 293)
    MouseDown("left")
    MouseUp("left")
    MouseMove(179, 312)
    MouseDown("left")
    MouseUp("left")
    MouseMove(176, 324)
    MouseDown("left")
    MouseUp("left")
    MouseMove(182, 348)
    MouseDown("left")
    MouseUp("left")
    MouseMove(181, 365)
    MouseDown("left")
    MouseUp("left")
    MouseMove(180,380)
MouseDown("left")
MouseUp("left")
MouseMove(180,400)
MouseDown("left")
MouseUp("left")
MouseMove(180,413)
MouseDown("left")
MouseUp("left")
MouseMove(181,432)
MouseDown("left")
MouseUp("left")
MouseMove(181,450)
MouseDown("left")
MouseUp("left")
MouseMove(702,220)
MouseDown("left")
MouseMove(698,236)
MouseUp("left")
MouseMove(180,452)
MouseDown("left")
MouseUp("left")
MouseMove(707,291)
MouseDown("left")
MouseMove(708,390)
MouseUp("left")
MouseMove(178,396)
MouseDown("left")
MouseUp("left")
MouseMove(180,416)
MouseDown("left")
MouseUp("left")
MouseMove(180,433)
MouseDown("left")
MouseUp("left")
MouseMove(180,452)
MouseDown("left")
MouseUp("left")
;Right around here is where you need a function that searches for the exact files you want and selects it.
sleep(3000)
ControlFocus("Step 1 - Keyword Selection", "", "ThunderRT6UserControlDC13")
ControlSend("Step 1 - Keyword Selection", "","ThunderRT6UserControlDC13","{ENTER}")
sleep(3000)
ControlFocus("Step 2 - Select Templates", "", "ThunderRT6UserControlDC3")
ControlSend("Step 2 - Select Templates", "","ThunderRT6UserControlDC3","{ENTER}")
sleep(3000)
MouseMove(58,161)
sleep(4000)
MouseDown("left")
MouseUp("left")
MouseMove(56,242);this is were the mouse moves over the my documents button.
sleep(4000)
MouseDown("left")
MouseUp("left")
MouseMove(47,150)
sleep(4000)
MouseDown("left")
MouseUp("left")
MouseClick("left",138,163,2)
sleep(2000)
ControlFocus("Select a HTML file for Homepage Template", "", "ThunderRT6UserControlDC6")
ControlSend("Select a HTML file for Homepage Template", "","ThunderRT6UserControlDC6","{ENTER}")
MouseMove(49,210)
sleep(2000)
MouseDown("left")
MouseUp("left")
MouseMove(55,167)
MouseDown("left")
MouseUp("left")
MouseClick("left",127,183,2)
sleep(2000)
ControlFocus("Step 2 - Select Templates", "", "ThunderRT6UserControlDC6")
ControlSend("Step 2 - Select Templates", "","ThunderRT6UserControlDC6","{ENTER}");this is where the mouse over the 'next' button.
MouseMove(66,220)
MouseDown("left")
MouseUp("left")
MouseMove(57,167)
MouseDown("left")
MouseUp("left")
MouseClick("left",121,179,2)
sleep(2000)
ControlFocus("Step 2 - Select Templates", "", "ThunderRT6UserControlDC13")
ControlSend("Step 2 - Select Templates", "","ThunderRT6UserControlDC13","{ENTER}");this is where the mouse over the 'next' button.
    MouseMove(563, 226)
    MouseDown("left")
    MouseUp("left")
    MouseMove(687, 500)
    MouseDown("left")
    MouseUp("left")
    ;this is the script starting from Step 4 - Article Search & Download and search page where AutoIT
    ;presses the 'Get Articles' button, wait for the articles to download . Presses
    ; 'Unselect' button
    ;Opt("WinWaitDelay",100)
    ;Opt("WinTitleMatchMode",4)
    ;Opt("WinDetectHiddenText",1)
    ;Opt("MouseCoordMode",0)
    ;WinWait("Step 4 - Article Search & Download","")
    ;If Not WinActive("Step 4 - Article Search & Download","") Then WinActivate("Step 4 - Article Search & Download","")
    ;WinWaitActive("Step 4 - Article Search & Download","")
    sleep(5000)
    ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC11")
    ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC11","{ENTER}");this is where the cursor moves over the 'Get Articles'button.
    sleep(2000)
    ;MouseMove(460, 185);this is where the cursor moves over the 'Get Articles'button.;Linbe 1321
    ;MouseDown("left")
    ;MouseUp("left")
    Sleep(100000)
    ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC16")
    ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC16","{ENTER}");this is where the cursor moves over the 'Unselect All Articles'button.
    Sleep(2000)
    MouseDown("left")
    MouseUp("left")
    MouseMove(46, 264)
    MouseDown("left")
    MouseUp("left")
    MouseMove(45, 283)
    MouseDown("left")
    MouseUp("left")
    MouseMove(45, 302)
    MouseDown("left")
    MouseUp("left")
    MouseMove(45, 318)
    MouseDown("left")
    MouseUp("left")
    MouseMove(48, 338)
    MouseDown("left")
    MouseUp("left")
    MouseMove(46, 358)
    MouseDown("left")
    MouseUp("left")
    MouseMove(46, 374)
    MouseDown("left")
    MouseUp("left")
    MouseMove(44, 394)
    MouseDown("left")
    MouseUp("left")
    MouseMove(48, 411)
    MouseDown("left")
    MouseUp("left")
    MouseMove(49, 427)
    MouseDown("left")
    MouseUp("left")
    Send("{DOWN}{DOWN}{DOWN}{DOWN}")
    MouseMove(49,395)
    MouseDown("left")
    MouseUp("left")
    MouseMove(49,407)
    MouseDown("left")
    MouseUp("left")
    MouseMove(49,426)
    MouseDown("left")
    MouseUp("left")
    MouseMove(50,442)
    MouseDown("left")
    MouseUp("left")
    Send("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}")
    MouseMove(47,358)
    MouseDown("left")
    MouseUp("left")
    MouseMove(44,375)
    MouseDown("left")
    MouseMove(44,376)
    MouseUp("left")
    MouseMove(43,391)
    MouseDown("left")
    MouseUp("left")
    MouseMove(43,406)
    MouseDown("left")
    MouseUp("left")
    MouseMove(45,426)
    MouseDown("left")
    MouseUp("left")
    MouseMove(47,446)
    MouseDown("left")
    MouseUp("left")
    MouseMove(632,283)
    MouseDown("left")
    MouseUp("left")
    ;WinWait("HyperVRE","Your selected articl")
    ;If Not WinActive("HyperVRE","Your selected articl") Then WinActivate("HyperVRE","Your selected articl")
    ;WinWaitActive("HyperVRE","Your selected articl")
    ;MouseMove(193,98)
    ;MouseDown("left")
    ;MouseUp("left")
    ;WinWait("Step 4 - Article Search & Download","")
    ;If Not WinActive("Step 4 - Article Search & Download","") Then WinActivate("Step 4 - Article Search & Download","")
    ;WinWaitActive("Step 4 - Article Search & Download","")
    sleep(2000)
    ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC9")
    ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC9","{ENTER}");this is where the mouse moves over the"add selected articles button"
    sleep(2000)
    While 1

        If WinExists("HyperVRE", "No articles found fo") Or WinExists("HyperVRE", "Run-time error") Then
            script_1c();this funtion
        EndIf

        If WinExists("HyperVRE", "Your selected articles") Then
            step_4()
        EndIf
        Sleep(10); save CPU
    WEnd


EndFunc   ;==>script_2
;-----------------------------------------------------------------------------------------
;-----------------------------------------------------------------------------------------
Func script_1b();this is the script AutoIT follows if 0 or 1 keywords are selceted.
    ;Right here you need the script to close HyperVRE,grab the next $Firstline keyword.
    sleep(5000)
    ControlFocus("HyperVRE", "", "Button1");this is where the mouse over the Msgbox for 0 or 1 selected keywords.
    ControlSend("HyperVRE", "", "Button1","{ENTER}")
    sleep(4000)
    ControlFocus ("Keyword Suggestion Tool", "", "ThunderRT6UserControlDC10" );this is where the mouse over the 'close button'.
    ControlSend("Keyword Suggestion Tool", "", "ThunderRT6UserControlDC10","{ENTER}")
    sleep(4000)
    ;Opt("WinWaitDelay",100)
    ;Opt("WinTitleMatchMode",4)
    ;Opt("WinDetectHiddenText",1)
    ;Opt("MouseCoordMode",0)
;MouseMove(738,20)
;MouseDown("left")
;MouseUp("left")
 _Button3_Pressed_SUB($FirstLine)

;Right here I need the script to execute function Func _Button2_Pressed()
EndFunc   ;==>script_1b---------------------------------

Func save_as_back_on_track()
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Step 1 - Keyword Selection","")
If Not WinActive("Step 1 - Keyword Selection","") Then WinActivate("Step 1 - Keyword Selection","")
WinWaitActive("Step 1 - Keyword Selection","")
MouseMove(180,199)
MouseDown("left")
MouseUp("left")
MouseMove(179,219)
MouseDown("left")
MouseUp("left")
MouseMove(180,236)
MouseDown("left")
MouseUp("left")
MouseMove(182,257)
MouseDown("left")
MouseUp("left")
MouseMove(182,273)
MouseDown("left")
MouseUp("left")
MouseMove(182,290)
MouseDown("left")
MouseUp("left")
MouseMove(181,310)
MouseDown("left")
MouseUp("left")
MouseMove(182,327)
MouseDown("left")
MouseUp("left")
MouseMove(182,344)
MouseDown("left")
MouseUp("left")
MouseMove(182,363)
MouseDown("left")
MouseUp("left")
MouseMove(182,381)
MouseDown("left")
MouseUp("left")
MouseMove(183,401)
MouseDown("left")
MouseUp("left")
MouseMove(180,418)
MouseDown("left")
MouseUp("left")
MouseMove(180,436)
MouseDown("left")
MouseUp("left")
MouseMove(180,453)
MouseDown("left")
MouseUp("left")
Send("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}")
MouseMove(180,330)
MouseDown("left")
MouseUp("left")
MouseMove(180,343)
MouseDown("left")
MouseUp("left")
MouseMove(183,361)
MouseDown("left")
MouseUp("left")
MouseMove(181,383)
MouseDown("left")
MouseUp("left")
MouseMove(181,398)
MouseDown("left")
MouseUp("left")
;Right around here is where you need a function that searches for the exact files you want and selects it.
sleep(3000)
ControlFocus("Step 1 - Keyword Selection", "", "ThunderRT6UserControlDC13")
ControlSend("Step 1 - Keyword Selection", "","ThunderRT6UserControlDC13","{ENTER}")
sleep(3000)
ControlFocus("Step 2 - Select Templates", "", "ThunderRT6UserControlDC3")
ControlSend("Step 2 - Select Templates", "","ThunderRT6UserControlDC3","{ENTER}")
sleep(3000)
MouseMove(58,161)
sleep(4000)
MouseDown("left")
MouseUp("left")
MouseMove(56,242);this is were the mouse moves over the my documents button.
sleep(4000)
MouseDown("left")
MouseUp("left")
MouseMove(47,150)
sleep(4000)
MouseDown("left")
MouseUp("left")
MouseClick("left",138,163,2)
sleep(2000)
ControlFocus("Select a HTML file for Homepage Template", "", "ThunderRT6UserControlDC6")
ControlSend("Select a HTML file for Homepage Template", "","ThunderRT6UserControlDC6","{ENTER}")
MouseMove(49,210)
sleep(2000)
MouseDown("left")
MouseUp("left")
MouseMove(55,167)
MouseDown("left")
MouseUp("left")
MouseClick("left",127,183,2)
sleep(2000)
ControlFocus("Step 2 - Select Templates", "", "ThunderRT6UserControlDC6")
ControlSend("Step 2 - Select Templates", "","ThunderRT6UserControlDC6","{ENTER}");this is where the mouse over the 'next' button.
MouseMove(66,220)
MouseDown("left")
MouseUp("left")
MouseMove(57,167)
MouseDown("left")
MouseUp("left")
MouseClick("left",121,179,2)
sleep(2000)
ControlFocus("Step 2 - Select Templates", "", "ThunderRT6UserControlDC13")
ControlSend("Step 2 - Select Templates", "","ThunderRT6UserControlDC13","{ENTER}");this is where the mouse over the 'next' button.
    MouseMove(563, 226)
    MouseDown("left")
    MouseUp("left")
    MouseMove(687, 500)
    MouseDown("left")
    MouseUp("left")
    ;this is the script starting from Step 4 - Article Search & Download and search page where AutoIT
    ;presses the 'Get Articles' button, wait for the articles to download . Presses
    ; 'Unselect' button
    ;Opt("WinWaitDelay",100)
    ;Opt("WinTitleMatchMode",4)
    ;Opt("WinDetectHiddenText",1)
    ;Opt("MouseCoordMode",0)
    ;WinWait("Step 4 - Article Search & Download","")
    ;If Not WinActive("Step 4 - Article Search & Download","") Then WinActivate("Step 4 - Article Search & Download","")
    ;WinWaitActive("Step 4 - Article Search & Download","")
    sleep(5000)
    ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC11")
    ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC11","{ENTER}");this is where the cursor moves over the 'Get Articles'button.
    sleep(2000)
    ;MouseMove(460, 185);this is where the cursor moves over the 'Get Articles'button.;Linbe 1321
    ;MouseDown("left")
    ;MouseUp("left")
    Sleep(100000)
    ControlFocus("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC16")
    ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC16","{ENTER}");this is where the cursor moves over the 'Unselect All Articles'button.
    Sleep(2000)
    While 1

        If WinExists("HyperVRE", "No Articles selected") Or WinExists("HyperVRE", "No articles found fo")Then
            step_5();this funtion
        EndIf
        Sleep(10); save CPU
    WEnd

    sleep(5000)
    ControlFocus("HyperVRE", "", "Button1");this is where the mouse over the Msgbox for 0 or 1 selected keywords.
    ControlSend("HyperVRE", "", "Button1","{ENTER}")
    sleep(3000)
    MouseDown("left")
    MouseUp("left")
    MouseMove(46, 264)
    MouseDown("left")
    MouseUp("left")
    MouseMove(45, 283)
    MouseDown("left")
    MouseUp("left")
    MouseMove(45, 302)
    MouseDown("left")
    MouseUp("left")
    MouseMove(45, 318)
    MouseDown("left")
    MouseUp("left")
    MouseMove(48, 338)
    MouseDown("left")
    MouseUp("left")
    MouseMove(46, 358)
    MouseDown("left")
    MouseUp("left")
    MouseMove(46, 374)
    MouseDown("left")
    MouseUp("left")
    MouseMove(44, 394)
    MouseDown("left")
    MouseUp("left")
    MouseMove(48, 411)
    MouseDown("left")
    MouseUp("left")
    MouseMove(49, 427)
    MouseDown("left")
    MouseUp("left")
    Send("{DOWN}{DOWN}{DOWN}{DOWN}")
    MouseMove(49,395)
    MouseDown("left")
    MouseUp("left")
    MouseMove(49,407)
    MouseDown("left")
    MouseUp("left")
    MouseMove(49,426)
    MouseDown("left")
    MouseUp("left")
    MouseMove(50,442)
    MouseDown("left")
    MouseUp("left")
    Send("{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}")
    MouseMove(47,358)
    MouseDown("left")
    MouseUp("left")
    MouseMove(44,375)
    MouseDown("left")
    MouseMove(44,376)
    MouseUp("left")
    MouseMove(43,391)
    MouseDown("left")
    MouseUp("left")
    MouseMove(43,406)
    MouseDown("left")
    MouseUp("left")
    MouseMove(45,426)
    MouseDown("left")
    MouseUp("left")
    MouseMove(47,446)
    MouseDown("left")
    MouseUp("left")
    MouseMove(632,283)
    MouseDown("left")
    MouseUp("left")
    ;WinWait("HyperVRE","Your selected articl")
    ;If Not WinActive("HyperVRE","Your selected articl") Then WinActivate("HyperVRE","Your selected articl")
    ;WinWaitActive("HyperVRE","Your selected articl")
    ;MouseMove(193,98)
    ;MouseDown("left")
    ;MouseUp("left")
    ;WinWait("Step 4 - Article Search & Download","")
    ;If Not WinActive("Step 4 - Article Search & Download","") Then WinActivate("Step 4 - Article Search & Download","")
    ;WinWaitActive("Step 4 - Article Search & Download","")
    sleep(2000)
    ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC9")
    ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC9","{ENTER}");this is where the mouse moves over the"add selected articles button"
    sleep(2000)
    While 1

        If WinExists("HyperVRE", "No articles found fo") Or WinExists("HyperVRE", "Run-time error") Then
            script_1c();this funtion
        EndIf

        If WinExists("HyperVRE", "Your selected articles") Then
            step_4()
        EndIf
        Sleep(10); save CPU
    WEnd


EndFunc   ;==>script_2
Func step_5()
sleep(5000)
ControlFocus("HyperVRE", "", "Button1");this is where the mouse over the Msgbox for 0 or 1 selected keywords.
ControlSend("HyperVRE", "", "Button1","{ENTER}")
sleep(5000)
MouseMove(741,17)
MouseDown("left")
MouseUp("left")
sleep(5000)
MouseMove(160,102)
MouseDown("left")
MouseUp("left")
sleep(3000)
GUICtrlSetData($List2,StringTrimLeft(GUICtrlRead($List2),StringInStr(GUICtrlRead($List2),@CRLF)+1))
$ResultsOfRead = GUICtrlRead($List2)
$FirstLine = StringMid($ResultsOfRead,1,StringInStr($ResultsOfRead,@CRLF))
ClipPut($FirstLine)
sleep(3000)
_Button2_Pressed()
EndFunc
func save_as_()
    sleep(5000)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
MouseMove(27,131)
sleep(4000)
MouseDown("right")
MouseUp("right")
MouseMove(62,107)
sleep(4000)
MouseDown("left")
MouseUp("left")
sleep(4000)
Send($FirstLine)
Send("{TAB}")
sleep(3000)
Send("{TAB}")
sleep(3000)
Send("{TAB}")
sleep(3000)
Send("{TAB}")
sleep(6000)
Send("{ENTER}")
sleep(3000)
MouseMove(685,12);This closes the app.
MouseMove(685,12)
MouseMove(685,12)
MouseMove(685,12)
MouseDown("left")
MouseUp("left")
sleep(7000)
MouseMove(120,87);This is where the app asked to save the app settings.
MouseMove(120,87)
MouseMove(120,87)
MouseMove(120,87)
MouseDown("left")
MouseUp("left")
sleep(5000)
ControlFocus ("Step 1 - Keyword Selection", "", "ThunderRT6UserControlDC3" );this is where the mouse over the 'import text file'.
ControlSend("Step 1 - Keyword Selection", "", "ThunderRT6UserControlDC3","{ENTER}")
sleep(3000)
Send($FirstLine)
sleep(3000)
Send("{TAB}")
sleep(3000)
Send("{TAB}")
sleep(3000)
Send("{TAB}")
sleep(3000)
Send("{TAB}")
sleep(6000)
ControlFocus ("Step 1 - Keyword Selection", "", "ThunderRT6UserControlDC3" );this is where the mouse over the 'import text file'.
ControlSend("Step 1 - Keyword Selection", "", "ThunderRT6UserControlDC3","{ENTER}")
sleep(3000)
Send($FirstLine)
sleep(3000)
Send("{TAB}")
sleep(3000)
Send("{TAB}")
sleep(3000)
Send("{TAB}")
sleep(3000)
Send("{TAB}")
sleep(6000)
save_as_back_on_track()
EndFunc
Func close_box()
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
sleep(3000)
MouseMove(166,75)
sleep(3000)
MouseDown("left")
MouseUp("left")
sleep(3000)
MouseMove(638,225)
sleep(3000)
MouseDown("left")
MouseMove(504,227)
sleep(3000)
MouseUp("left")
Send("{BACKSPACE}")
sleep(3000)
save_as_()
EndFunc
Func script_1c();This is the script ran if  AutoIT gets a Run-time error.
    MouseMove(183, 105);this is where the mouse over the Msgbox.
    MouseDown("left")
    MouseUp("left")
    ;Opt("WinWaitDelay",100)
    ;Opt("WinTitleMatchMode",4)
    ;Opt("WinDetectHiddenText",1)
    ;Opt("MouseCoordMode",0)
    ;WinWait("Keyword Suggestion Tool","")
    ;If Not WinActive("Keyword Suggestion Tool","") Then WinActivate("Keyword Suggestion Tool","")
    ;WinWaitActive("Keyword Suggestion Tool","")
    MouseMove(741, 14)
    MouseDown("left")
    MouseUp("left")
    WinWait("Step 1 - Keyword Selection", "")
    If Not WinActive("Step 1 - Keyword Selection", "") Then WinActivate("Step 1 - Keyword Selection", "")
    WinWaitActive("Step 1 - Keyword Selection", "")
    While 1

    If WinExists("HyperVRE", "91 - Object variable ") or WinExists("HyperVRE","424 - Object require") Or WinExists("HyperVRE","92 - For loop not in")  Then
        script_1b()
    EndIf

    If WinExists("HyperVRE", "Run-time error") Then
        script_1c()
    EndIf

WEnd
    MouseDown("left")
    MouseUp("left")
    WinWait("Start Menu", "All &Programs")
    If Not WinActive("Start Menu", "All &Programs") Then WinActivate("Start Menu", "All &Programs")
    WinWaitActive("Start Menu", "All &Programs")
    MouseMove(39, 515)
    MouseDown("left")
    MouseUp("left")
    MouseMove(295, 206)
    MouseDown("left")
    MouseUp("left")
    WinWait("My Computer", "FolderView")
    If Not WinActive("My Computer", "FolderView") Then WinActivate("My Computer", "FolderView")
    WinWaitActive("My Computer", "FolderView")
    MouseMove(466, 270)
    MouseClick("left", 466, 269, 2)
    WinWait("Local Disk (D:)", "FolderView")
    If Not WinActive("Local Disk (D:)", "FolderView") Then WinActivate("Local Disk (D:)", "FolderView")
    WinWaitActive("Local Disk (D:)", "FolderView")
    MouseClick("left", 455, 212, 2)
    WinWait("Program Files", "FolderView")
    If Not WinActive("Program Files", "FolderView") Then WinActivate("Program Files", "FolderView")
    WinWaitActive("Program Files", "FolderView")
    MouseClick("left", 235, 366, 2)
    WinWait("HyperVRE", "FolderView")
    If Not WinActive("HyperVRE", "FolderView") Then WinActivate("HyperVRE", "FolderView")
    WinWaitActive("HyperVRE", "FolderView")
    MouseClick("left", 248, 205, 2)



EndFunc   ;==>script_1c

Func step_4();this is the funtion when the system goes to exporting articles .#endregion --- ScriptWriter generated code End ---
sleep(3000)
ControlFocus("HyperVRE", "", "Button1");this is where the mouse over the Msgbox for 0 or 1 selected keywords.
ControlSend("HyperVRE", "", "Button1","{ENTER}")
sleep(3000)
ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC2")
ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC2","{ENTER}");This is were the next button is pressed.
sleep(3000)
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
sleep(6000)
ControlFocus("Step 5 - Article & Keyword Matching", "", "ThunderRT6UserControlDC17")
ControlSend("Step 5 - Article & Keyword Matching", "","ThunderRT6UserControlDC17","{ENTER}");This is were the 'export articles 'button is pressed.
sleep(3000)
MouseMove(41,82)
MouseDown("left")
MouseUp("left")
MouseMove(69,234)
sleep(1000)
MouseDown("left")
MouseUp("left")
MouseMove(173,309);this is where the mouse moves over "Extracted Keywords Folder"
sleep(1000)
MouseDown("left")
MouseUp("left")
sleep(3000)
ControlFocus("Please provide information", "", "Edit1")
ControlSend("Please provide information", "","Edit1","");This is were the 'export articles 'button is pressed.
sleep(3000)
ControlFocus("Please provide information", "", "Button1")
ControlSend("Please provide information", "","Button1","{ENTER}");This is were the 'Ok'button is pressed.
sleep(3000)
ControlFocus("HyperVRE", "", "Button1")
ControlSend("HyperVRE", "","Button1","{ENTER}");This is were the 'Ok'button is pressed.
sleep(3000)
MouseMove(694,21);this is where the mouse moves over the HyperVRE minimize button
MouseDown("left")
MouseUp("left")
MouseClick("left",57,508,2)
sleep(5000)
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0001.txt")
$Title = _GetTitle()
sleep(3000)
MouseMove(292,17);This closes the doc.
MouseDown("left")
MouseUp("left")
sleep(7000)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseMove(32513,32586)
MouseDown("left")
MouseUp("left")
ControlFocus("Step 5 - Article & Keyword Matching", "", "ThunderRT6UserControlDC12")
ControlSend("Step 5 - Article & Keyword Matching", "","ThunderRT6UserControlDC12","{ENTER}");This is were the 'previous'button is pressed.
sleep(4000)
ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC1")
ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC1","{ENTER}");This is were the "previous" button is pressed.
sleep(4000)
ControlFocus("Step 3 - Webpage Content", "", "ThunderRT6UserControlDC9")
ControlSend("Step 3 - Webpage Content", "","ThunderRT6UserControlDC9","{ENTER}");this is where the cursor moves over the 'previous'button.
sleep(4000)
ControlFocus("Step 2 - Select Templates", "", "ThunderRT6UserControlDC2")
ControlSend("Step 2 - Select Templates", "","ThunderRT6UserControlDC2","{ENTER}");this is where the cursor moves over the 'previous'button.
sleep(4000)
MouseMove(326,163)
MouseDown("left")
MouseMove(164,166)
MouseUp("left")
Sleep(250)
Send(String($Title))
sleep(4000)
ControlFocus("Step 1 - Keyword Selection", "", "ThunderRT6UserControlDC13")
ControlSend("Step 1 - Keyword Selection", "","ThunderRT6UserControlDC13","{ENTER}");this is where the cursor moves over the 'next'button.
sleep(4000)
ControlFocus ("Step 2 - Select Templates", "", "ThunderRT6UserControlDC13" );this is where the mouse over the 'next'button.
ControlSend("Step 2 - Select Templates", "", "ThunderRT6UserControlDC13","{ENTER}")
sleep(2000)
ControlFocus("Step 3 - Webpage Content", "", "ThunderRT6UserControlDC10")
ControlSend("Step 3 - Webpage Content", "","ThunderRT6UserControlDC10","{ENTER}");this is where the cursor moves over the 'next'button.
sleep(4000)
ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC2")
ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC2","{ENTER}");this is where the cursor moves over the 'next''button.
sleep(4000)
;MouseMove(687,505)
;MouseDown("left")
;MouseUp("left")
;WinWait("Step 5 - Article & Keyword Matching","")
;If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
;WinWaitActive("Step 5 - Article & Keyword Matching","")
sleep(4000)
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0002.txt")
$Title = _GetTitle()
MouseMove(292,21)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",167,217,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0003.txt")
Sleep(2500)
$Title = _GetTitle()
MouseMove(296,20)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",157,231,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0004.txt")
Sleep(2500)
$Title = _GetTitle()
MouseMove(292,12)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",168,247,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0005.txt")
sleep(3000)
$Title = _GetTitle()
MouseMove(293,11)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseMove(629,24)
MouseDown("left")
MouseUp("left")
MouseClick("left",164,267,2)
Sleep(250)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0006.txt")
Sleep(2000)
$Title = _GetTitle()
MouseMove(270,499)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",165,286,2)
Send(String($Title))
sleep(2000)
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0007.txt")
$Title = _GetTitle()
MouseMove(299,506)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",167,300,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0008.txt")
$Title = _GetTitle()
MouseMove(292,498)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",198,317,2)
Send(String($Title))
sleep(3000)
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0009.txt")
$Title = _GetTitle()
MouseMove(292,498)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",168,345,2)
Send(String($Title))
ShellExecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0010.txt")
$Title = _GetTitle()
MouseMove(504,588)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",166,357,2)
Send(String($Title))
sleep(3000)
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0011.txt")
$Title = _GetTitle()
MouseMove(468,592)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",170,373,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0012.txt")
$Title = _GetTitle()
MouseMove(453,599)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",168,393,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0013.txt")
$Title = _GetTitle()
MouseMove(441,590)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",192,411,2)
Send(String($Title))
MouseMove(672,221);This is where cursor scrolls down.
MouseDown("left")
MouseMove(683,403)
MouseUp("left")
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0014.txt")
$Title = _GetTitle()
MouseMove(451,594)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",245,319,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0015.txt")
$Title = _GetTitle()
MouseMove(438,589)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",212,338,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0016.txt")
$Title = _GetTitle()
MouseMove(449,592)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",201,359,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0017.txt")
$Title = _GetTitle()
MouseMove(448,585)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",194,375,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0018.txt")
$Title = _GetTitle()
MouseMove(448,585)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",215,392,2)
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0019.txt")
$Title = _GetTitle()
MouseMove(448,585)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",197,410,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0020.txt")
$Title = _GetTitle()
MouseMove(448,585)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",178,430,2)
Send(String($Title))
sleep(3000)
ControlFocus("Step 5 - Article & Keyword Matching", "", "ThunderRT6UserControlDC13")
ControlSend("Step 5 - Article & Keyword Matching", "", "ThunderRT6UserControlDC13","{ENTER}")
sleep(3000)
ControlFocus("Step 6 - Other Customization", "", "ThunderRT6UserControlDC4")
ControlSend("Step 6 - Other Customization", "", "ThunderRT6UserControlDC4","{ENTER}")
sleep(3000)
ControlFocus("Step 7 - Pay-Per-Click Publishing", "", "ThunderRT6UserControlDC2")
ControlSend("Step 7 - Pay-Per-Click Publishing", "", "ThunderRT6UserControlDC2","{ENTER}")
sleep(3000)
ControlFocus("Step 8 - Affiliate Product Selection", "", "ThunderRT6UserControlDC2")
ControlSend("Step 8 - Affiliate Product Selection", "", "ThunderRT6UserControlDC2","{ENTER}")
sleep(3000)
ControlFocus("Step 9 - Contextual Ad Settings", "", "ThunderRT6UserControlDC9")
ControlSend("Step 9 - Contextual Ad Settings", "", "ThunderRT6UserControlDC9","{ENTER}")
sleep(5000)
ControlFocus("Step 10 - Generate Web Pages", "", "ThunderRT6UserControlDC5")
ControlSend("Step 10 - Generate Web Pages", "", "ThunderRT6UserControlDC5","{ENTER}")
sleep(4000)

#region --- ScriptWriter generated code Start ---
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Browse For Folder","Select Output folder")
If Not WinActive("Browse For Folder","Select Output folder") Then WinActivate("Browse For Folder","Select Output folder")
WinWaitActive("Browse For Folder","Select Output folder")
MouseMove(29,98)
sleep(4000)
MouseDown("left")
MouseUp("left")
Send("{DOWN}{DOWN}")
MouseMove(35,133)
sleep(4000)
MouseDown("left")
MouseUp("left")
sleep(4000)
MouseMove(54,168)
sleep(4000)
MouseDown("left")
MouseUp("left")
sleep(4000)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Browse For Folder","Select Output folder")
If Not WinActive("Browse For Folder","Select Output folder") Then WinActivate("Browse For Folder","Select Output folder")
WinWaitActive("Browse For Folder","Select Output folder")
MouseMove(89,133)
sleep(4000)
MouseDown("left")
MouseUp("left")
sleep(4000)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Browse For Folder","Select Output folder")
If Not WinActive("Browse For Folder","Select Output folder") Then WinActivate("Browse For Folder","Select Output folder")
WinWaitActive("Browse For Folder","Select Output folder")
Send("{TAB}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send($FirstLine)
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
ControlFocus("Step 10 - Generate Web Pages", "", "ThunderRT6OptionButton2")
ControlSend("Step 10 - Generate Web Pages", "", "ThunderRT6OptionButton2","{CHECK}")
sleep(4000)
ControlFocus("Step 10 - Generate Web Pages", "", "ThunderRT6UserControlDC4")
ControlSend("Step 10 - Generate Web Pages", "", "ThunderRT6UserControlDC4","{ENTER}")
sleep(4000)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
sleep(4000)
MouseMove(46,152)
sleep(4000)
MouseDown("left")
MouseUp("left")
Send("{DOWN}")
sleep(4000)
Send("{DOWN}")
sleep(4000)
Send("{DOWN}")
sleep(4000)
Send("{DOWN}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Select a Project File to save","Save as &type:")
If Not WinActive("Select a Project File to save","Save as &type:") Then WinActivate("Select a Project File to save","Save as &type:")
WinWaitActive("Select a Project File to save","Save as &type:")
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)

#region --- ScriptWriter generated code Start ---
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Select a Project File to save","Save as &type:")
If Not WinActive("Select a Project File to save","Save as &type:") Then WinActivate("Select a Project File to save","Save as &type:")
WinWaitActive("Select a Project File to save","Save as &type:")
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{DOWN}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send($FirstLine)
sleep(4000)
Send("{ENTER}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{ENTER}")
sleep(4000)
sleep(4000)
Send("{TAB}")
sleep(4000)
Send($FirstLine)
sleep(4000)
Send("{TAB}")
sleep(4000)
Send("{ENTER}")



EndFunc





Func back_on_track();This is the function to go into after script_1b.(The continuation of Script_1b) After the AutoIT recognizes that HyperVRE only pulled in 0 to 1 keywords,
    ;it goes into your files and manually imports the keyword file and ending off on Step 3-Webpage Content page with pressing the 'next' button.
    ;This script was copied from from script_2. You tried to merge
    ;this is the script starting from Step 4 - Article Search & Download and search page where AutoIT
    ;presses the 'Get Articles' button, wait for the articles to download . Presses

ControlFocus("Step 3 - Webpage Content", "", "ThunderRT6OptionButton2")
ControlSend("Step 3 - Webpage Content", "","ThunderRT6OptionButton2","{ENTER}");this is where the cursor goes over the 'discard keywords'radio button.  4- Article Search and Download page.
sleep(5000)
ControlFocus("Step 3 - Webpage Content", "", "ThunderRT6UserControlDC10")
ControlSend("Step 3 - Webpage Content", "","ThunderRT6UserControlDC10","{ENTER}");this is where the cursor moves over the 'next'button. But the function ends on step 4- Article Search and Download page.
sleep(2000)
ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC11")
ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC11","{ENTER}");this is where the cursor moves over the 'Get Articles'button.
Sleep(100000)
ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC16")
ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC16","{ENTER}");this is where the cursor moves over the'Unselect all'button.
MouseMove(49,262)
Sleep(2000)
MouseDown("left")
MouseUp("left")
MouseMove(47,279)
Sleep(2000)
MouseDown("left")
MouseUp("left")
MouseMove(47,303)
Sleep(2000)
MouseDown("left")
MouseUp("left")
MouseMove(47,319)
Sleep(2000)
MouseDown("left")
MouseUp("left")
MouseMove(47,342)
MouseDown("left")
MouseUp("left")
MouseMove(47,355)
MouseDown("left")
MouseUp("left")
MouseMove(47,371)
MouseDown("left")
MouseUp("left")
MouseMove(46,392)
MouseDown("left")
MouseUp("left")
MouseMove(47,415)
MouseDown("left")
MouseUp("left")
MouseMove(49,426)
MouseDown("left")
MouseUp("left")
MouseMove(567,283)
MouseDown("left")
MouseMove(550,394)
MouseUp("left")
MouseMove(564,440)
MouseDown("left")
MouseUp("left")
MouseMove(47,282)
MouseDown("left")
MouseUp("left")
MouseMove(47,300)
MouseDown("left")
MouseUp("left")
MouseMove(50,318)
MouseDown("left")
MouseUp("left")
MouseMove(50,341)
MouseDown("left")
MouseUp("left")
MouseMove(50,360)
MouseDown("left")
MouseUp("left")
MouseMove(50,378)
MouseDown("left")
MouseUp("left")
MouseMove(48,391)
MouseDown("left")
MouseUp("left")
MouseMove(48,409)
MouseDown("left")
MouseUp("left")
MouseMove(47,425)
MouseDown("left")
MouseMove(48,442)
MouseUp("left")
MouseMove(47,442)
MouseDown("left")
MouseUp("left")
MouseMove(640,281)
MouseDown("left")
MouseUp("left")
sleep(3000)
ControlFocus("HyperVRE", "", "Button1");this is where the mouse over the Msgbox that says your selected articles have been added.
ControlSend("HyperVRE", "", "Button1","{ENTER}")
sleep(3000)
ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC2")
ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC2","{ENTER}");This is were the next button is pressed.
sleep(3000)
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
sleep(6000)
ControlFocus("Step 5 - Article & Keyword Matching", "", "ThunderRT6UserControlDC17")
ControlSend("Step 5 - Article & Keyword Matching", "","ThunderRT6UserControlDC17","{ENTER}");This is were the 'export articles 'button is pressed.
sleep(3000)
MouseMove(41,82)
MouseDown("left")
MouseUp("left")
MouseMove(69,234)
sleep(1000)
MouseDown("left")
MouseUp("left")
MouseMove(173,309);this is where the mouse moves over "Extracted Keywords Folder"
sleep(1000)
MouseDown("left")
MouseUp("left")
sleep(3000)
ControlFocus("Please provide information", "", "Edit1")
ControlSend("Please provide information", "","Edit1","");This is were the 'export articles 'button is pressed.
sleep(3000)
ControlFocus("Please provide information", "", "Button1")
ControlSend("Please provide information", "","Button1","{ENTER}");This is were the 'Ok'button is pressed.
sleep(3000)
ControlFocus("HyperVRE", "", "Button1")
ControlSend("HyperVRE", "","Button1","{ENTER}");This is were the 'Ok'button is pressed.
sleep(3000)
MouseMove(694,21);this is where the mouse moves over the HyperVRE minimize button
MouseDown("left")
MouseUp("left")
MouseClick("left",57,508,2)
sleep(5000)
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0001.txt")
$Title = _GetTitle()
sleep(3000)
MouseMove(292,17);This closes the doc.
MouseDown("left")
MouseUp("left")
sleep(7000)
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseMove(32513,32586)
MouseDown("left")
MouseUp("left")
ControlFocus("Step 5 - Article & Keyword Matching", "", "ThunderRT6UserControlDC12")
ControlSend("Step 5 - Article & Keyword Matching", "","ThunderRT6UserControlDC12","{ENTER}");This is were the 'previous'button is pressed.
sleep(4000)
ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC1")
ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC1","{ENTER}");This is were the "previous" button is pressed.
sleep(4000)
ControlFocus("Step 3 - Webpage Content", "", "ThunderRT6UserControlDC9")
ControlSend("Step 3 - Webpage Content", "","ThunderRT6UserControlDC9","{ENTER}");this is where the cursor moves over the 'previous'button.
sleep(4000)
ControlFocus("Step 2 - Select Templates", "", "ThunderRT6UserControlDC2")
ControlSend("Step 2 - Select Templates", "","ThunderRT6UserControlDC2","{ENTER}");this is where the cursor moves over the 'previous'button.
sleep(4000)
MouseMove(326,163)
MouseDown("left")
MouseMove(164,166)
MouseUp("left")
Sleep(250)
Send(String($Title))
sleep(4000)
ControlFocus("Step 1 - Keyword Selection", "", "ThunderRT6UserControlDC13")
ControlSend("Step 1 - Keyword Selection", "","ThunderRT6UserControlDC13","{ENTER}");this is where the cursor moves over the 'next'button.
sleep(4000)
ControlFocus ("Step 2 - Select Templates", "", "ThunderRT6UserControlDC13" );this is where the mouse over the 'next'button.
ControlSend("Step 2 - Select Templates", "", "ThunderRT6UserControlDC13","{ENTER}")
sleep(2000)
ControlFocus("Step 3 - Webpage Content", "", "ThunderRT6UserControlDC10")
ControlSend("Step 3 - Webpage Content", "","ThunderRT6UserControlDC10","{ENTER}");this is where the cursor moves over the 'next'button.
sleep(4000)
ControlFocus("Step 4 - Article Search & Download", "", "ThunderRT6UserControlDC2")
ControlSend("Step 4 - Article Search & Download", "","ThunderRT6UserControlDC2","{ENTER}");this is where the cursor moves over the 'next''button.
sleep(4000)
;MouseMove(687,505)
;MouseDown("left")
;MouseUp("left")
;WinWait("Step 5 - Article & Keyword Matching","")
;If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
;WinWaitActive("Step 5 - Article & Keyword Matching","")
sleep(4000)
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0002.txt")
$Title = _GetTitle()
MouseMove(292,21)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",167,217,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0003.txt")
Sleep(2500)
$Title = _GetTitle()
MouseMove(296,20)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",157,231,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0004.txt")
Sleep(2500)
$Title = _GetTitle()
MouseMove(292,12)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",168,247,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0005.txt")
sleep(3000)
$Title = _GetTitle()
MouseMove(293,11)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseMove(629,24)
MouseDown("left")
MouseUp("left")
MouseClick("left",164,267,2)
Sleep(250)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0006.txt")
Sleep(2000)
$Title = _GetTitle()
MouseMove(270,499)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",165,286,2)
Send(String($Title))
sleep(2000)
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0007.txt")
$Title = _GetTitle()
MouseMove(299,506)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",167,300,2)
Send(String($Title))
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0008.txt")
$Title = _GetTitle()
MouseMove(292,498)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",198,317,2)
Send(String($Title))
sleep(3000)
shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Extracted Keywords\0009.txt")
$Title = _GetTitle()
MouseMove(292,498)
MouseDown("left")
MouseUp("left")
WinWait("Step 5 - Article & Keyword Matching","")
If Not WinActive("Step 5 - Article & Keyword Matching","") Then WinActivate("Step 5 - Article & Keyword Matching","")
WinWaitActive("Step 5 - Article & Keyword Matching","")
MouseClick("left",168,345,2)
Send(String($Title))
EndFunc




Func _SendTitle($Title)
    Sleep(250)
    ControlSend("Notepad",'','', String($Title))
    ControlSend('[Class:Notepad]', '', 'Edit1', $Title)
    Sleep(250)
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

Func _Get_Title($File)
    $text = FileRead($File)

    $posStart = StringInStr($text,'<GROUPLINKS>')
    $posEnd   = StringInStr($text,'</GROUPLINKS>')

    If $posStart = 0 or $posEnd = 0 Then
        MsgBox(0,'ERROR','This File doesnt Contain content')
        $result = '' ; This File doesnt Contain a Title
    Else
        $result = StringMid($text,$posStart+7,$posEnd-($posStart+7))
    EndIf
    $result= StringLower($result)
    Return $result
EndFunc

Func _GetTitle($File)
    $text = FileRead($File)

    $posStart = StringInStr($text,'<title>')
    $posEnd   = StringInStr($text,'</title>')

    If $posStart = 0 or $posEnd = 0 Then
        MsgBox(0,'ERROR','This File doesnt Contain a Title')
        $result = '' ; This File doesnt Contain a Title
    Else
        $result = StringMid($text,$posStart+7,$posEnd-($posStart+7))
    EndIf
    $result= StringLower($result)
    Return $result
EndFunc
Edited by SmOke_N
Added AutoIt Code Tags

Share this post


Link to post
Share on other sites



you should upload it in au3 format instead of posting all those lines.. No one is going to want to scroll down to the bottom of the page.

You're problem should be an easy fix

You have alot of lines that say $Title = _GetTitle()

but your _GetTitle() is expecting a filename paremeter. It needs to know where to look.

I see some of them are done correctly such as this one

$Title = _GetTitle($sKeywordsDir&$file)

That is the correct way but there are plenty of

$Title = _GetTitle()

entries that are wrong

Share this post


Link to post
Share on other sites
  • DONT CREATE MULTIPLE THREADS WITH THE SAME QUESTION!
  • Use AutoIt TAGS. We don't want that crap you posted.
  • Read the fucking error. It tells you exactly what is wrong and where.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0