Code (Text): var item= document.evaluate('//b[. = " & msablist.Items.Item(x) & "]',document, null, ^ this.
I do debug and I have tested the model of how the JS programming works and it works. I just accidentally forgot to put quotes at the text, so JS treated it as a part of code instead of text to be viewed on a webpage.
You should test your actual program to see that it works. Models are idealistic. In practice, they will occasionally fail.
I changed that in v1.4 That's what I was referring to when I said I messed up with quotes. It's actually: Code (Text): var item= document.evaluate('//b[. = "" & msablist.Items.Item(x) & ""]',document, null, you need quotes (") wrapped around the item name. Or is that not what you are referring to?
Um, the code I'm using with v1.3 + Code (Text): gm.Items.Add("var item= document.evaluate('//b[. = "" & msablist.Items.Item(x) & ""]',document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);if (item.snapshotlength > 0){item = item.snapshotItem(0);selectedlink=item.previousSibling.previousSibling;window.location = selectedlink}return;}") so... the quotes ARE there... ? You are looking at old version.
Erm sorry to butt in but just wanna say that I didn't create the OCR script myself, it was all LaserWave's coding. Anyway, wouldn't it be better if you just used a loop for the item scanning thing? Like first, make a list of items you want: Code (Text): var items = /(Medicinal Soap|Cactopus Cream|etc...)/ Then if it finds the items in the shop, it clicks on it: Code (Text): if(document.body.innerHTML.indexOf(items) != -1) { var item= document.evaluate('//b[. = "+ items +"]',document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); if (item.snapshotLength > 0) { item = item.snapshotItem(0);selectedlink=item.previousSibling.previousSibling; window.location = selectedlink }return; } This is just a rough piece of coding, I'm pretty sure there are errors in the coding part but the general idea is there. Just an idea :/