file Object
Posted: January 3rd, 2011, 5:04 pm
Hi,
I have been using a dialog box to open a file and read from it.
var f=File.openDialog("select a file");
var ok=f.open("r");
This works great but now I want to have the filename in a variable instead of using a dialog box.
I thought it would be something like this below,
var f=File.open("test.txt");
var ok=f.open("r");
But it's not right.
Looking through docs, I cannot seem to find the correct syntax.
Thanks.
Phil
I have been using a dialog box to open a file and read from it.
var f=File.openDialog("select a file");
var ok=f.open("r");
This works great but now I want to have the filename in a variable instead of using a dialog box.
I thought it would be something like this below,
var f=File.open("test.txt");
var ok=f.open("r");
But it's not right.
Looking through docs, I cannot seem to find the correct syntax.
Thanks.
Phil