Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html style="background: #5A5A5A">
- <head>
- <title>AoBTool™</title>
- <!--Styles defined for doc (start)-->
- <style type="text/css">
- body {
- filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=White, EndColorStr=#acacac);
- font-family:Verdana;
- font-size: 12px;
- color: #5e5e5e;
- background-color: -ms-linear-gradient(top, #2F2727, #1a82f7);
- text-align: center;
- border-collapse: collapse;
- }
- fieldset {
- padding: 10px;
- }
- #seldd {
- width: 100px;
- }
- button {
- filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=White, EndColorStr=#acacac);
- font-family:Verdana;
- font-size: 14px;
- height: 30px;
- width: 150px;
- font-weight: bold;
- }
- td {
- border-width: 0px;
- padding: 4px;
- border-style: solid;
- border-color: black;
- }
- .tableNorm {
- filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=white, EndColorStr=#acacac);
- border-collapse: collapse;
- border-width: thin;
- border-color: black;
- border-style: groove;
- font-size: 10px;
- font-weight: color;
- color: black;
- }
- .info1 {
- text-align: center;
- font-size: 8pt;
- font-weight: color;
- color: black;
- }
- .tabs {
- border-collapse: collapse;
- color: black;
- cursor: pointer;
- cursor: hand;
- font-family: arial;
- font-size: 9pt;
- font-weight: bold;
- margin-top: 4px;
- padding: 2px 4px 0px 4px;
- position: relative;
- text-align: center;
- text-decoration: none;
- z-index: 1;
- }
- .tabsNotSelected {
- background-color: grey;
- border: solid 1px black;
- }
- .tabsSelected {
- filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#FFFFFF, EndColorStr=#aaacae;
- border-color: black black white black;
- border-style: solid solid solid solid;
- border-width: 1px 1px 1px 1px;
- }
- </style>
- <!--Styles defined for doc (end)-->
- <!--Scripts to control app window size, position, and behavior (start)-->
- <script language="VBScript">
- Function Window_OnLoad()
- aob_spn_aobcountArea.style.display = "block"
- aob_spn_RunArea.style.display = "none"
- aob_spn_DataArea.style.display = "none"
- aob_spn_WCArea.style.display = "none"
- call ResizeWindow()
- end function
- '========================
- Function ResizeWindow()
- hght = document.body.clientHeight
- Do While abs(document.body.clientHeight - document.body.scrollHeight) >= 10
- If document.body.clientHeight < document.body.scrollHeight then
- hght = hght + 13
- else
- hght = hght - 13
- end if
- window.resizeTo 700,hght
- call Refresh()
- Loop
- End Function
- '========================
- window.resizeTo 750,200
- screenWidth = Document.ParentWindow.Screen.AvailWidth
- screenHeight = Document.ParentWindow.Screen.AvailHeight
- posLeft = (screenWidth - 750) / 2
- posTop = (screenHeight - 600) / 2
- 'move to centerscreen
- window.moveTo posLeft, posTop
- </script>
- <!--Scripts to control app window size, position, and behavior (end)-->
- <!--Features of app window (start)-->
- <HTA:APPLICATION ID="AoBTool"
- APPLICATIONNAME="AoBTool"
- version="ver.2017.7.7"
- BORDER="thin"
- BORDERSTYLE="raised"
- CAPTION="yes"
- CONTEXTMENU="yes"
- ICON="#"
- INNERBORDER="no"
- MAXIMIZEBUTTON="no"
- MINIMIZEBUTTON="yes"
- NAVIGABLE="no"
- SCROLL="no"
- SCROLLFLAT="no"
- SELECTION="no"
- SHOWINTASKBAR="yes"
- SINGLEINSTANCE="yes"
- SYSMENU="yes"
- WINDOWSTATE="normal">
- </head>
- <!--Features of app window (end)-->
- <!--Script to control tab behavior (start)-->
- <script language="VBscript">
- Dim iPanelCount
- iPanelCount = 3
- Private Sub Panel(tab)
- For i = 1 To iPanelCount
- If i = tab Then
- document.getElementById("tab" & i).className = "tabs tabsSelected"
- document.getElementById("panel" & i).style.display = "block"
- Else
- document.getElementById("tab" & i).className = "tabs tabsNotSelected"
- document.getElementById("panel" & i).style.display = "none"
- end if
- Next
- call ResizeWindow()
- End Sub
- </script>
- <!--Script to control tab behavior (end)-->
- <body>
- <table class="tableNorm" id="mainTable" align="center" border="0" cellpadding="0" cellspacing="0" width="650">
- <tr>
- <td colspan="1">
- <span class="tabs tabsSelected" id="tab1" onclick="panel(1)">AoBTool™</span>
- <span class="tabs tabsNotSelected" id="tab2" onclick="panel(2)">OffsetTool</span>
- <span class="tabs tabsNotSelected" id="tab3" onclick="panel(3)">About</span>
- <!--Code for each tab (buttons, text boxes, etc)-->
- <div class="panel" id="panel1" style="display:block">
- <H3><b><font color="darkred">AoB</font>Tool™</b></H3>
- <span style="display:none;" id="aob_spn_aobcountArea">
- <center><H4>How many AoB's would you like to compare?</H4>
- <select name="seldd" id="seldd" onchange="aobBox()">
- <option value="1">Select</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- <option value="5">5</option>
- </select>
- <br>
- <br>
- </center>
- </span>
- <span style="display:none;" id="aob_spn_wldCharArea"><center><H4>Wildcard: <input type="text" title="Note: This will be the only allowable wildcard." name="wldChar" id="wldChar" maxlength="1" value="?" size="1" style="text-align:center;"/></H4></center></span>
- <span style="display:none;" id="aob_spn_WCArea"></span>
- <span style="display:none;" id="aob_spn_DataArea"></span>
- <span style="display:none;" id="aob_spn_RunArea"><br><center><button type="button" id="aob_run_btn" onClick="fixSpaces()">Compare!</button></center></span>
- <span style="display:none;" id="aob_spn_ResetArea"><br><center><button type="button" id="aob_reset_btn" onClick="aobreset()">Reset</button></center></span>
- </div>
- <div class="panel" id="panel2" style="display:none">
- <H3><b><font color="darkred">Offset</font>Tool</b></H3>
- <center><span style="display:inline-block; width: 580;">
- <table>
- <tr>
- <td>
- <center><label>Start Address</label></center>
- </td>
- <td>
- <label></label>
- </td>
- <td>
- <center><label>Offset</label></center>
- </td>
- <td>
- <center><label>New Address</label></center>
- </td>
- </tr>
- <tr>
- <td>
- <input type="text" name="ofst_strt" id="ofst_strt" maxlength="15" size="16"/>
- </td>
- <td>
- <select name="selArth" id="selArth">
- <option value="Select">Select</option>
- <option value="+">+</option>
- <option value="-">-</option>
- </select>
- </td>
- <td>
- <input type="text" name="ofst_end" id="ofst_end" maxlength="15" size="16"/>
- </td>
- <td>
- <input readonly style="text-align: center;" type="text" name="ofst" id="ofst" maxlength="20" size="20"/>
- </td>
- </tr>
- </table>
- </span></center>
- <br><center><button type="button" id="ofst_run_btn" onClick="localhexcalc()">Run</button></center>
- <center><span style="display:none;" id="ofst_WebMsgArea"></span></center>
- <center><span style="display:none;" id="ofst_LocMsgArea"></span></center>
- </div>
- <div class="panel" id="panel3" style="display:none">
- <H4><b>Origin Story</b></H4>
- <span style="display:inline-block; width: 580;">
- <p><font class="info1">This tool is intended for use with <a href="http://www.cheatengine.org/" style="color:blue;text-decoration:none">Cheat Engine</a>'s array of bytes scanner.<br><br>Developed by <b><a href="http://forum.cheatengine.org/profile.php?mode=viewprofile&u=348916" style="color:blue;text-decoration:none">Drivium</a></b><br><a href="https://discordapp.com/" style="color:blue;text-decoration:none">Discord</a>: Drivium#2488<br><br>
- Inspired by the original VBScript tool created by:<b><a href="http://forum.cheatengine.org/profile.php?mode=viewprofile&u=338952" style="color:blue;text-decoration:none" alt="AikonCWD's Profile""><img src="http://i.imgur.com/f6rnuaV.gif" alt="AikonCWD's Profile" width="20" height="20" border="0" style="vertical-align: middle;"/>AikonCWD<img src="http://i.imgur.com/f6rnuaV.gif" alt="AikonCWD's Profile" width="20" height="20" border="0" style="vertical-align: middle;"/></a></b><br>Found here: <a href="http://forum.cheatengine.org/viewtopic.php?t=572933" style="color:blue;text-decoration:none">[TOOL] AoB Pattern Generator (coded in VBS, OpenSource)</a><br><br>
- <a href="https://drive.google.com/open?id=0B7UqN53jp_4cMEEzT1h1N0ozdVU" style="color:blue;text-decoration:none">AoBTool™</a> shared in the following forums: <a href="http://forum.cheatengine.org/viewtopic.php?t=604665"><img src="http://i34.tinypic.com/33etueb.jpg" alt="Cheat Engine Forums" width="50" height="50" border="0" style="vertical-align: middle;"/></a><a href="https://www.reddit.com/r/cheatengine/comments/6e8s81/release_aob_tool_for_comparing_and_adding/"><img src="https://assets.ifttt.com/images/channels/1352860597/icons/on_color_large.png" alt="/r/cheatengine" width="50" height="50" border="0" style="vertical-align: middle;"/></a><a href="http://fearlessrevolution.com/viewtopic.php?f=8&t=2790" style="color:blue;text-decoration:none">Fearless Revolution</a></font></p>
- </span>
- </div>
- </td>
- </tr>
- </table>
- </body>
- </html>
- <script language="VBScript">
- 'Set Global Variables
- Dim newW
- Dim wldChar
- Dim T
- </script>
- <!--Begin scripts for 1st tab -->
- <script language="VBScript">
- Sub aob_Convert(T)
- 'Original script created by AikonCWD. Modified by Drivium.
- wldChar = document.getElementByID("wldChar").value
- AoB = Split(T, vbcrlf)
- F = ""
- X = 0
- For i = 1 To Len(AoB(0))
- For u = 1 To UBound(AoB)
- If Mid(AoB(u), i, 1) <> Mid(AoB(0), i, 1) Then
- F = F & "?"
- X = 1
- Exit For
- End If
- Next
- If X <> 1 Then F = F & Mid(AoB(0), i, 1)
- X = 0
- Next
- Set re = new regexp
- oldF = F
- re.Pattern = "([\?]\w)|(\w[\?])"
- re.Global = True
- newF = re.Replace(oldF, "??")
- newWC = replace(newF, "?", wldChar)
- newW = len(newWC) - len(replace(newWC, wldChar, ""))
- '=====================================================================
- 'Fix spaces in AoB result
- newString = lcase(replace(newWC," ",""))
- Set r = New RegExp
- r.Global = True
- r.Pattern = "(.{2})"
- document.getElementById("aobresult").value = trim(r.Replace(newString, "$1 "))
- '=====================================================================
- call showWildcardStat()
- document.ParentWindow.ClipboardData.SetData "text", newWC
- Alert "Result Copied to Clipboard!"
- end sub
- </script>
- <!--'============================================================================================================-->
- <!-- Subs and Functions (start)-->
- <script language="VBScript">
- 'Triggers screen updates in an HTA...
- Sub Refresh
- With CreateObject("WScript.Shell")
- .run "%comspec% /c echo something & exit", 0, true
- End With
- End Sub
- '===================================
- Function showWildcardStat()
- if document.getElementById("aobresult").value = "" then
- aob_spn_WCArea.style.display = "none"
- else
- aob_spn_WCArea.style.display = "block"
- aob_spn_wldCharArea.style.display = "none"
- aob_spn_WCArea.InnerHTML = "<br><center><H4><b>Bytes Replaced: " & round(newW/2,0) & "</b></H4></center>"
- aob_spn_RunArea.style.display = "none"
- aob_spn_ResetArea.style.display = "block"
- call ResizeWindow()
- end if
- end function
- '============================
- Function aobBox()
- aob_spn_wldCharArea.style.display = "block"
- if document.getElementById("seldd").value = "1" then
- exit function
- else
- boxsize = document.getElementById("seldd").value
- end if
- aobBoxStart = "<fieldset>" & _
- "<Legend>ver.2017.7.7</legend>" & vbcrlf
- for i = 1 to document.getElementById("seldd").value
- box = box & "<b>AoB " & i & "</b>" & _
- "<table width='100%'>" & _
- "<tr>" & _
- "<td><textarea style='width:100%' name='aob" & i & "' rows=" & 12/boxsize & " id='aobtextbox" & i & "' onkeyup='btnDisplay()'></textarea></td>" & _
- "</tr>" & _
- "</table>" & vbcrlf
- next
- aobBoxEnd = "<b>Result</b>" & _
- "<table width='100%'>" & _
- "<tr>" & _
- "<td><textarea readonly style='width:100%' name='result' rows=5 id='aobresult'></textarea></td>" & _
- "</tr>" & _
- "</table>" & _
- "</fieldset>"
- aob_spn_ResetArea.style.display = "block"
- aob_spn_aobcountArea.style.display = "none"
- aob_spn_DataArea.style.display = "block"
- aob_spn_DataArea.InnerHTML = aobBoxStart & box & aobBoxEnd
- call ResizeWindow()
- end function
- '============================
- Function aobreset()
- for i = 1 to document.getElementById("seldd").value
- if not document.getElementById("aobtextbox" & i) is nothing then
- document.getElementById("aobtextbox" & i).value = ""
- end if
- next
- document.getElementById("aobresult").value = ""
- document.getElementByID("wldChar").value = "?"
- aob_spn_wldCharArea.style.display = "none"
- aob_spn_RunArea.style.display = "none"
- aob_spn_WCArea.style.display = "none"
- aob_spn_ResetArea.style.display = "none"
- aob_spn_DataArea.style.display = "none"
- aob_spn_aobcountArea.style.display = "block"
- document.getElementById("seldd").value = "1"
- call ResizeWindow()
- end function
- '============================
- Function btnDisplay()
- nullCount = 0
- for i = 1 to document.getElementById("seldd").value
- if document.getElementById("aobtextbox" & i).value = "" then
- nullCount = nullCount + 1
- end if
- next
- if nullCount = 0 then
- aob_spn_RunArea.style.display = "block"
- aob_spn_ResetArea.style.display = "none"
- call ResizeWindow()
- else
- document.getElementById("aobresult").value = ""
- aob_spn_RunArea.style.display = "none"
- aob_spn_ResetArea.style.display = "block"
- call ResizeWindow()
- end if
- end function
- '============================
- Function fixSpaces()
- for ii = 1 to document.getElementById("seldd").value
- newString = lcase(replace(document.getElementById("aobtextbox" & ii).value," ",""))
- Set r = New RegExp
- r.Global = True
- r.Pattern = "(.{2})"
- 'document.getElementById("aobtextbox" & ii).value = trim(r.Replace(newString, "$1 "))
- remLineBrks = replace(newString,vbcrlf,"")
- remSpaces = trim(r.Replace(remLineBrks, "$1 "))
- document.getElementById("aobtextbox" & ii).value = remSpaces
- next
- call mergeAOB()
- end function
- '============================
- Function mergeAOB()
- T = document.getElementById("aobtextbox1").value
- for ii = 2 to document.getElementById("seldd").value
- if not document.getElementById("aobtextbox" & ii) is nothing then
- if document.getElementById("aobtextbox" & ii).value <> "" then
- T = T & vbcrlf & document.getElementById("aobtextbox" & ii).value
- end if
- end if
- next
- call valChar(T)
- end function
- '============================
- Function valChar(C)
- 'Validate wild card characters
- Set objRegEx1 = New RegExp
- objRegEx1.IgnoreCase = True
- objRegEx1.Global = True
- wcPat = "[a-f0-9 ]"
- objRegEx1.Pattern = wcPat
- wldChar = document.getElementByID("wldChar").value
- Set colMatches1 = objRegEx1.Execute(wldChar)
- If colMatches1.Count > 0 Then
- For Each strMatch1 in colMatches1
- errMatch1 = strMatch1.Value
- Next
- If errMatch1 = " " then
- alert "Ok, technically a space is a non-Hexadecimal character - so you're on the right track, but using a space causes other issues in this tool. Please enter a non-Hexadecimal character (that's also not a space!)"
- document.getElementByID("wldChar").value = "?"
- exit function
- else
- alert chr(34) & errMatch1 & chr(34) & " is a Hexadecimal character. Please enter a non-Hexadecimal character"
- document.getElementByID("wldChar").value = "?"
- exit function
- end if
- end if
- '-------------------------------------
- 'Validate AoB box characters
- Set objRegEx = New RegExp
- objRegEx.IgnoreCase = True
- objRegEx.Global = True
- newPat = "[^\?a-f0-9\s]"
- objRegEx.Pattern = replace(newPat,"?",wldChar)
- strSearchString = C
- Set colMatches = objRegEx.Execute(strSearchString)
- If colMatches.Count > 0 Then
- For Each strMatch in colMatches
- errMatch = errMatch & strMatch.Value
- Next
- Set oCol = CreateObject("Scripting.Dictionary")
- lCount = Len(errMatch)
- For lCtr = 1 To lCount
- sChar = Mid(errMatch, lCtr, 1)
- On Error Resume Next
- oCol.Add sChar, sChar
- If Err.Number = 0 Then sAns = sAns & sChar
- Err.Clear
- xChar = xChar & sChar & vbcrlf
- Next
- uniChar = split(xChar,vbcrlf)
- For iVal = 1 to document.getElementById("seldd").value
- For i = 0 to ubound(uniChar)-1
- if instr(document.getElementById("aobtextbox" & iVal).value,uniChar(i)) then
- missingAoB = missingAoB & "AoB " & iVal & vbcrlf
- exit for
- 'clearlist = clearlist & "," & iVal
- end if
- Next
- Next
- For iii = 1 To Len(sAns)
- if Len(sAns) = 1 then
- badList = sAns
- elseif iii < Len(sAns) and Len(sAns) > 1 then
- badList = badList & replace(Mid(sAns,iii,1),Mid(sAns,iii,1),Mid(sAns,iii,1) & ", ")
- elseif iii = Len(sAns) and Len(sAns) > 1 then
- badList = badList & " and " & Mid(sAns,iii,1)
- end if
- next
- Alert "Non-hexadecimal character(s) (" & badList & ") found in: " & vbcrlf & missingAoB & vbcrlf & "Note: The chosen wilcard " & chr(34) & document.getElementByID("wldChar").value & chr(34) & " is the only acceptable non-hexadecimal character for this session."
- remBadCharMsg = msgbox("Would you like AoBTool™ to remove these for you?",4,"Remove Invalid Characters?")
- if remBadCharMsg = vbYes then
- For ii = 1 to document.getElementById("seldd").value
- For iiii = 1 To Len(sAns)
- if instr(document.getElementById("aobtextbox" & ii).value,Mid(sAns,iiii,1)) then
- remBadChars = replace(document.getElementById("aobtextbox" & ii).value,Mid(sAns,iiii,1)," ")
- document.getElementById("aobtextbox" & ii).value = remBadChars
- document.getElementById("aobtextbox" & ii).value = trim(document.getElementById("aobtextbox" & ii).value)
- End If
- Next
- Next
- end if
- else
- call aob_Convert(C)
- end if
- end function
- '==========================================
- Function localhexcalc()
- hex1 = document.getElementByID("ofst_strt").value
- hex2 = document.getElementByID("ofst_end").value
- if hex1 = "" or hex2 = "" then
- alert "Nothing to calculate!"
- alert "Enter a hex value into each box."
- exit function
- end if
- '-------------------
- 'Hex Validation
- Set objRegEx = New RegExp
- objRegEx.IgnoreCase = True
- objRegEx.Global = True
- hexPat = "[^a-f0-9]"
- objRegEx.Pattern = hexPat
- hexVal1 = document.getElementByID("ofst_strt").value
- Set colMatches = objRegEx.Execute(hexVal1)
- If colMatches.Count > 0 Then
- For Each strMatch in colMatches
- errMatch = strMatch.Value
- Next
- alert chr(34) & errMatch & chr(34) & " is not a Hexadecimal character." & vbcrlf & vbcrlf & "Only Hexadecimal characters can be calculated."
- document.getElementByID("ofst_strt").value = ""
- exit function
- end if
- hexVal2 = document.getElementByID("ofst_end").value
- Set colMatches = objRegEx.Execute(hexVal2)
- If colMatches.Count > 0 Then
- For Each strMatch in colMatches
- errMatch = strMatch.Value
- Next
- alert chr(34) & errMatch & chr(34) & " is not a Hexadecimal character." & vbcrlf & vbcrlf & "Only Hexadecimal characters can be calculated."
- document.getElementByID("ofst_end").value = ""
- exit function
- end if
- '--------------------
- if len(hex1) > 8 or len(hex2) > 8 then
- call webhexcalc()
- exit function
- end if
- ofst_LocMsgArea.style.display = "block"
- document.getElementByID("ofst_WebMsgArea").innerHtml = "Getting local results..."
- int1 = CLng("&h" & hex1)
- int2 = CLng("&h" & hex2)
- if document.getElementById("selArth").value = "Select" then
- alert "Please select addition or subtraction."
- exit function
- else
- arth = document.getElementById("selArth").value
- if arth = "+" then
- int3 = int1 + int2
- elseif arth = "-" then
- int3 = int1 - int2
- end if
- on error resume next
- document.getElementByID("ofst").value = Hex(int3)
- if Err.Number <> 0 then
- call webhexcalc()
- Err.clear
- on error goto 0
- exit function
- end if
- end if
- ofst_LocMsgArea.style.display = "none"
- call ResizeWindow()
- end function
- '==========================================
- function webhexcalc()
- document.getElementByID("ofst").value = ""
- hex1 = document.getElementByID("ofst_strt").value
- hex2 = document.getElementByID("ofst_end").value
- if hex1 = "" or hex2 = "" then
- alert "Nothing to calculate!"
- alert "Enter a hex value into each box."
- exit function
- end if
- if document.getElementById("selArth").value = "Select" then
- alert "Please select addition or subtraction."
- exit function
- else
- timeOutMsg = "<center>There was a problem retrieving results...<br>Try again!</center>"
- ofst_WebMsgArea.style.display = "block"
- document.getElementByID("ofst_WebMsgArea").innerHtml = "Calculation result exceeds local calculation capabilities<br>Getting results from web..."
- call ResizeWindow()
- limit = second(Now())
- arth = document.getElementById("selArth").value
- if arth = "+" then
- Set IE = CreateObject("internetexplorer.application")
- IE.Visible = false
- IE.Navigate "http://www.calculator.net/hex-calculator.html?number1=" & hex1 & "&c2op=%2B&number2=" & hex2 & "&calctype=op&x=89&y"
- Do While (IE.Busy or IE.ReadyState <> 4) and abs(second(Now())-limit) <= 6:ccSleep(0.25):Loop
- on error resume next
- if not ie.document.GetElementsByTagName("p") is nothing then
- For Each p in ie.document.GetElementsByTagName("p")
- if p.getAttribute("class") = "verybigtext" and instr(p.innertext,"Hex value:") and not ie.document.GetElementsByTagName("p") is nothing then
- for each b in p.getElementsByTagName("b")
- hexResult = b.innertext
- exit for
- next
- elseif abs(second(Now())-limit) >=6 then
- document.getElementByID("ofst_WebMsgArea").innerHtml = "Having trouble retrieving web results...<br>Please try again!"
- document.getElementByID("ofst").value = ""
- ie.quit
- exit function
- end if
- Next
- else
- document.getElementByID("ofst_WebMsgArea").innerHtml = "Having trouble retrieving web results...<br>Please try again!"
- document.getElementByID("ofst").value = ""
- ie.quit
- exit function
- end if
- on error goto 0
- elseif arth = "-" then
- Set IE = CreateObject("internetexplorer.application")
- IE.Visible = false
- IE.Navigate "http://www.calculator.net/hex-calculator.html?number1=" & hex1 & "&c2op=-&number2=" & hex2 & "&calctype=op&x=39&y"
- Do While (IE.Busy or IE.ReadyState <> 4) and abs(second(Now())-limit) <= 6:ccSleep(0.25):Loop
- on error resume next
- if not ie.document.GetElementsByTagName("p") is nothing then
- For Each p in ie.document.GetElementsByTagName("p")
- if p.getAttribute("class") = "verybigtext" and instr(p.innertext,"Hex value:") and not ie.document.GetElementsByTagName("p") is nothing then
- for each b in p.getElementsByTagName("b")
- hexResult = b.innertext
- exit for
- next
- elseif abs(second(Now())-limit) >=6 then
- document.getElementByID("ofst_WebMsgArea").innerHtml = "Having trouble retrieving web results...<br>Please try again!"
- document.getElementByID("ofst").value = ""
- ie.quit
- exit function
- end if
- Next
- else
- document.getElementByID("ofst_WebMsgArea").innerHtml = "Having trouble retrieving web results...<br>Please try again!"
- document.getElementByID("ofst").value = ""
- ie.quit
- exit function
- end if
- on error goto 0
- end if
- document.getElementByID("ofst").value = hexResult
- ofst_WebMsgArea.style.display = "none"
- call ResizeWindow()
- end if
- ie.quit
- end function
- '==========================================
- Sub ccSleep(seconds)
- set oShell = CreateObject("Wscript.Shell")
- cmd = "%COMSPEC% /c ping -n " & 1 + seconds & " 127.0.0.1>nul"
- oShell.Run cmd,0,1
- End Sub
- '==========================================
- </script>
- <!-- Subs and Functions (End)-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement