Sign in to follow this  
Followers 0
styles3000

Problem With Script

4 posts in this topic

Could someone look at my script and fill me in on what the problem is? I keep geting errors.

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",0)
;Right here, the script needs to select(copy) the 1st keyword from the edit box then send it
sleep(6000)
MouseMove(424,474);This is where orps.com control panel is selected.
MouseMove(424,474)
MouseMove(424,474)
MouseDown("left")
MouseUp("left")
sleep(5000)
MouseMove(786,253)
MouseDown("left")
MouseMove(783,328)
MouseUp("left")
sleep(5000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{ENTER}")
sleep(5000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(2000)
sleep(5000)
Send("^{v}");This is where you need to paste the keyword.
sleep(2000)
Send("{TAB}","{ENTER}");This is where the "create button is pressed.
sleep(2000)
Send("{ENTER}")
sleep(5000)
MouseMove(22,80)
MouseMove(22,80)
MouseMove(22,80)
MouseDown("left")
MouseUp("left")
MouseMove(49,212)
MouseMove(49,212)
MouseMove(49,212)
MouseDown("left")
MouseUp("left")
sleep(3000)
Send("^{v}");This is where the keyword is placed in the save box.
MouseMove(433,398)
MouseDown("left")
MouseUp("left")
MouseMove(384,453)
MouseMove(384,453)
MouseMove(384,453)
MouseDown("left")
MouseUp("left")
MouseMove(499,366)
MouseMove(499,366)
MouseMove(499,366)
MouseDown("left")
MouseUp("left")
MouseMove(134,102);This document already exists.....
MouseMove(134,102)
MouseMove(134,102)
MouseDown("left")
MouseUp("left")
sleep(12000)
Send("{CTRLDOWN}t{CTRLUP}")
sleep(10000)
Send("www.adsense.com{ENTER}")
sleep(15000)
_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")
MouseClick("left",137,426,2);This is where "AdSense for Content "is clicked.
sleep(5000)
ControlFocus("Security Warning", "", "Button1")
ControlSend("Security Warning", "", "Button1","{ENTER}")
sleep(5000)
Send("{TAB}");1
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");5
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");10
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");15
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");21
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");This is where the "Continue" button is clicked.
sleep(200)
Send("{ENTER}")
sleep(5000)
Send("{TAB}");1
sleep(2000)
Send("{TAB}")
sleep(2000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");5
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");10
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");15
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");20
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(2000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");15
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");20
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(2000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
Send("{TAB}");1
sleep(2000)
Send("{TAB}")
sleep(2000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");5
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");10
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");15
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(399)
Send("{ENTER}");This is where the "Continue" button is clicked.
sleep(10000)
MouseMove(223,239)
MouseDown("left")
MouseUp("left")
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("add{SPACE}new")
sleep(4000)
MouseMove(16,189);this closes the find box
sleep(4000)
MouseDown("left")
MouseUp("left")
sleep(5000)
Send("{ENTER}");This is where 'add new channel is pressed'
sleep(4000)
MouseDown("left")
MouseUp("left")
sleep(5000)
Send("^{v}")
sleep(3000)
MouseMove(61,184)
MouseDown("right")
MouseUp("right")
Send("{DOWN}{DOWN}{UP}{UP}{UP}{DOWN}{UP}{ENTER}")
sleep(3000)
MouseMove(223,239)
MouseDown("left")
MouseUp("left")
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("add{SPACE}new")
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
sleep(5000)
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")
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
sleep(5000)
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
sleep(400)
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
sleep(400)
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}")
sleep(4000)

;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)
#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:\Documents and Settings\Taevon Jones\Desktop\HOME-MASTER-PHP.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")
Sleep(5000)
ShellExecute("D:\Documents and Settings\Taevon Jones\Desktop\HOME-MASTER-PHP.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",0)
Sleep(5000)
MouseMove(295,8)
sleep(3000)
MouseDown("left")
MouseUp("left")
Sleep(5000)
MouseMove(102,121)
sleep(3000)
MouseDown("left")
MouseUp("left")
Sleep(5000)
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")
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:\Documents and Settings\Taevon Jones\Desktop\PAGE-MASTER-PHP.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:\Documents and Settings\Taevon Jones\Desktop\PAGE-MASTER-PHP.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",0)
Sleep(5000)
MouseMove(295,8)
MouseDown("left")
MouseUp("left")
Sleep(5000)
MouseMove(102,121)
MouseDown("left")
MouseUp("left")
Sleep(5000)
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")

sleep(5000)
Send("{CTRLDOWN}t{CTRLUP}")
WinWait("New Tab - Windows Internet Explorer","Address Combo Contro")
If Not WinActive("New Tab - Windows Internet Explorer","Address Combo Contro") Then WinActivate("New Tab - Windows Internet Explorer","Address Combo Contro")
WinWaitActive("New Tab - Windows Internet Explorer","Address Combo Contro")
Send("www.google.com/webmasters/tools/")
sleep(4000)
Send("{ENTER}")
sleep(4000)
WinWait("Webmaster Tools - Home - Windows Internet Explorer","Address Combo Contro")
If Not WinActive("Webmaster Tools - Home - Windows Internet Explorer","Address Combo Contro") Then WinActivate("Webmaster Tools - Home - Windows Internet Explorer","Address Combo Contro")
WinWaitActive("Webmaster Tools - Home - Windows Internet Explorer","Address Combo Contro")
sleep(4000)
Send("{LEFT}")
sleep(4000)
Send("{RIGHT}")
sleep(4000)
Send("{TAB}")
sleep(800)
Send("{TAB}")
sleep(800)
Send("{TAB}")
sleep(800)
Send("{TAB}")
sleep(1000)
Send("{TAB}")
sleep(1000)
Send("{TAB}")
sleep(1000)
Send("{TAB}")
sleep(1000)
Send("{TAB}")
sleep(1000)
Send("{TAB}");this is where it moves over the Webmasters Tools Tab
sleep(1000)
Send("{LEFT}")
sleep(1000)
Send("{LEFT}")
sleep(1000)
Send("{ENTER}")
sleep(3000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("^{v}");this is where the $FirstLine will go.
sleep(4000)
Send(".orps.host22.com")
sleep(4000)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
sleep(4000)
Send("{CTRLDOWN}c{CTRLUP}")
sleep(3000)


Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("000webhost.com Members Area - Windows Internet Explorer","Address Combo Contro")
If Not WinActive("000webhost.com Members Area - Windows Internet Explorer","Address Combo Contro") Then WinActivate("000webhost.com Members Area - Windows Internet Explorer","Address Combo Contro")
WinWaitActive("000webhost.com Members Area - Windows Internet Explorer","Address Combo Contro")
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{RIGHT}")
sleep(400)
Send("{RIGHT}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{RIGHT}")
sleep(400)
Send("{RIGHT}")
sleep(400)
Send("{ENTER}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{ENTER}")
sleep(400)
Send("www.")
sleep(400)
Send("^{v}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{ENTER}")
sleep(3000)
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)

;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
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")

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

Share this post


Link to post
Share on other sites



TLDNR

:D

Seriously, you need to trim that down to a SHORT script that reproduces just the problem (which you didn't describe at all).

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

It's useful to include any given errors:

C:\Program Files\AutoIt3\Include\file.au3(44,1) : ERROR: syntax error
Func
^
C:\Documents and Settings\user\My Documents\script\test.au3(135,33) : ERROR: _findChecksum(): undefined function.
_findChecksum('255','3760163120')
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\user\My Documents\script\test.au3 - 2 error(s), 0 warning(s)
!>17:41:43 AU3Check ended.rc:2

Here it's telling us there's a problem on lines 44 in the file.au3 script and line 135 in the main script... If you double click the errors in the Scite output pane it will jump to that line in the code.

The reason for the error in file.au3 is because in the main script at the top you start a function "_button2_pressed()" but never define the end of it with an EndFunc, so AutoIT freaks out when it starts including <file.au3> on line 495 of the main script and hits another "Func" declaration before the previous one was closed. I think this function is supposed to end just before the _findChecksum() declaration, but _button2_pressed() is never called anywhere in the script.

For this reason I normally put the includes at the very top of the file, along with Variable declarations, and Opt() settings. Speaking of opt I keep seeing:

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

Throughout the program. Unless these need to be changed mid program, set them once at the start.

I then normally put my main program code, then at the end define any Functions that aren't in Include files. You have some Function declarations in the middle of your main program code!

Also rather than sending blind Send(), you'd probably be better off trying to use the _IE.au3 library. This script isn't at all robust against anything. As it is now it's a disgusting mess.

And I have no idea what you're trying to do in Notepad, but it could probably be done better with Control....() commands rather than mousemoves. As well there's some "{altdown}a{altup}" that could be better automated as "!a", or preferably using WinMenuSelectItem()

Here's some of your code cleaned up... _button2_pressed() still needs to be called from somewhere, and I just did syntex testing, I can't run it since it won't work.

#include <file.au3>
Global $hFile
Global $SomeTxt
Global $StartPos, $EndPos
Global $Find_This, $Find_This_Too
Global $MyResult
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)

Func _Button2_Pressed()
;remember, you have to be logged into webhost
;and into the subdomain creation section in order for this script to activate.
;Right here, the script needs to select(copy) the 1st keyword from the edit box then send it
sleep(6000)
MouseMove(424,474);This is where orps.com control panel is selected.
MouseMove(424,474)
MouseMove(424,474)
MouseDown("left")
MouseUp("left")
sleep(5000)
MouseMove(786,253)
MouseDown("left")
MouseMove(783,328)
MouseUp("left")
sleep(5000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{ENTER}")
sleep(5000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(2000)
sleep(5000)
Send("^{v}");This is where you need to paste the keyword.
sleep(2000)
Send("{TAB}","{ENTER}");This is where the "create button is pressed.
sleep(2000)
Send("{ENTER}")
sleep(5000)
MouseMove(22,80)
MouseMove(22,80)
MouseMove(22,80)
MouseDown("left")
MouseUp("left")
MouseMove(49,212)
MouseMove(49,212)
MouseMove(49,212)
MouseDown("left")
MouseUp("left")
sleep(3000)
Send("^{v}");This is where the keyword is placed in the save box.
MouseMove(433,398)
MouseDown("left")
MouseUp("left")
MouseMove(384,453)
MouseMove(384,453)
MouseMove(384,453)
MouseDown("left")
MouseUp("left")
MouseMove(499,366)
MouseMove(499,366)
MouseMove(499,366)
MouseDown("left")
MouseUp("left")
MouseMove(134,102);This document already exists.....
MouseMove(134,102)
MouseMove(134,102)
MouseDown("left")
MouseUp("left")
sleep(12000)
Send("{CTRLDOWN}t{CTRLUP}")
sleep(10000)
Send("www.adsense.com{ENTER}")
sleep(15000)
_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")
MouseClick("left",137,426,2);This is where "AdSense for Content "is clicked.
sleep(5000)
ControlFocus("Security Warning", "", "Button1")
ControlSend("Security Warning", "", "Button1","{ENTER}")
sleep(5000)
Send("{TAB}");1
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");5
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");10
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");15
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");21
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");This is where the "Continue" button is clicked.
sleep(200)
Send("{ENTER}")
sleep(5000)
Send("{TAB}");1
sleep(2000)
Send("{TAB}")
sleep(2000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");5
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");10
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");15
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");20
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(2000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");15
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");20
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(2000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
Send("{TAB}");1
sleep(2000)
Send("{TAB}")
sleep(2000)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");5
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");10
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}");15
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(200)
Send("{TAB}")
sleep(399)
Send("{ENTER}");This is where the "Continue" button is clicked.
sleep(10000)
MouseMove(223,239)
MouseDown("left")
MouseUp("left")
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("add{SPACE}new")
sleep(4000)
MouseMove(16,189);this closes the find box
sleep(4000)
MouseDown("left")
MouseUp("left")
sleep(5000)
Send("{ENTER}");This is where 'add new channel is pressed'
sleep(4000)
MouseDown("left")
MouseUp("left")
sleep(5000)
Send("^{v}")
sleep(3000)
MouseMove(61,184)
MouseDown("right")
MouseUp("right")
Send("{DOWN}{DOWN}{UP}{UP}{UP}{DOWN}{UP}{ENTER}")
sleep(3000)
MouseMove(223,239)
MouseDown("left")
MouseUp("left")
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("add{SPACE}new")
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
sleep(5000)
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")
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
sleep(5000)
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
sleep(400)
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
sleep(400)
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
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)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
Send("{SHIFTDOWN}{TAB}{SHIFTUP}")
sleep(4000)
Send("{CTRLDOWN}a{CTRLUP}{CTRLDOWN}c{CTRLUP}")
sleep(4000)

;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)


$Find_This = "<googlecode>"
$Find_This_Too = "</googlecode>"
$hFile = FileOpen("D:\Documents and Settings\Taevon Jones\Desktop\HOME-MASTER-PHP.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


;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")
Sleep(5000)
ShellExecute("D:\Documents and Settings\Taevon Jones\Desktop\HOME-MASTER-PHP.htm ")
Sleep(5000)
Send("{ALTDOWN}{ALTUP}e")
Sleep(500)
Send("a")
Sleep(500)
Send("{CTRLDOWN}v{CTRLUP}")
Sleep(5000)

Sleep(5000)
MouseMove(295,8)
sleep(3000)
MouseDown("left")
MouseUp("left")
Sleep(5000)
MouseMove(102,121)
sleep(3000)
MouseDown("left")
MouseUp("left")
Sleep(5000)

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")
Send("{CTRLDOWN}c{CTRLUP}")
sleep(3000)
MouseMove(732,18)
sleep(3000)
MouseDown("left")
MouseUp("left")

sleep(7000)


$Find_This = "<googlecode>"
$Find_This_Too = "</googlecode>"
$hFile = FileOpen("D:\Documents and Settings\Taevon Jones\Desktop\PAGE-MASTER-PHP.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:\Documents and Settings\Taevon Jones\Desktop\PAGE-MASTER-PHP.htm ")
Sleep(5000)
Send("{ALTDOWN}{ALTUP}e")
Sleep(500)
Send("a")
Sleep(500)
Send("{CTRLDOWN}v{CTRLUP}")
Sleep(5000)

Sleep(5000)
MouseMove(295,8)
MouseDown("left")
MouseUp("left")
Sleep(5000)
MouseMove(102,121)
MouseDown("left")
MouseUp("left")
Sleep(5000)

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(5000)
Send("{CTRLDOWN}t{CTRLUP}")
WinWait("New Tab - Windows Internet Explorer","Address Combo Contro")
If Not WinActive("New Tab - Windows Internet Explorer","Address Combo Contro") Then WinActivate("New Tab - Windows Internet Explorer","Address Combo Contro")
WinWaitActive("New Tab - Windows Internet Explorer","Address Combo Contro")
Send("www.google.com/webmasters/tools/")
sleep(4000)
Send("{ENTER}")
sleep(4000)
WinWait("Webmaster Tools - Home - Windows Internet Explorer","Address Combo Contro")
If Not WinActive("Webmaster Tools - Home - Windows Internet Explorer","Address Combo Contro") Then WinActivate("Webmaster Tools - Home - Windows Internet Explorer","Address Combo Contro")
WinWaitActive("Webmaster Tools - Home - Windows Internet Explorer","Address Combo Contro")
sleep(4000)
Send("{LEFT}")
sleep(4000)
Send("{RIGHT}")
sleep(4000)
Send("{TAB}")
sleep(800)
Send("{TAB}")
sleep(800)
Send("{TAB}")
sleep(800)
Send("{TAB}")
sleep(1000)
Send("{TAB}")
sleep(1000)
Send("{TAB}")
sleep(1000)
Send("{TAB}")
sleep(1000)
Send("{TAB}")
sleep(1000)
Send("{TAB}");this is where it moves over the Webmasters Tools Tab
sleep(1000)
Send("{LEFT}")
sleep(1000)
Send("{LEFT}")
sleep(1000)
Send("{ENTER}")
sleep(3000)
Send("{ALTDOWN}{ALTUP}e{SPACE}")
sleep(4000)
Send("f")
sleep(4000)
Send("^{v}");this is where the $FirstLine will go.
sleep(4000)
Send(".orps.host22.com")
sleep(4000)
MouseMove(16,189);this closes the find box
MouseDown("left")
MouseUp("left")
sleep(4000)
Send("{CTRLDOWN}c{CTRLUP}")
sleep(3000)

WinWait("000webhost.com Members Area - Windows Internet Explorer","Address Combo Contro")
If Not WinActive("000webhost.com Members Area - Windows Internet Explorer","Address Combo Contro") Then WinActivate("000webhost.com Members Area - Windows Internet Explorer","Address Combo Contro")
WinWaitActive("000webhost.com Members Area - Windows Internet Explorer","Address Combo Contro")
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{RIGHT}")
sleep(400)
Send("{RIGHT}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{RIGHT}")
sleep(400)
Send("{RIGHT}")
sleep(400)
Send("{ENTER}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{ENTER}")
sleep(400)
Send("www.")
sleep(400)
Send("^{v}")
sleep(400)
Send("{TAB}")
sleep(400)
Send("{ENTER}")
sleep(3000)
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)

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)

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

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
;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

Share this post


Link to post
Share on other sites

Thanks fellas

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0