Jump to content

Reading from web page


Recommended Posts

Hello I wanted to create a script that will get the counter numbers and paste it in mail.

But it turned out to be difficult for me when i saw that the counter page is java loaded.

<tr>
<td width="3%" valign="top"><a href="javascript:load_cdevice()"><img height="12" width="12" src="en/media/mbs_n.gif" border="0" name="eye_c_device" alt=" " title=" "></a></td>
<td><a href="javascript:load_cdevice()"><font face="Helvetica,Arial" size="2"><b>Counter Check</b></font></a></td>
</tr>

this the counter page link.

<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>Remote UI:Counter Check</title>
</head>

<body bgcolor="white">
<a name="page_top"></a>
<form>

<script LANGUAGE="JavaScript">
var has_fax        = "true";        // "true" or "false"
var has_send       = "true";       // "true" or "false"
</SCRIPT>

<script LANGUAGE="JavaScript">
function reload_device(){
var cgi_str = "./dcounter.cgi?";

// for Expire Cache!!
var now_time = new Date();
cgi_str += "Dummy=" + now_time.getTime();

document.location.href = cgi_str;
}
</SCRIPT>

<table border="0" cellpadding="0" cellspacing="2" width="100%">
<tr>
<td valign="middle"><b><font size="4" color="#000066"><table border="0" cellpadding="0" cellspacing="2">
<tr>
<td rowspan="2" nowrap><img src="en/media/simg162.gif"></td>
<td nowrap><font face="Helvetica,Arial" size="4" color="#000066"><b>iR&nbsp;C2880</b></font></td>
</tr>
<tr>
<td nowrap><font size="2">iR&nbsp;C2880</font></td>
</tr>
</table></font></b></td>
<td valign="middle" width="70" align="right"><font size="4" color="black"><b><a href="javascript:reload_device()" target="_self"><img src="en/media/bh_updt.gif" width="28" height="28" border="0" alt="Update" title="Update"></a></b></font></td>
</tr>
</table>
<hr noshade size="2">
<table border="0" cellpadding="0" cellspacing="4" width="100%">
<tr>
<td align="left"><font size="1">&nbsp;Last Updated :21/07 2011 11:18:52</font></td>
</tr>
</table><table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr height="27">
<td bgcolor="#000066" height="27"><font face="Helvetica,Arial">&nbsp;</font><font color="white" face="Helvetica,Arial"><b>Counter Check</b></font></td>
</tr>
</table>
<p><table border="0" cellpadding="2" width="100%" cellspacing="2">
<tr bgcolor="#cccccc">
<td colspan="2" bgcolor="#cccccc" align="left"><font face="Helvetica,Arial" size="1">Type</font></td>
<td bgcolor="#cccccc" align="left" width="10%"><font color="black" face="Helvetica,Arial" size="1">Total</font></td>
</tr>

<script LANGUAGE="JavaScript">
function write_index(num_str){
  var num_len = num_str.length;
  if( num_len <= 3 && num_str != "0" )
  {
    if( num_len == 1 )
    {
      document.write("00");
    }
    else if( num_len == 2 )
    {
      document.write("0");
    }
    if( "195" == num_str ||  "196" == num_str )
    {
      return;
    }
    document.write(num_str);
  }
}
</SCRIPT>

