Home » Automation

Crown Minerals Technical Data Autodownloader

22 December 2007 No Comment

;Have a tab active
;have the Well reports folder open
;add Well reports to default firefox download location
dim $x
dim $openinpdf
dim $i
$x=InputBox(”DE”,”Enter Number of DL’s”,10)
WinClose(”https://data.crownminerals.govt.nz - Access Document - Mozilla Firefox”)
;
;$x = InputBox ( “DE File Downloader”, “Enter Number of Documents on Page” , “10″ )
;$openinpdf = 0

;put crown minerals into foreground
WinWait( “Crown Minerals Technical Data” )
WinActivate ( “Crown Minerals Technical Data” )
WinSetState(”Crown Minerals Technical Data”, “”, @SW_MAXIMIZE)
Sleep(1000)

MouseClick ( “left” , 1270,300, 2) ;click scroller
MouseClick ( “left” , 260, 390 , 1)    ;’click in middle of page

;’send 11 tabs
;’send enter
Send(”{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}”)
Sleep(3000)
;002

for $i = 1 to $x
Sleep(1000)
Send(”{TAB}”)
sleep(400)
Send(”{TAB}”)
sleep(400)

Send(”{ENTER}”)
Sleep(3000)

;’;change page;
WinWait(”https://data.crownminerals.govt.nz - Access Document - Mozilla Firefox”)
Sleep(1000)
WinSetState(”https://data.crownminerals.govt.nz - Access Document - Mozilla Firefox”, “”, @SW_MAXIMIZE)
Sleep(1000)

;’click download
MouseClick ( “left” , 50,360,1)
Sleep(1000)
;wait for download box
WinWait(”Opening “)
Sleep(1000)
;’accept download
MouseClick ( “left” , 700,555,1)
Sleep(1000)
;close window
WinClose(”https://data.crownminerals.govt.nz - Access Document - Mozilla Firefox”)

sleep(5000)
WinActivate ( “Crown Minerals Technical Data” )
sleep(3000)
Next

msgbox(0,”DE”,”Done: ” & $x)

Leave your response!

You must be logged in to post a comment.