forked from TLMcode/AHKs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGetLynxVersionsOnServers.ahk
47 lines (42 loc) · 1.34 KB
/
GetLynxVersionsOnServers.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include FcnLib.ahk
#include FcnLib-Nightly.ahk
;#include Lynx-FcnLib.ahk
;#include Lynx-ProcedureParts.ahk
;#include Lynx-UpdateParts.ahk
servers=release,test,t-2008,t-2003,t-1,t-800,primaryfo,secondaryfo,kp
Loop, parse, servers, CSV
{
allInfo .= GetLynxVersionOnServer(A_LoopField, "test") . "`n"
allInfo .= GetLynxVersionOnServer(A_LoopField, "security") . "`n"
}
debug(allInfo)
GetLynxVersionOnServer(server, user)
{
iMacro=
(
VERSION BUILD=7401004 RECORDER=FX
TAB T=1
URL GOTO=http://%server%/cgi/logon.plx?Option=Logout
URL GOTO=http://%server%/login/
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:Login_Form ATTR=NAME:UserID CONTENT=%user%
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:Login_Form ATTR=NAME:Password CONTENT=test
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:Login_Form ATTR=NAME:Enter&&VALUE:Enter<SP>Site
URL GOTO=http://%server%/cgi/home.plx
)
RunIMacro(imacro)
homePageText := IMacroUrlDownloadToVar(server . "/cgi/home.plx")
;ProcessCloseAll("firefox.exe")
RegExMatch(homePageText, "Ver\=(\d(\.\d+){3})", match)
if match1
{
versionNumber := match1
ini := GetPath("LynxStats.ini")
IniWrite( ini, "VersionsOnServers", server, versionNumber )
}
;else
;versionNumber := "N/A"
;msg=%versionNumber% %server%
return versionNumber
;return msg
}