// Macro starter script -- basically a cheat-sheet of common commands
var oShell = WScript.CreateObject("WScript.Shell");
//oShell.AppActivate("Paint"); // Set focus to a program
//WScript.Sleep(500); // Delay for 1/2 second
//oShell.Run("notepad c:\\temp\\somefile.txt", 1, false); // launch a program
//----------------------------- can add ,2 to run minimized, true=wait for exit
//oShell.SendKeys("%F"); // Alt+F ----- SendKeys strings to jog my memory
//oShell.SendKeys("^C"); // Ctrl+C
//oShell.SendKeys("{ENTER}"); // Send Enter key (also tilde {~} )
//oShell.SendKeys("{{TAB} 2"); // Send Tab key twice )
//oShell.SendKeys(" "); // Send a space
var nResult= oShell.Popup("Do you want to continue?", 0, "My Macro", 4+32 );
if ( nResult==6 ) { // 6=Yes, 7=No,
WScript.Echo( "you said 'Yes!'" );
}
WScript.Echo( "done!" );