Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

File.open("e") problem???

$
0
0

this is the (js) file to edit:

 

//
var pdfResolution = 70 ;
var skale = 1 ;
var pdfSourcePath = "/c/Eigene%20Dateien/Eigene%20Bilder/schi/DSC01176_pdfs/";
var jpgTargetPath = "/c/Eigene%20Dateien/Eigene%20Bilder/schi/DSC01176_pdfs/";
//test
...and more

 

skript is file:

skript.open("e");

set text:

     var tex= "var pdfResolution = " + res + " ;";     tex += "\nvar skale = " + ms+" ;"     tex += "\nvar pdfSourcePath = \"" + p+"/"+n.split(".")[0]+"_pdfs/\";"     tex +="\nvar jpgTargetPath = \"" + p+"/"+n.split(".")[0]+"_pdfs/\";"

read the first line to move the pointer and write:

     skript.readln();     skript.writeln(tex);

i also tried write instaed of writeln, or writeln 4 single lines.

just for testing:

     skript.writeln("blub");     var test = skript.readln();     alert(test)

 

file (skript) is opened in my editor or not, with "observe Changes" feature or not, no difference.

 

problem is, some times the file is not written correctly.

lines or parts of it are deleted or added.

every combination I've tried, sometimes it produces Failures.

and writeln("blub"), never works!?

test is sometimes //test, st, or nothing!?

 

So, dear reader, if you have an idea, please let me know.

Chris

 

at the end, of course:

     skript.close(); skript=null;

Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>