Code: Select all
<html>
<head>...</head>
<frameset rows="57,1*">
<frame name="toplogo" src="top.asp" frameborder="0" noresize="" scrolling="NO">...</frame>
<frameset cols="230,*">
<frame name="contents" src="contents.asp" frameborder="0">...</frame>
<frame name="main" src="setup_option.asp" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto">
<html>
<head>...</head>
<body onload="iw.ChangeOnLoad();">
<h2>System Information</h2>
<form name="sysinfo" onsubmit="return CheckValue(this)" action="/forms/iw_webSetParameters" method="POST">
<table width="100%">
<tbody>
<tr>
<td width="30%" class="column_title">Device name</td>
<td width="70%">
<input name="iw_board_deviceName" type="text" size="40" maxlength="31" value="Device MAC Address" />
I've referred to several pages online to retrieve this value, however I have been unsuccessful. Here are a few I've been referencing.
https stackoverflow.com/questions/11563638/how-do-i-get-the-value-of-text-input-field-using-javascript Broken Link for safety
https codippa.com/how-to-select-an-element-inside-a-frame-using-javascript/ Broken Link for safety
Code: Select all
;Create ie Window
wb := ComObjCreate("InternetExplorer.Application")
;Make ie Window Visible
wb.Visible := 1
;Navigate to Moxa page
wb.Navigate("http 192.168.127.253 ") Broken Link for safety
;Wait while page loads
While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy
Sleep, 20
;Retrieve MAC address - TESTING
MAC := wb.window.frame["main"].document.getElementsByName("iw_board_deviceName")
;MAC := wb.window.frames["main"].document.getElementID("iw_board_deviceName")
;MAC := wb.document.getElementById("myframe1").contentWindow.document.getElementByID("iw_board_deviceName")
;Display Info from the page
MsgBox %MAC%
Edit: The wb.Navigate line of code I have works. For some reason it keeps stripping the :// between the IP address and http on this forum.