// ************************ get Date *************************** date = new Date(); y = date.getFullYear(); mo = date.getMonth(); mo1 = mo+1; d = date.getDate(); yd = d-1; h = date.getHours(); mi = date.getMinutes(); Today = y + "/" + mo1 + "/" + d; Time = h + ":" + mi; Memo.text += "\n" +Today+ ", " +Time+ "\n"; // ***************** Output *********************************** function record(){ Memo.text += title+ ": " +url+ "\n"; //\nTag: " + "" +title+ "\n if (title.length>40){ title=title.substr(0,40)+"..."; } var comment = prompt("\nEnter comment for \""+title+"\" : "); d = new Dialog; s1 = d.openFile('Select a file to save the link.','favorites.html'); s2 = s1.replace('.+\\(.+?\.[htm|html])','$1'); f = new File(s2); if (f.exists()=='false'){ f.open('w'); //print ("Created a new file, save.html."); f.write("My favorites
\n\n
"); f.close(); } f.open('w'); f.seek(f.length-31); f.write("" +title+ "" +comment+ "\n\n"); f.write(""); f.close(); } // func record // ***************** GetActiveObject *********************************** html=""; url=""; title=""; Shell = WScript.CreateObject("Shell.Application"); Windows=Shell.Windows(); for (var i=0; i