Javascript : Extracting text entry data fields from storyline with output CSV or txt

Hi all 

Need help. Tried several of the solutions posted on this forum but still can't seem to get the javascript to work. Im using windows 8.1 not sure if this matter. Below is the javascript that im using, let me know if there are any error you may find it. Or i would be thank ful if you can take a look at my storyline file. Thanks a million !!! 

Script : 

var fso = new ActiveXObject("Scripting.FileSystemObject");

var s = fso.OpenTextFile("C:\\Desktop\Enquiries.txt", 8, true, 0);
var player = GetPlayer();
var name = player.GetVar("TextEntry");
var email = player.GetVar("TextEntry1");
var telephone = player.GetVar("TextEntry2");
var enquiries = player.GetVar("TextEntry3");
s.WriteLine("Name: " + name);
s.WriteLine("Email: " + email);
s.WriteLine("Telephone: " + telephone);
s.WriteLine("Enquiries: " + enquiries);
s.WriteLine("==========");
s.Close();

 

3 Replies