<script LANGUAGE="JavaScript">
function write_type(type_val){
  if( type_val >= 0 && type_val <= 99 )
  {
    switch(type_val)
    {
      case   2: document.write("Remote Copy (Full Color 1)"); break;
      case   3: document.write("Remote Copy (Full Color 2)"); break;
      case   4: document.write("Remote Copy (Single Color 1)"); break;
      case   5: document.write("Remote Copy (Single Color 2)"); break;
      case   6: document.write("Remote Copy (Black 1) "); break;
      case   7: document.write("Remote Copy (Black 2) "); break;
      case   8: document.write("Remote Copy (Full Color/Large)"); break;
      case   9: document.write("Remote Copy (Full Color/Small)"); break;
      case  10: document.write("Remote Copy (Single Color/Large)"); break;
      case  11: document.write("Remote Copy (Single Color/Small)"); break;
      case  12: document.write("Remote Copy (Black/Large)"); break;
      case  13: document.write("Remote Copy (Black/Small)"); break;
      case  14: document.write("Remote Copy (Full Color + Single Color/Large)"); break;
      case  15: document.write("Remote Copy (Full Color + Single Color/Small)"); break;
      case  16: document.write("Remote Copy (Full Color + Single Color 2)"); break;
      case  17: document.write("Remote Copy (Full Color + Single Color 1)"); break;
      case  18: document.write("Remote Copy (Full Color/Large/2-Sided)"); break;
      case  19: document.write("Remote Copy (Full Color/Small/2-Sided)"); break;
      case  20: document.write("Remote Copy (Single Color/Large/2-Sided)"); break;
      case  21: document.write("Remote Copy (Single Color/Small/2-Sided)"); break;
      case  22: document.write("Remote Copy (Black/Large2-Sided)"); break;
      case  23: document.write("Remote Copy (Black/Small/2-Sided)"); break;

      default: break;
    }
  }
  else if( type_val >= 100 && type_val <= 199 )
  {
    switch(type_val)
    {
      case 101: document.write("Total 1"); break;
      case 102: document.write("Total 2"); break;
      case 103: document.write("Total (Large)"); break;
      case 104: document.write("Total (Small)"); break;
      case 105: document.write("Total (Full Color 1)"); break;
      case 106: document.write("Total (Full Color 2)"); break;
      case 107: document.write("Total (Single Color)"); break;
      case 108: document.write("Total (Black 1)"); break;
      case 109: document.write("Total (Black 2)"); break;
      case 110: document.write("Total (Single Color/Large)"); break;
      case 111: document.write("Total (Single Color/Small)"); break;
      case 112: document.write("Total (Black/Large)"); break;
      case 113: document.write("Total (Black/Small)"); break;
      case 114: document.write("Total 1 (2-Sided)"); break;
      case 115: document.write("Total 2 (2-Sided)"); break;
      case 116: document.write("Large (2-Sided)"); break;
      case 117: document.write("Small (2-Sided)"); break;
      case 118: document.write("Total (Single Color 1)"); break;
      case 119: document.write("Total (Single Color 2)"); break;
      case 120: document.write("Total (Full Color/Large)"); break;
      case 121: document.write("Total (Full Color/Small)"); break;
      case 122: document.write("Total (Full Color + Single Color/Large)"); break;
      case 123: document.write("Total (Full Color + Single Color/Small)"); break;
      case 124: document.write("Total (Full Color + Single Color 2)"); break;
      case 125: document.write("Total (Full Color + Single Color 1)"); break;

      case 126: document.write("Total A1"); break;
      case 127: document.write("Total A2"); break;
      case 128: document.write("Total A (Large)"); break;
      case 129: document.write("Total A (Small)"); break;
      case 130: document.write("Total A (Full Color 1)"); break;
      case 131: document.write("Total A (Full Color 2)"); break;
      case 132: document.write("Total A (Black 1)"); break;
      case 133: document.write("Total A (Black 2)"); break;
      case 134: document.write("Total A (Single Color/Large)"); break;
      case 135: document.write("Total A (Single Color/Small)"); break;
      case 136: document.write("Total A (Black/Large)"); break;
      case 137: document.write("Total A (Black/Small)"); break;
      case 138: document.write("Total A1 (2-Sided)"); break;
      case 139: document.write("Total A2 (2-Sided)"); break;
      case 140: document.write("Large A (2-Sided)"); break;
      case 141: document.write("Small A (2-Sided)"); break;
      case 142: document.write("Total A (Single Color 1)"); break;
      case 143: document.write("Total A (Single Color 2)"); break;
      case 144: document.write("Total A (Full Color/Large)"); break;
      case 145: document.write("Total A (Full Color/Small)"); break;
      case 146: document.write("Total A (Full Color + Single Color/Large)"); break;
      case 147: document.write("Total A (Full Color + Single Color/Small)"); break;
      case 148: document.write("Total A (Full Color + Single Color 2)"); break;
      case 149: document.write("Total A (Full Color + Single Color 1)"); break;
      case 150: document.write("Total B1"); break;
      case 151: document.write("Total B2"); break;
      case 152: document.write("Total B (Large)"); break;
      case 153: document.write("Total B (Small)"); break;
      case 154: document.write("Total B (Full Color 1)"); break;
      case 155: document.write("Total B (Full Color 2)"); break;
      case 156: document.write("Total B (Black 1)"); break;
      case 157: document.write("Total B (Black 2)"); break;
      case 158: document.write("Total B (Single Color/Large)"); break;
      case 159: document.write("Total B (Single Color/Small)"); break;
      case 160: document.write("Total B (Black/Large)"); break;
      case 161: document.write("Total B (Black/Small)"); break;
      case 162: document.write("Total B1 (2-Sided)"); break;
      case 163: document.write("Total B2 (2-Sided)"); break;
      case 164: document.write("Large B (2-Sided)"); break;
      case 165: document.write("Small B (2-Sided)"); break;
      case 166: document.write("Total B (single Color 1)"); break;
      case 167: document.write("Total B (Single Color 2)"); break;
      case 168: document.write("Total B (Full Color/Large)"); break;
      case 169: document.write("Total B (Full Color/Small)"); break;
      case 170: document.write("Total B (Full Color + Single Color/Large)"); break;
      case 171: document.write("Total B (Full Color + Single Color/Small)"); break;
      case 172: document.write("Total B (Full Color + Single Color 2)"); break;
      case 173: document.write("Total B (Full Color + Single Color 1)"); break;

      case 191: document.write("Toner Cartridge Replacement (Yellow)"); break;
      case 192: document.write("Toner Cartridge Replacement (Magenta)"); break;
      case 193: document.write("Toner Cartridge Replacement (Cyan)"); break;
      case 194: document.write("Toner Cartridge Replacement (Black)"); break;
//    case 195: document.write("Toner Cartridge Replacement (1)"); break;
//    case 196: document.write("Toner Cartridge Replacement (2)"); break;

      default: break;
    }
  }
  else if( type_val >= 200 && type_val <= 299 )
  {
    switch(type_val)
    {
      case 201: document.write("Copy (Total 1)"); break;
      case 202: document.write("Copy (Total 2)"); break;
      case 203: document.write("Copy (Large)"); break;
      case 204: document.write("Copy (Small)"); break;
      case 205: document.write("Copy A (Total 1)"); break;
      case 206: document.write("Copy A (Total 2)"); break;
      case 207: document.write("Copy A (Large)"); break;
      case 208: document.write("Copy A (Small)"); break;
      case 209: document.write("Local Copy (Total 1)"); break;
      case 210: document.write("Local Copy (Total 2)"); break;
      case 211: document.write("Local Copy (Large)"); break;
      case 212: document.write("Local Copy (Small)"); break;
      case 213: document.write("Remote Copy (Total 1)"); break;
      case 214: document.write("Remote Copy (Total 2)"); break;
      case 215: document.write("Remote Copy (Large)"); break;
      case 216: document.write("Remote Copy (Small)"); break;
      case 217: document.write("Copy (Full Color 1)"); break;
      case 218: document.write("Copy (Full Color 2)"); break;
      case 219: document.write("Copy (Single Color 1)"); break;
      case 220: document.write("Copy (Single Color 2)"); break;
      case 221: document.write("Copy (Black 1)"); break;
      case 222: document.write("Copy (Black 2)"); break;
      case 223: document.write("Copy (Full Color/Large)"); break;
      case 224: document.write("Copy (Full Color/Small)"); break;
      case 225: document.write("Copy (Single Color/Large)"); break;
      case 226: document.write("Copy (Single Color/Large)"); break;
      case 227: document.write("Copy (Black/Large)"); break;
      case 228: document.write("Copy (Black/Small)"); break;
      case 229: document.write("Copy (Full Color + Single Color/Large)"); break;
      case 230: document.write("Copy (Full Color + Single Color/Small)"); break;
      case 231: document.write("Copy (Full Color + Single Color/2)"); break;
      case 232: document.write("Copy (Full Color + Single Color/1)"); break;
      case 233: document.write("Copy (Full Color/Large/2-Sided)"); break;
      case 234: document.write("Copy (Full Color/Small/2-Sided)"); break;
      case 235: document.write("Copy (Single Color/Large/2-Sided)"); break;
      case 236: document.write("Copy (Single Color/Small/2-Sided)"); break;
      case 237: document.write("Copy (Black/Large/2-Sided)"); break;
      case 238: document.write("Copy (Black/Small/2-Sided)"); break;
      case 239: document.write("Copy (2-color 1)"); break;
      case 240: document.write("Copy (2-color 2)"); break;
      case 241: document.write("Copy (2-color/Large)"); break;
      case 242: document.write("Copy (2-color/Small)"); break;
      case 243: document.write("Copy (2-color/Large/2-Sided)"); break;
      case 244: document.write("Copy (2-color/Small/2-Sided)"); break;
      case 245: document.write("Copy A (Full Color 1)"); break;
      case 246: document.write("Copy A (Full Color 2)"); break;
      case 247: document.write("Copy A (Single Color 1)"); break;
      case 248: document.write("Copy A (Single Color 2)"); break;
      case 249: document.write("Copy A (Black 1)"); break;
      case 250: document.write("Copy A (Black 2)"); break;
      case 251: document.write("Copy A (Full Color/Large)"); break;
      case 252: document.write("Copy A (Full Color/Small)"); break;
      case 253: document.write("Copy A (Single Color/Large)"); break;
      case 254: document.write("Copy A (Single Color/Small)"); break;
      case 255: document.write("Copy A (Black/Large)"); break;
      case 256: document.write("Copy A (Black/Small)"); break;
      case 257: document.write("Copy A (Full Color + Single Color/Large)"); break;
      case 258: document.write("Copy A (Full Color + Single Color/Small)"); break;
      case 259: document.write("Copy A (Full Color + Single Color 2)"); break;
      case 260: document.write("Copy A (Full Color + Single Color 1)"); break;
      case 261: document.write("Copy A (Full Color/Large/2-Sided)"); break;
      case 262: document.write("Copy A (Full Color/Small/2-Sided)"); break;
      case 263: document.write("Copy A (Single Color/Large/2-Sided)"); break;
      case 264: document.write("Copy A (Single Color/Small/2-Sided)"); break;
      case 265: document.write("Copy A (Black/Large/2-Sided)"); break;
      case 266: document.write("Copy A (Black/Small/2-Sided)"); break;

      case 273: document.write("Local Copy (Full Color 1)"); break;
      case 274: document.write("Local Copy (Full Color 2)"); break;
      case 275: document.write("Local Copy (Single Color 1)"); break;
      case 276: document.write("Local Copy (Single Color 2)"); break;
      case 277: document.write("Local Copy (Black 1)"); break;
      case 278: document.write("Local Copy (Black 2)"); break;
      case 279: document.write("Local Copy (Full Color/Large)"); break;
      case 280: document.write("Local Copy (Full Color/Small)"); break;
      case 281: document.write("Local Copy (Single Color/Large)"); break;
      case 282: document.write("Local Copy (Single Color/Small)"); break;
      case 283: document.write("Local Copy (Black/Large)"); break;
      case 284: document.write("Local Copy (Black/Small)"); break;
      case 285: document.write("Local Copy (Full Color + Single Color/Large)"); break;
      case 286: document.write("Local Copy (Full Color + Single Color/Small)"); break;
      case 287: document.write("Local Copy (Full Color + Single Color 2)"); break;
      case 288: document.write("Local Copy (Full Color + Single Color 1)"); break;
      case 289: document.write("Local Copy (Full Color/Large/2-Sided)"); break;
      case 290: document.write("Local Copy (Full Color/Small/2-Sided)"); break;
      case 291: document.write("Local Copy (Single Color/Large/2-Sided)"); break;
      case 292: document.write("Local Copy (Single Color/Small/2-Sided)"); break;
      case 293: document.write("Local Copy (Black/Large/2-Sided)"); break;
      case 294: document.write("Local Copy (Black/Small/2-Sided)"); break;

      default: break;
    }
  }
  else if( type_val >= 300 && type_val <= 399 )
  {
    switch(type_val)
    {
      case 301: document.write("Print (Total 1)"); break;
      case 302: document.write("Print (Total 2)"); break;
      case 303: document.write("Print (Large)"); break;
      case 304: document.write("Print (Small)"); break;
      case 305: document.write("Print A (Total 1)"); break;
      case 306: document.write("Print A (Total 2)"); break;
      case 307: document.write("Print A (Large)"); break;
      case 308: document.write("Print A (Small)"); break;
      case 309: document.write("Print (Full Color 1)"); break;
      case 310: document.write("Print (Full Color 2)"); break;
      case 311: document.write("Print (Single Color 1)"); break;
      case 312: document.write("Print (Single Color 2)"); break;
      case 313: document.write("Print (Black 1)"); break;
      case 314: document.write("Print (Black 2)"); break;
      case 315: document.write("Print (Full Color/Large)"); break;
      case 316: document.write("Print (Full Color/Small)"); break;
      case 317: document.write("Print (Single Color/Large)"); break;
      case 318: document.write("Print (Single Color/Small)"); break;
      case 319: document.write("Print (Black/Large)"); break;
      case 320: document.write("Print (Black/Small)"); break;
      case 321: document.write("Print (Full Color + Single Color /Large)"); break;
      case 322: document.write("Print (Full Color + Single Color/Small)"); break;
      case 323: document.write("Print (Full Color + Single Color/2)"); break;
      case 324: document.write("Print (Full Color + Single Color/1)"); break;
      case 325: document.write("Print (Full Color/Large/2-Sided)"); break;
      case 326: document.write("Print (Full Color/Small/2-Sided)"); break;
      case 327: document.write("Print (Single Color/Large/2-Sided) "); break;
      case 328: document.write("Print (Single Color/Small/2-Sided)"); break;
      case 329: document.write("Print (Black/Large/2-Sided)"); break;
      case 330: document.write("Print (Black /Small/2-Sided) "); break;
      case 331: document.write("Printer Driver Print (Total 1)"); break;
      case 332: document.write("Printer Driver Print (Total 2)"); break;
      case 333: document.write("Printer Driver Print (Large)"); break;
      case 334: document.write("Printer Driver Print (Small)"); break;
      case 335: document.write("Printer Driver Print (Full Color 1)"); break;
      case 336: document.write("Printer Driver Print (Full Color 2)"); break;

      case 339: document.write("Printer Driver Print (Black 1)"); break;
      case 340: document.write("Printer Driver Print (Black 2)"); break;
      case 341: document.write("Printer Driver Print (Full Color/Large)"); break;
      case 342: document.write("Printer Driver Print (Full Color/Small)"); break;

      case 345: document.write("Printer Driver Print (Black/Large)"); break;
      case 346: document.write("Printer Driver Print (Black/Small)"); break;

      case 351: document.write("Printer Driver Print (Full Color/Large/2-Sided)"); break;
      case 352: document.write("Printer Driver Print (Full Color/Small/2-Sided)"); break;

      case 355: document.write("Printer Driver Print (Black/Large/2-Sided)"); break;
      case 356: document.write("Printer Driver Print (Black/Small/2-Sided)"); break;

      default: break;
    }
  }
  else if( type_val >= 400 && type_val <= 499 )
  {
    switch(type_val)
    {
      case 401: document.write("Copy + Print (Full Color/Large)"); break;
      case 402: document.write("Copy + Print (Full Color/Small)"); break;
      case 403: document.write("Copy + Print (Black/Large)"); break;
      case 404: document.write("Copy + Print (Black/Small)"); break;
      case 405: document.write("Copy + Print (Black 2)"); break;
      case 406: document.write("Copy + Print (Black 1)"); break;
      case 407: document.write("Copy + Print (Full Color + Single Color/Large)"); break;
      case 408: document.write("Copy + Print (Full Color + Single Color/Small)"); break;
      case 409: document.write("Copy + Print (Full Color + Single Color/2)"); break;
      case 410: document.write("Copy + Print (Full Color + Single Color/1)"); break;
      case 411: document.write("Copy + Print (Large)"); break;
      case 412: document.write("Copy + Print (Small)"); break;
      case 413: document.write("Copy + Print (2)"); break;
      case 414: document.write("Copy + Print (1)"); break;
      case 415: document.write("Copy + Print (Single Color/Large)"); break;
      case 416: document.write("Copy + Print (Single Color/Small)"); break;
      case 417: document.write("Copy + Print (Full Color/Large/2-Sided)"); break;
      case 418: document.write("Copy + Print (Full Color/Small/2-Sided)"); break;
      case 419: document.write("Copy + Print (Single Color/Large/2-Sided)"); break;
      case 420: document.write("Copy + Print (Single Color/Small/2-Sided)"); break;
      case 421: document.write("Copy + Print (Black/Large2-Sided)"); break;
      case 422: document.write("Copy + Print (Black/Small/2-Sided)"); break;

      default: break;
    }
  }
  else if( type_val >= 500 && type_val <= 599 )
  {
    switch(type_val)
    {
      case 501: document.write("Scan (Total 1)"); break;
      case 502: document.write("Scan (Total 2)"); break;
      case 503: document.write("Scan (Large)"); break;
      case 504: document.write("Scan (Small)"); break;
      case 505: document.write("Black Scan (Total 1)"); break;
      case 506: document.write("Black Scan (Total 2)"); break;
      case 507: document.write("Black Scan (Large)"); break;
      case 508: document.write("Black Scan (Small)"); break;
      case 509: document.write("Color Scan (Total 1)"); break;
      case 510: document.write("Color Scan (Total 2)"); break;
      case 511: document.write("Color Scan (Large)"); break;
      case 512: document.write("Color Scan (Small)"); break;
      case 513: document.write("Copy Scan (Large) "); break;
      case 514: document.write("Copy Scan (Small)"); break;
      case 515: document.write("Copy Scan (Total)"); break;

      default: break;
    }
  }
  else if( type_val >= 600 && type_val <= 699 )
  {
    switch(type_val)
    {
      case 601: document.write("Inbox Print (Total 1)"); break;
      case 602: document.write("Inbox Print (Total 2)"); break;
      case 603: document.write("Inbox Print (Large)"); break;
      case 604: document.write("Inbox Print (Small)"); break;
      case 605: document.write("Inbox Print (Full Color 1)"); break;
      case 606: document.write("Inbox Print (Full Color 2)"); break;
      case 607: document.write("Inbox Print (Single Color 1)"); break;
      case 608: document.write("Inbox Print (Single Color 2)"); break;
      case 609: document.write("Inbox Print (Black 1)"); break;
      case 610: document.write("Inbox Print (Black 2)"); break;
      case 611: document.write("Inbox Print (Full Color/Large)"); break;
      case 612: document.write("Inbox Print (Full Color/Small)"); break;
      case 613: document.write("Inbox Print (Single Color/Large)"); break;
      case 614: document.write("Inbox Print (Single Color/Small)"); break;
      case 615: document.write("Inbox Print (Black/Large)"); break;
      case 616: document.write("Inbox Print (Black/Small)"); break;
      case 617: document.write("Inbox Print (Full Color + Single Color/Large)"); break;
      case 618: document.write("Inbox Print (Full Color + Single Color/Small)"); break;
      case 619: document.write("Inbox Print (Full Color + Single Color 2)"); break;
      case 620: document.write("Inbox Print (Full Color + Single Color 1)"); break;
      case 621: document.write("Inbox Print (Full Color/Large/2-Sided)"); break;
      case 622: document.write("Inbox Print (Full Color/Small/2-Sided)"); break;
      case 623: document.write("Inbox Print (Single Color/Large/2-Sided)"); break;
      case 624: document.write("Inbox Print (Single Color/Small/2-Sided)"); break;
      case 625: document.write("Inbox Print (Black/Large/2-Sided)"); break;
      case 626: document.write("Inbox Print (Black/Small/2-Sided)"); break;

      default: break;
    }
  }
  else if( type_val >= 700 && type_val <= 799 )
  {
    switch(type_val)
    {
      case 701: document.write("Receive Print (Total 1)"); break;
      case 702: document.write("Receive Print (Total 2)"); break;
      case 703: document.write("Receive Print (Large)"); break;
      case 704: document.write("Receive Print (Small) "); break;
      case 705: document.write("Receive Print (Full Color 1)"); break;
      case 706: document.write("Receive Print (Full Color 2)"); break;
      case 707: document.write("Receive Print (Grayscale 1)"); break;
      case 708: document.write("Receive Print (Grayscale 2)"); break;
      case 709: document.write("Receive Print (Black 1)"); break;
      case 710: document.write("Receive Print (Black 2)"); break;
      case 711: document.write("Receive Print (Full Color/Large)"); break;
      case 712: document.write("Receive Print (Full Color/Small)"); break;
      case 713: document.write("Receive Print (Grayscale/Large)"); break;
      case 714: document.write("Receive Print (Grayscale/Small)"); break;
      case 715: document.write("Receive Print (Black/Large)"); break;
      case 716: document.write("Receive Print (Black/Small)"); break;
      case 717: document.write("Receive Print (Full Color + Grayscale/Large)"); break;
      case 718: document.write("Receive Print (Full Color + Grayscale/Small)"); break;
      case 719: document.write("Receive Print (Full Color + Grayscale 2)"); break;
      case 720: document.write("Receive Print (Full Color + Grayscale 1)"); break;
      case 721: document.write("Receive Print (Full Color/Large/2-Sided)"); break;
      case 722: document.write("Receive Print (Full Color/Small/2-Sided)"); break;
      case 723: document.write("Receive Print (Grayscale/Large/2-Sided)"); break;
      case 724: document.write("Receive Print (Grayscale/Small/2-Sided)"); break;
      case 725: document.write("Receive Print (Black/Large/2-Sided)"); break;
      case 726: document.write("Receive Print (Black/Small/2-Sided)"); break;

      default: break;
    }
  }
  else if( type_val >= 800 && type_val <= 899 )
  {
    switch(type_val)
    {
      case 801: document.write("Report Print (Total 1)"); break;
      case 802: document.write("Report Print (Total 2)"); break;
      case 803: document.write("Report Print (Large)"); break;
      case 804: document.write("Report Print (Small)"); break;
      case 805: document.write("Report Print (Full Color 1)"); break;
      case 806: document.write("Report Print (Full Color 2)"); break;
      case 807: document.write("Report Print (Grayscale 1)"); break;
      case 808: document.write("Report Print (Grayscale 2)"); break;
      case 809: document.write("Report Print (Black 1)"); break;
      case 810: document.write("Report Print (Black 2)"); break;
      case 811: document.write("Report Print (Full Color/Large)"); break;
      case 812: document.write("Report Print (Full Color/Small)"); break;
      case 813: document.write("Report Print (Grayscale/Large)"); break;
      case 814: document.write("Report Print (Grayscale/Small)"); break;
      case 815: document.write("Report Print (Black/Large)"); break;
      case 816: document.write("Report Print (Black/Small)"); break;
      case 817: document.write("Report Print (Full Color + Grayscale/Large)"); break;
      case 818: document.write("Report Print (Full Color + Grayscale/Small)"); break;
      case 819: document.write("Report Print (Full Color + Grayscale 2)"); break;
      case 820: document.write("Report Print (Full Color + Grayscale 1)"); break;
      case 821: document.write("Report Print (Full Color/Large/2-Sided)"); break;
      case 822: document.write("Report Print (Full Color/Small/2-Sided)"); break;
      case 823: document.write("Report Print (Grayscale/Large/2-Sided)"); break;
      case 824: document.write("Report Print (Grayscale/Small/2-Sided)"); break;
      case 825: document.write("Report Print (Black/Large/2-Sided)"); break;
      case 826: document.write("Report Print (Black/Small/2-Sided)"); break;

      default: break;
    }
  }
  else if( type_val >= 900 && type_val <= 999 )
  {
    switch(type_val)
    {
      case 901: document.write("Copy Scan Total 1 (Color)"); break;
      case 902: document.write("Copy Scan Total 1 (Black)"); break;
      case 903: document.write("Copy Scan Total 2 (Color)"); break;
      case 904: document.write("Copy Scan Total 2 (Black)"); break;
      case 905: document.write("Copy Scan Total 3 (Color)"); break;
      case 906: document.write("Copy Scan Total 3 (Black)"); break;
      case 907: document.write("Copy Scan Total 4 (Color)"); break;
      case 908: document.write("Copy Scan Total 4 (Black)"); break;
      case 909: document.write("Local Copy Scan (Color)"); break;
      case 910: document.write("Local Copy Scan (Black)"); break;
      case 911: document.write("Remote Copy Scan (Color)"); break;
      case 912: document.write("Remote Copy Scan (Black)"); break;
      case 913: document.write("TX Scan Total 1 (Color)"); break;
      case 914: document.write("TX Scan Total 1 (Black)"); break;
      case 915: document.write("TX Scan Total 2 (Color)"); break;
      case 916: document.write("TX Scan Total 2 (Black)"); break;
      case 917: document.write("TX Scan Total 3 (Color)"); break;
      case 918: document.write("TX Scan Total 3 (Black)"); break;
      case 919: document.write("TX Scan Total 4 (Color)"); break;
      case 920: document.write("TX Scan Total 4 (Black)"); break;
      case 921: document.write("TX Scan Total 5 (Color)"); break;
      case 922: document.write("TX Scan Total 5 (Black)"); break;

      case 929: document.write("TX Scan Total 6 (Color)"); break;
      case 930: document.write("TX Scan Total 6 (Black)"); break;
      case 931: document.write("TX Scan Total 7 (Color)"); break;
      case 932: document.write("TX Scan Total 7 (Black)"); break;
      case 933: document.write("TX Scan Total 8 (Color)"); break;
      case 934: document.write("TX Scan Total 8 (Black)"); break;
      case 935: document.write("Universal TX Scan Total (Color)"); break;
      case 936: document.write("Universal TX Scan Total (Black)"); break;
      case 937: document.write("Inbox Scan (Color)"); break;
      case 938: document.write("Inbox Scan (Black)"); break;
      case 939: document.write("Remote Scan (Color)"); break;
      case 940: document.write("Remote Scan (Black)"); break;
      case 941: document.write("TX Scan/Fax (Color)"); break;
      case 942: document.write("TX Scan/Fax (Black)"); break;
      case 943: document.write("TX Scan/I-Fax (Color)"); break;
      case 944: document.write("TX Scan/I-Fax (Black)"); break;
      case 945: document.write("TX Scan/E-mail (Color)"); break;
      case 946: document.write("TX Scan/E-mail (Black)"); break;
      case 947: document.write("TX Scan/FTP (Color)"); break;
      case 948: document.write("TX Scan/FTP (Black)"); break;
      case 949: document.write("TX Scan/SMB (Color)"); break;
      case 950: document.write("TX Scan/SMB (Black)"); break;
      case 951: document.write("TX Scan/IPX (Color)"); break;
      case 952: document.write("TX Scan/IPX (Black)"); break;
      case 953: document.write("TX Scan/DataBase (Color)"); break;
      case 954: document.write("TX Scan/DataBase (Black)"); break;
      case 955: document.write("TX Scan/Local Print (Color)"); break;
      case 956: document.write("TX Scan/Local Print (Black)"); break;
      case 957: document.write("TX Scan/Inbox (Color)"); break;
      case 958: document.write("TX Scan/Inbox (Black)"); break;

      default: break;
    }
  }
// ‚±‚±‚©‚ç‚Í MEAP SEND ƒJƒEƒ“ƒ^‚Ì’l
  else if( type_val >= 1000 && type_val <= 1999 )
  {
    switch(type_val)
    {
      case 1000: document.write("Total 1"); break;
      case 1001: document.write("Total  (Small)"); break;
      case 1002: document.write("Total  (Large)"); break;
      case 1003: document.write("Total  (Black and White 1)"); break;
      case 1004: document.write("Total  (Black and White/Small)"); break;
      case 1005: document.write("Total  (Black and White/Large)"); break;
      case 1006: document.write("Total  (Full Color 1)"); break;
      case 1007: document.write("Total  (Full Color/Small)"); break;
      case 1008: document.write("Total  (Full Color/Large)"); break;
      case 1009: document.write("Total  (single Color 1)"); break;
      case 1010: document.write("Total  (Single Color/Small)"); break;
      case 1011: document.write("Total  (Single Color/Large)"); break;
      default: break;
    }
  }
  else if( type_val >= 2000 && type_val <= 2999 )
  {
    switch(type_val)
    {
      case 2000: document.write("Scan (Total 1)"); break;
      case 2001: document.write("Scan  (Small)"); break;
      case 2002: document.write("Scan  (Large)"); break;
      case 2003: document.write("Black and White Scan (Total 1)"); break;
      case 2004: document.write("Black Scan  (Small)"); break;
      case 2005: document.write("Black Scan  (Large)"); break;
      case 2006: document.write("Color Scan (Total 1)"); break;
      case 2007: document.write("Color Scan  (Small)"); break;
      case 2008: document.write("Color Scan  (Large)"); break;
      default: break;
    }
  }
  else if( type_val >= 3000 && type_val <= 3999 )
  {
    switch(type_val)
    {
      case 3000: document.write("Color Scan 1"); break;
      case 3001: document.write("Color Scan 2"); break;
      case 3002: document.write("Color Scan 3"); break;
      case 3003: document.write("Color Scan 4"); break;
      default: break;
    }
  }
  else if( type_val >= 4000 && type_val <= 4999 )
  {
    switch(type_val)
    {
      case 4000: document.write("Black and White Scan 1"); break;
      case 4001: document.write("Black and White Scan 2"); break;
      case 4002: document.write("Black and White Scan 3"); break;
      case 4003: document.write("Black and White Scan 4"); break;
      default: break;
    }
  }
  else if( type_val >= 5000 && type_val <= 5999 )
  {
    switch(type_val)
    {
      case 5000: document.write("Free 1"); break;
      case 5001: document.write("Free 2"); break;
      case 5002: document.write("Free 3"); break;
      case 5003: document.write("Free 4"); break;
      case 5004: document.write("Free 5"); break;
      case 5005: document.write("Free 6"); break;
      case 5006: document.write("Free 7"); break;
      case 5007: document.write("Free 8"); break;
      case 5008: document.write("Free 9"); break;
      case 5009: document.write("Free 10"); break;
      case 5010: document.write("Send (Trial Version)"); break;
      case 5011: document.write("Free 12"); break;
      default: break;
    }
  }
}
</SCRIPT>

