Contributed By: Stephen E. DeLong [email protected]
Submitted On: 05/02/00
!A program to check the Web server log
!Retrieve name of yesterday's log (modify appropriately)
ExecuteFile>E:\Winnt\system32\LogFiles\yesterday.txt
WaitWindowOpen>yesterday.txt - Notepad
Press ALT
Send Character/Text>E
Send Character/Text>A
Release ALT
Press ALT
SendCharacter/Text>E
Send Character/Text>C
Release ALT
Wait>2
!Create "today's log"
Press ALT
Send Character/Text>E
Send Character/Text>A
Release ALT
Press ALT
SendCharacter/Text>E
Send Character/Text>T
Release ALT
Year>yrall
MidStr>yrall,3,2,yr
Month>mo
Day>dy
Let>today=in
ConCat>today,yr
ConCat>today,mo
ConCat>today,dy
ConCat>today,.log
Send Character/Text>%today%
Wait>2
!Save "today's log"
Press ALT
Send Character/Text>F
Send Character/Text>S
Release ALT
Wait>2
CloseWindow>yesterday.txt - Notepad
Wait>2
!Retrieve yesterday's log
GetClipBoard>logname
Wait>2
ExecuteFile>E:Winntsystem32LogFiles\%logname%
ConCat>logname, - Notepad
WaitWindowOpen>%logname%
!Create date entry for first column
GetActiveWindow>title,X,Y
MidStr>title,3,2,year
MidStr>title,5,2,month
MidStr>title,7,2,day
Let>date=month
ConCat>date,-
ConCat>date,day
ConCat>date,-
ConCat>date,year
Wait>2
!Message>date
!Open WebLog (modify path appropriately for your xls file)
ExecuteFile>C:\Office97\ExcelFiles\weblog.xls
!WaitWindowOpen>Microsoft Excel
Wait>2
SetFocus>Microsoft Excel
Wait>2
Press Down
Wait>2
Send Character/Text>date
Wait>2
!Define pages
SetFocus>%logname%
Wait>2
Goto>List
!Loop through pages
Label>Loop1
Let>pagenum=0
Label>Iteration
SetFocus>%logname%
Add>pagenum,1
Let>name=page
ConCat>name,pagenum
!Return to top of log page
Press CTRL
Press Home
Release CTRL
Wait>2
Press ALT
Send Character/Text>S
Send Character/Text>F
Release ALT
Wait>2
!Count hits on each page
Let>count=0
Label>Loop2
Press ALT
Send Character/Text>N
Release ALT
Send Character/Text>%name%
Press ALT
Send Character/Text>F
Release ALT
Wait>1
!Test for no more hits
IfWindowOpen>Notepad,Stop
Wait>1
Add>count,1
Goto>Loop2
Label>Stop
Press Enter
Wait>1
Press Esc
Wait>1
SetFocus>Microsoft Excel
Wait>5
Press Right
Wait>5
Send Character/Text>count
Wait>5
!Test for end of checking pages
If>pagenumpagenum=18,End
If>pagenum>18,End
Label>List
Let>page1=bio.htm
Let>page2=fraid.htm
Let>page3=GET, /fruia/fruia.htm
Let>page4=green.htm
Let>page5=links.htm
Let>page6=GET, /picard/makeitso.htm
Let>page7=mersenne.htm
Let>page8=monument.htm
Let>page9=GET, /interneting/netimes.htm
Let>page10=otb.htm
Let>page11=GET, /shadow/shadow.htm
Let>page12=GET, /shroud/shroud.htm
Let>page13=sidebar.htm
Let>page14=GET, /webmaps/srchengn.htm
Let>page15=upside.htm
Let>page16=watson.htm
Let>page17=GET, /bantock/witwag&s.htm
Let>page18=GET, /bantock/witwtoc.htm
Goto>Loop1
Label>End
SetFocus>Microsoft Excel
Wait>5
Press Right
Wait>5
Press Home
!Save Excel file
Press ALT
Send Character/Text>F
Send Character/Text>S
Release ALT
Wait>5
!Minimize Excel window
Press ALT
Send Character/Text>
Send Character/Text>n
Release ALT
Wait>5
!Close log window
SetFocus>%logname%
Wait>2
CloseWindow>%logname%
Counting Web hits from WinNT4.0 (IIS) LogFiles, recording in
Moderators: Dorian (MJT support), JRL, Phil Pendlebury
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact: