#define LP(str) list2params(list(str))
src << output(LP("[ATK]"),"StatOutput:replaceATK")
///
<head>
<script type="text/javascript">
function replaceATK(x){
document.getElementById('ATK').innerHTML = x;}
</head>
///
<span id="ATK">[ATK]</span>
Problem description:
The above code uses JavaScript to replace text strings in an Output window. It works fine for MOST people, however some users complained that it doesn't work for them, and it only updates when the whole output is rewritten (not just replaced by JavaScript, but completely refreshes).
Any possible causes?
Thanks!
That's not how copytext() works. If I recall correctly, copytext() has a signature of copytext(text, integer, integer), where the second integer is optional. You have to give it the number of the position in the text string to copy from, which in your case could be the value returned by findtext().
So something more like
copytext(charging, findtext(charging, " Fired"))
Check out the reference entry for copytext() for the particulars. It will explain the exact usage.