Ok, looks like this is a bug.
Even calling the update function using extendscript within the scripted plug-in doesn't work.
I'm currently doing the following:
Code:app.doScript(File("/C/Program Files (x86)/Adobe/Adobe InDesign CS5/Scripts/Scripts Panel/tested/export 1.vbs"), ScriptLanguage.visualBasic);
alert("!!");
var vLinks = myDocument.links;
alert(vLinks.length);
for(i=vLinks.length-1; i >= 0; i--){
alert(i);
vLinks[i].update();
}
alert("??");
//app.doScript(File("/C/Program Files (x86)/Adobe/Adobe InDesign CS5/Scripts/Scripts Panel/tested/testing.js"), ScriptLanguage.javascript);
//app.doScript(File("/C/Program Files (x86)/Adobe/Adobe InDesign CS5/Scripts/Scripts Panel/tested/export 2.vbs"), ScriptLanguage.visualBasic);
So I've split my code, VBS does the first pass and all my prep work, the JS does the updating of the links and then my other VB file goes off and does everything else I need it to.
My loop iterates through the links collection but doesn't actually execute the update (or at least the update doesn't do anything).
When I execute this same code directly from within the scripts palette it works.
I've also tried calling the file as a nested js file but that gave the same behaviour.
I'm pretty sure now it's not VBS related. If you can give me some examples of how I'd set the current directory that would be really useful.
Is there anything else I can try?
Thanks