Announcement

Collapse
No announcement yet.

Newbie Question: VBS to ASP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Newbie Question: VBS to ASP

    What's the quickest way to convert a VBS page to an ASP page. I have been using the same VBS page (always modifying it) for a couple of years now and want to convert it to an ASP page and want to be able to use WEB wrapper, etc. Thanks in advance for your help...here is the beginning of the VBS script that I am using:

    ' Left Column of Status Display
    response.Send "<tr>"
    response.Send "<td width='50%' valign='top'>"

    response.Send "<table border='0' cellpadding='0' cellspacing='1' width='100%')>"
    response.Send "<tr><td class='tableheader' colspan='2'>System Status</td></tr>"
    response.Send "<tr><td class='tablerowodd' align='absmiddle' width='150'>HomeSeer Version</td>"
    strVar = hs.version
    response.Send "<td class='tablecellcustom'>" & strVar & "</td>"
    response.Send "<tr><td class='tablerowodd' align='absmiddle' width='150'>HomeSeer Uptime</td>"
    strVar = hs.DeviceString("y1")
    response.Send "<td class='tablecellcustom'>" & strVar & "</td>"
    response.Send "<tr><td class='tablerowodd' align='absmiddle' width='150'>HomeSeer Views</td>"
    strVar = hs.WEBStatsPageViews
    response.Send "<td class='tablecellcustom'>" & strVar & "</td>"
    response.Send "<tr><td class='tablerowodd' align='absmiddle' width='150'>DooMotion Version</td>"
    strVar = hs.DeviceString("O20")
    response.Send "<td class='tablecellcustom'>" & strVar & "</td>"
    response.Send "<tr><td class='tablerowodd' align='absmiddle' width='150'>Temp05 Version</td>"
    strVar = hs.DeviceString("[50")
    response.Send "<td class='tablecellcustom'>" & strVar & "</td>"
    response.Send "<tr><td class='tablerowodd' align='absmiddle' width='150'>Temp05 Plugin Version</td>"
    strVar = hs.DeviceString("[60")
    response.Send "<td class='tablecellcustom'>" & strVar & "</td>"
    response.Send "</td></tr></table>"

    response.Send "<br><table border='0' cellpadding='0' cellspacing='1' width='100%')>"
    response.Send "<tr><td class='tableheader' colspan='4'>Security Status</td></tr>"
    response.Send "<tr><td class='tablerowodd' align='absmiddle'>Alarm Status</td>"
    strVar = alarmstatus
    response.Send "<td class='tablecellcustom'>" & strVar & "</td>"
    response.Send "<td class='tablerowodd' align='absmiddle'>Alarm UpTime</td>"
    strVar = hs.DeviceString("n3")
    response.Send "<td class='tablecellcustom'>" & strVar & "</td>"
    response.Send "<tr><td class='tablerowodd' align='absmiddle'>Garage Door</td>"
    strVar = doorstatus
    response.Send "<td class='tablecellcustom'>" & strVar & "</td>"
    response.Send "<td class='tablerowodd' align='absmiddle'>Occupancy</td>"
    strVar = hs.DeviceString("o17")
    response.Send "<td class='tablecellcustom'>" & strVar & "</td></tr>"
    response.Send "</table>"


    I am guessing at this time it is a straight forward process.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 20.04 / VB W7e Jetway JBC420U591
    Fanless IntelĀ® Celeron N3160 SoC 8Gb
    HS4 Pro - V4.1.18.1 - Ubuntu 20.04/VB W7e 64 bit Intel Kaby Lake CPU - 32Gb
    HSTouch on Intel tabletop tablets

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Smartthings hub, Hubitat Hub, and Home Assistant

    #2
    ...change the response.sends to response.writes. Enclode all response calls in <% %>. Like:
    <%
    response.write "test"
    %>

    Then change the file extention to asp.

    -Rupp
    -Rupp
    sigpic

    Comment


      #3
      Thank you Rupp. Decided to switch over to using the Quickview.asp as it resembles my old VBS status. Using the WEB plug in it works well. Want to move over to using the Ultralog view and status setup but currently having some issues setting it up.

      [This message was edited by Pete on Fri, 23 May 2003 at 08:08 PM.]
      - Pete

      Auto mator
      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
      HS4 Lite - Ubuntu 20.04 / VB W7e Jetway JBC420U591
      Fanless IntelĀ® Celeron N3160 SoC 8Gb
      HS4 Pro - V4.1.18.1 - Ubuntu 20.04/VB W7e 64 bit Intel Kaby Lake CPU - 32Gb
      HSTouch on Intel tabletop tablets

      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Smartthings hub, Hubitat Hub, and Home Assistant

      Comment

      Working...
      X