<script LANGUAGE="JavaScript">
function write_value(type_str, count_val){
  var str_len = type_str.length;
  if( str_len <= 3 && type_str != "0" )
  {
    if( "195" == type_str ||  "196" == type_str )
    {
      document.write("&nbsp;");
    }
    else
    {
      document.write(count_val);
    }
  }
  else
  {
    document.write("&nbsp;");
  }
}
</SCRIPT>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b><script language="JavaScript">write_index("112");</script></b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(112);</script></b></font></td>
<td align="right"><b><script language="JavaScript">write_value("112", 2789);</script></b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b><script language="JavaScript">write_index("113");</script></b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(113);</script></b></font></td>
<td align="right"><b><script language="JavaScript">write_value("113", 215094);</script></b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b><script language="JavaScript">write_index("122");</script></b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(122);</script></b></font></td>
<td align="right"><b><script language="JavaScript">write_value("122", 5330);</script></b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b><script language="JavaScript">write_index("123");</script></b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(123);</script></b></font></td>
<td align="right"><b><script language="JavaScript">write_value("123", 84163);</script></b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b><script language="JavaScript">write_index("501");</script></b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(501);</script></b></font></td>
<td align="right"><b><script language="JavaScript">write_value("501", 47990);</script></b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b><script language="JavaScript">write_index("301");</script></b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(301);</script></b></font></td>
<td align="right"><b><script language="JavaScript">write_value("301", 265103);</script></b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>



