directory - Scripting.FileSystemObject location (from JavaScript) -
i have file windows sidebar gadget stores settings user, fso object seems pick native residence desktop, meaning if don't specify directory, put file on desktop. specify whole location, want able put on other people's computers without having stuff on desktop or elsewhere besides gadget folder.
i know possible in xmlhttprequest, i've had trouble in past, , better if avoid altogether, if possible.
function writesetting(text) { var fil = new activexobject("scripting.filesystemobject"); var writer = fil.opentextfile("loc.txt", 2, true); writer.writeline(text); writer.close(); }
use system.gadget.path
property gadget's path , append needed. see example in link.
happy coding.
Comments
Post a Comment