For the life of me I can't figure out how to tweak the macro commands to create the output I need. My source text list looks like so:
and I'm trying to get my UltraEdit macro to loop through the above source list and create an "output.txt" file that would look like this:
My macro is not looping nor saving .. nor do I think my approach was correct. How would you revise the following macro I constructed listed below:
InsertMode
ColumnModeOff
HexOff
UnixReOff
Loop
IfEof
ExitMacro
Else
ClearClipboard
Clipboard 0
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 1
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 2
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 3
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 4
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 5
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 6
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 7
StartSelect
Copy
EndSelect
NewFile
"document.write('<table width="100%" border="0" cellspacing="0" cellpadding="1">');
document.write('<tr valign=top><td width="1%">');
document.write('<a href="
Clipboard 0
Paste
"><img src=discounts/"
Clipboard 1
Paste
"sm.gif alt="
Clipboard 2
Paste
" width="
Clipboard 3
Paste
" height="
Clipboard 4
Paste
" hspace=0 vspace=0 border=1></a>');
document.write('<br><img src=images/space.gif width=100 height=1 border=0 alt="
Clipboard 2
Paste
"></td></tr><tr><td bgcolor=#ffffff>');
document.write('<font face=Arial,Helvetica,Geneva,Swiss,SunSans-Regular><a href="
Clipboard 0
Paste
"><b>"
Clipboard 2
Paste
"</b></a></font><br>');
document.write('<font face=
Arial,Helvetica,Geneva,Swiss,SunSans-Regular size=-1>');
document.write('<b>WAS</b>
$<strike>"
Clipboard 5
Paste
"</strike> <b>NOW <font color=#FF0000>$"
Clipboard 6
Paste
"</font></b>!');
document.write('</font>');
document.write('</td></tr></table><p>');"
EndSelect
Key END
"
"
Key DOWN ARROW
ClearClipboard
EndLoop
SaveAs "output.txt"
CloseFile
Sincerely,
Theodore
Code: Select all
genpage.php?category=Beer+Steins&subcategory_1=Steins&start=50
k-285
Bayern Beer Stein
103
70
45.00
40.50
genpage.php?category=Beer+Mugs&subcategory_1=Steins&start=150
z123456
German Beer Mugs
99
70
85.00
80.50
Code: Select all
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="1">');
document.write('<tr valign=top><td width="1%">');
document.write('<a href=genpage.php?category=Beer+Steins&subcategory_1=Steins&start=50><img src=discounts/k-285sm.gif alt=Bayern Beer Stein width=103 height=70 hspace=0 vspace=0 border=1></a>');
document.write('<br><img src=images/space.gif width=100 height=1 border=0 alt=Bayern Beer Stein></td></tr><tr><td bgcolor=#ffffff>');
document.write('<font face=Arial,Helvetica,Geneva,Swiss,SunSans-Regular><a href=genpage.php?category=Beer+Steins&subcategory_1=Steins&start=50><b>Bayern Beer Stein</b></a></font><br>');
document.write('<font face=Arial,Helvetica,Geneva,Swiss,SunSans-Regular size=-1>');
document.write('<b>WAS</b> $<strike>45.00</strike> <b>NOW <font color=#FF0000>$40.50</font></b>!');
document.write('</font>');
document.write('</td></tr></table><p>');
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="1">');
document.write('<tr valign=top><td width="1%">');
document.write('<a href=genpage.php?category=Beer+Mugs&subcategory_1=Steins&start=150><img src=discounts/z123456sm.gif alt=German Beer Mugs width=99 height=70 hspace=0 vspace=0 border=1></a>');
document.write('<br><img src=images/space.gif width=100 height=1 border=0 alt=German Beer Mugs></td></tr><tr><td bgcolor=#ffffff>');
document.write('<font face=Arial,Helvetica,Geneva,Swiss,SunSans-Regular><a href=genpage.php?category=Beer+Mugs&subcategory_1=Steins&start=150><b>German Beer Mugs</b></a></font><br>');
document.write('<font face=Arial,Helvetica,Geneva,Swiss,SunSans-Regular size=-1>');
document.write('<b>WAS</b> $<strike>85.00</strike> <b>NOW <font color=#FF0000>$80.50</font></b>!');
document.write('</font>');
document.write('</td></tr></table><p>');
InsertMode
ColumnModeOff
HexOff
UnixReOff
Loop
IfEof
ExitMacro
Else
ClearClipboard
Clipboard 0
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 1
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 2
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 3
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 4
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 5
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 6
SelectLine
StartSelect
Copy
EndSelect
Key END
Key HOME
Clipboard 7
StartSelect
Copy
EndSelect
NewFile
"document.write('<table width="100%" border="0" cellspacing="0" cellpadding="1">');
document.write('<tr valign=top><td width="1%">');
document.write('<a href="
Clipboard 0
Paste
"><img src=discounts/"
Clipboard 1
Paste
"sm.gif alt="
Clipboard 2
Paste
" width="
Clipboard 3
Paste
" height="
Clipboard 4
Paste
" hspace=0 vspace=0 border=1></a>');
document.write('<br><img src=images/space.gif width=100 height=1 border=0 alt="
Clipboard 2
Paste
"></td></tr><tr><td bgcolor=#ffffff>');
document.write('<font face=Arial,Helvetica,Geneva,Swiss,SunSans-Regular><a href="
Clipboard 0
Paste
"><b>"
Clipboard 2
Paste
"</b></a></font><br>');
document.write('<font face=
Arial,Helvetica,Geneva,Swiss,SunSans-Regular size=-1>');
document.write('<b>WAS</b>
$<strike>"
Clipboard 5
Paste
"</strike> <b>NOW <font color=#FF0000>$"
Clipboard 6
Paste
"</font></b>!');
document.write('</font>');
document.write('</td></tr></table><p>');"
EndSelect
Key END
"
"
Key DOWN ARROW
ClearClipboard
EndLoop
SaveAs "output.txt"
CloseFile
Sincerely,
Theodore