Kode driller
jeg får denne fejl. kan ikke få variablen catWord til at virke.Hvad er der galt, har prøvet mange ting.
fejl fra JavaScript Debugger
*******************************
Acrobat EScript Built-in Functions Version 10.0
Acrobat SOAP 10.0
catWord is not defined
10:Batch:Exec
ReferenceError: catWord is not defined
10:Batch:Exec
********************************
Her er koden.
for (var p = 0; p < this.numPages; p++)
{
var numWords = this.getPageNumWords(p);
for (var i=0; i<numWords; i++)
{
var ckWord = this.getPageNthWord(p, i, true);
if (ckWord == catWord) <======== Se her.
{
var q = this.getPageNthWordQuads(p, i);
// Convert quads in default user space to rotated
// User space used by Links.
m = (new Matrix2D).fromRotated(this,p);
mInv = m.invert()
r = mInv.transform(q)
r = r.toString()
r = r.split(",");
l = addLink(p, [r[4], r[5], r[2], r[3]]);
l.borderColor = color.red;
l.borderWidth = 1;
l.setAction("this.getURL('http://www.molehunter.com/')");
}
}
}
this.pageNum = 0;
function GreateLink()
{
{
var catWord = "Electricity";
p
}
}