1. 程式人生 > >vbs獲取遼工大教務在線獲取成績列表

vbs獲取遼工大教務在線獲取成績列表

AD isp play AC amp obj reat XML resp

Dim content,name,password,arr,pos

msg1="請輸入ip和端口號地址"&chr(13)&chr(10)&"如http://10.21.24.120:11182/newacademic/..."&chr(13)&chr(10)&"則輸入10.21.24.120:11182"
msg2="10.21.24.120:11182,1420010303,123456"

content=InputBox(msg1, "請輸入", msg2)

If content = "" Then
WScript.Quit
Else
arr=split(content,",")
‘MsgBox arr(0)
End If

Set html = CreateObject("htmlfile")
Set http = CreateObject("Msxml2.ServerXMLHTTP")

‘html.designMode = "on" ‘ 開啟編輯模式

http.open "GET", "http://"&arr(0)&"/newacademic/j_acegi_security_check?j_username="&arr(1)&"&j_password="&arr(2), False
http.send


http.open "GET", "http://"&arr(0)&"/newacademic/student/queryscore/queryscore.jsdo", False
http.send
strHtml = http.responseText

html.write strHtml ‘ 寫入數據

Set post_list = html.getElementsByTagName("table")(2)
for each r in post_list.rows
  ‘WScript.Echo r.style.display
  If r.style.display="none" Then
    WScript.Echo r.innerText
End If
  
next

  

vbs獲取遼工大教務在線獲取成績列表