iceberg Posted May 16, 2007 Posted May 16, 2007 Hi Guys, The following codes are supposed to get the McAfee dat file version. But I could only get this far. The problem is the dat number changes very time. How can I best achieve this? CODE#include <IE.au3> $sURL = "http://secure.nai.com/apps/downloads/security_updates/dat.asp" $sSearch = "dat-" $oIE = _IECreate ($sURL, 0, 0, 1, -1) If StringInStr(_IEBodyReadText($oIE), $sSearch) Then MsgBox(0 ,"Success", $sSearch) Else MsgBox(0 ,"Error", "The text was NOT found.") EndIf Thank you. mouse not found....scroll any mouse to continue.
Moderators big_daddy Posted May 17, 2007 Moderators Posted May 17, 2007 You should be able to modify this to fit your needs. #include <IE.au3> $sURL = "http://secure.nai.com/apps/downloads/security_updates/dat.asp" _IEErrorHandlerRegister() $oIE = _IECreate($sURL, 0, 0) $oForm = _IEFormGetObjByName($oIE, "iagree") If Not @error Then $oInput = _IEFormElementGetObjByName($oForm, "agree") _IEAction($oInput, "click") _IELoadWait($oIE) EndIf $oTable = _IEGetObjByName($oIE, "DATTable") $oTR_Zip = _IETagNameGetCollection($oTable, "TR", 1) $sLink_Zip = $oTR_Zip.firstChild.firstChild.href $oTR_Tar = _IETagNameGetCollection($oTable, "TR", 2) $sLink_Tar = $oTR_Tar.firstChild.firstChild.href $oTR_Exe = _IETagNameGetCollection($oTable, "TR", 3) $sLink_Exe = $oTR_Exe.firstChild.firstChild.href ConsoleWrite("Zip: " & $sLink_Zip & @CR) ConsoleWrite("Tar: " & $sLink_Tar & @CR) ConsoleWrite("Exe: " & $sLink_Exe & @CR)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now