<!-- RUI_LEGACY_TAG -->
<tr><td width="10%">&nbsp;</td>
<td align="left">&nbsp;</td>
<td align="right">&nbsp;</td></tr>
<tr><td colspan="3" align="left" height="1"><hr></td></tr>
<script LANGUAGE="JavaScript">
if( has_send == "true")
{
if(has_fax == "true" )
{
document.writeln('<td colspan="3" height="13"><font face="Helvetica,Arial"><b>SEND</b></font>');
}
else
{
document.writeln('<td colspan="3" height="13"><font face="Helvetica,Arial"><b>SEND</b></font>');
}
}
else if(has_fax == "true" )
{
document.writeln('<td colspan="3" height="13"><font face="Helvetica,Arial"><b>FAX</b></font>');
}
else
{
document.writeln('<td colspan="3" height="13"><font face="Helvetica,Arial"><b>&nbsp;</b></font>');
}

</SCRIPT>
<font face="Helvetica,Arial"><b>Application ID : c610db1b-d9ae-4891-b215-e9b2766432f0</b></font></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b>&nbsp;</b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(2003);</script></b></font></td>
<td align="right"><b>12594</b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b>&nbsp;</b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(4000);</script></b></font></td>
<td align="right"><b>6973</b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b>&nbsp;</b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(4001);</script></b></font></td>
<td align="right"><b>6973</b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b>&nbsp;</b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(4002);</script></b></font></td>
<td align="right"><b>345</b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b>&nbsp;</b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(4003);</script></b></font></td>
<td align="right"><b>345</b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b>&nbsp;</b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(2006);</script></b></font></td>
<td align="right"><b>8125</b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b>&nbsp;</b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(3000);</script></b></font></td>
<td align="right"><b>8124</b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b>&nbsp;</b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(3001);</script></b></font></td>
<td align="right"><b>8124</b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b>&nbsp;</b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(3002);</script></b></font></td>
<td align="right"><b>109</b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b>&nbsp;</b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(3003);</script></b></font></td>
<td align="right"><b>109</b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>

<!-- RUI_LEGACY_TAG --><tr><td width="10%"><font face="Helvetica,Arial"><b>&nbsp;</b></font></td>
<td align="left"><font face="Helvetica,Arial"><b><script language="JavaScript">write_type(5010);</script></b></font></td>
<td align="right"><b>0</b></td></tr>
<tr><td colspan="3" align="left"><img src="en/media/dot_blue.gif" width="100%" height="1"></td></tr>



</table></p>
<p>
<hr>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td valign="bottom"><a href="javascript:scrollTo(0,0);"><img src="en/media/ba_ptp.gif" border="0" hspace="2" vspace="2" alt="Back to the Top on This Page" title="Back to the Top on This Page"></a></td>
</tr>
</table>
</form>
</body>

</html>

This is the Source of the counter page. I have no idea if i can do this with _IEBodyReadText or do i need to do some king of java reading ?

I want to read these values...

Total (Black/Large)

Total (Black/Small)

I haven't written anything , i am just asking which way i should follow.

Thanks in advance...

Link to comment
Share on other sites

Javascript DOES NOT EQUAL Java.

The Javascript produces rendered HTML on the webpage, so there is no need to worry about how it is generated.

Try some code.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...