When I excute below script twice, I cannot save AI file.
It's very strange.
- There is not error message when I excute my script.
- But when I save AI file after excute my script twice, save is not working. (illustrator is quiting without error message.)
- when I save AI file after excute my script one time, save is working.
I assume It's a matter of memory issue.
What I missed?
(I'm using windowsXP, illustrator CS3)
function getFileToWeb(){ if( webaccesslib == undefined ) { var pathToLib = "C:/Program Files/Adobe/Adobe Bridge CS3/webaccesslib.dll"; var libfile = new File( pathToLib ); var webaccesslib = new ExternalObject("lib:" + pathToLib ); } http = new HttpConnection("http://google.com") ; http.response = new File("c:/myfile.html") ; http.execute() ; http.response.close(); httpStatus = http.responseStatus; if(httpStatus == 200){ returntrue; } else{ returnfalse; }} if(getFileToWeb()){ var rect = activeDocument.pathItems.rectangle(10, 20, 30, 40) alert("success!"); }else{ alert("fail"); }