Couldn't write a file from java script

chidambaram

Well-known member
Joined
Dec 27, 2007
Messages
62
Location
Chennai,India
Programming Experience
Beginner
Hi,

I have called a script in my .net code which creates a .csv file and writes into it. The file is created and the program is executed without errors but the created file has nothing written into it. I'm able to create and write into the file from .net. Also, when the script is run separetly writes into the file correctly but not when it is called from .net. what could be the reason...

Someone pls guide me...
Thank You.
 
It's a vb.net program,not asp.net.., I ve given my code snippet...I m using VS2003.

I ve added Illustrator application as reference...
This is my vb.net code:

FormLoad()
illusapp = New Illustrator.Application
illusapp.DoJavaScriptFile("C:/Program Files/Adobe/Adobe Illustrator CS2/Presets/Scripts/attribute.jsx")

attribute.jsx has the following lines:
myfile=new File("C:/Documents and Settings/Administrator/Desktop/file.txt");
myfile.open("w",undefined,undefined);
myfile.write("hello");

The file is created but has nothing in it...
 
Last edited:
Back
Top