Home › Forums › General XMetaL Discussion › Automatically Update Macros for Writers › Reply To: Automatically Update Macros for Writers
Reply to: Automatically Update Macros for Writers
January 9, 2012 at 10:55 pmyeah you could proboly do something similar to this:
[code]function updateMacros() {
var fso = new ActiveXObject(“Scripting.FileSystemObject”);
var path = “\\
//if offline end
if(!fso.FolderExists(path)) {
return;
}
var wshell = new ActiveXObject(“WScript.Shell”);
var appData = wshell.ExpandEnvironmentStrings(“%appdata%”);
var dest = appData + “\SoftQuad\XMetaL\6.0\XMetaL.mcr”
fso.CopyFile( path, dest , true)
Application.RefreshMacros()
}
[/code]