Please login or register.

Login with username, password and session length

Author Topic: [How-Do-I] Extract Macro Comments to a Report?  (Read 6002 times)

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
[How-Do-I] Extract Macro Comments to a Report?
« on: May 11, 2007, 01:35:27 PM »

I'd love to be able to put comments in my macros.
I've done the next best thing and used the note field on my modules and macros.
Is there anyway, preferably as a report, to print a list of comments with their associated modules and macros?
Logged
BVC let's me tell my camera where to go!
:) Murphy is my beta testing pal. He helps me find problems whether I like it or not. :)

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
Re: [How-Do-I] Extract Macro Comments to a Report?
« Reply #1 on: May 12, 2007, 11:03:15 AM »

Doing a hard drive search, I found the comments in the the file "X10Active.xml" in my directory "C:\Documents and Settings\All Users\Application Data\X10 Settings". I would be nice if there was an easy way to extract comments from the file to a useful report.
Logged
BVC let's me tell my camera where to go!
:) Murphy is my beta testing pal. He helps me find problems whether I like it or not. :)

TakeTheActive

  • Hero Member
  • *****
  • Helpful Post Rating: 126
  • Posts: 1047
  • Old !@#$% Tinkerer!
Re: [How-Do-I] Extract Macro Comments to a Report?
« Reply #2 on: May 12, 2007, 02:44:06 PM »


...It would be nice if there was an easy way to extract comments from the file to a useful report.

An .XML file is lines and lines of ASCII text bracketed by <TAGS>. From my research MONTHS ago (desiring a report from a ReplayTV .XML file - never finished), you can write some VBScript/JavaScript inside an .HTML file and run it under IE (or Firefox I presume):

Quote

<html>
<body>
<title>Parse_XML01 from W3Schools</title>
<script type="text/vbscript">
set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("cd_catalog.xml")
set title=xmlDoc.getElementsByTagName("TITLE")
set artist=xmlDoc.getElementsByTagName("ARTIST")
set cdyear=xmlDoc.getElementsByTagName("YEAR")
document.write("<table align=center valign=top border=4>")
document.write("<tr><td align=center colspan=4><b>Processing Root Node: </b>" & xmlDoc.documentElement.nodeName & "</td></tr>")
document.write("<tr><td><b>Row</b></td><td align=center><b>Title - </b>" & xmlDoc.documentElement.childNodes(0).firstChild.nodeName & "</td><td align=center><b>Artist - </b>" & xmlDoc.documentElement.childNodes(0).firstChild.nextSibling.nodeName & "</td><td align=center><b>Year - </b>" & xmlDoc.documentElement.childNodes(0).firstChild.nextSibling.nodeName & "</td></tr>")

for i = 1 to title.length
  document.write("<tr><td align=right>" & i & "</td><td>" & title.item(i-1).text & "</td><td>" & artist.item(i-1).text & "</td><td align=center>" & cdyear.item(i-1).text & "</td><td><br /></tr>")
next

document.write("</table>")

</script>
</body>
</html>

Diehards could also, I suppose, do similar extractions via *ANY* language, BASIC for example (MBasic, QBasic, VBasic...)
« Last Edit: May 12, 2007, 03:20:58 PM by TakeTheActive »
Logged
Low Post Count != Low Knowledge - High Post Count != High Knowledge ;)

ADVICE TO X-10 NEWBIES FROM AN X-10 OLD-TIMER
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.