View Single Post
  #2  
Old 03-23-2005, 10:48 PM
pjaquiery pjaquiery is online now
Registered User
 
Join Date: 01-19-2003
Location: Dunedin, New Zealand
Posts: 114
I use JScript all the time.

// Add a temporary macro
Application.Macros (0).Add ("EmailSuccess", success);

// Return the contents of a macro as a string
function GetStr (macroName)
{
var macro = Application.FindMacro (macroName);
if (macro == null)
return "";

return Application.ExpandMacros (macro);
}


// Load temporary macros from a file
var filename = "all.macros";
Application.Macros(0).Load (filename, false);

// Remove a temporary macro
Application.Macros (0).Remove ("ArchiveTimeStamp");

// Copy last step status to temporary macros
function SaveLast ()
{
tempMacros = Application.Macros (0);
sysMacros = Application.Macros (3);
tempMacros.Add ("SavedResult", sysMacros.item ("LASTSTEP_STATUS").value);
tempMacros.Add ("SavedOutput", sysMacros.item ("LASTSTEP_OUTPUT").value);
}
Reply With Quote