#define SW_HIDE 0 #define SW_SHOWNORMAL 1 #define SW_SHOWMINIMIZED 2 #define SW_SHOWMAXIMIZED 3 #define SW_SHOWNOACTIVATE 4 #define SW_SHOW 5 #define SW_MINIMIZE 6 #define SW_SHOWMINNOACTIVE 7 #define SW_SHOWNA 8 #define SW_RESTORE 9 DECLARE INTEGER ShellExecute IN shell32; INTEGER hWindow, STRING lpOperation,; STRING lpFile, STRING lpParameters,; STRING lpDirectory, INTEGER nShowCmd LOCAL lcMail lcMail = "mailto:buddy1@somewhere.com" +; "?CC=buddy2@somewhere.com&Subject=Meet for lunch" +; "&Body=Please join me for a sandwich at noon." = ShellExecute(0, "open", lcMail, "", "", SW_SHOWNORMAL) DECLARE INTEGER FindWindow IN user32; STRING lpClassName,; STRING lpWindowName nRet = 0 DO WHILE nRet = 0 Ret = FindWindow(NULL, "Meet for lunch") ENDDO oShell=CREATEOBJECT("Wscript.Shell") oShell.SendKeys("%IA") oShell.SendKeys("c:\autoexec.bat") oShell.SendKeys("{TAB}{TAB}{ENTER}") * *!* To send automatically change the * *!* ShellExecute SW_SHOWNORMAL to SW_HIDE and add: * oShell.SendKeys ("%s") * Messagebox ("Message with attachment sent.")Is there a simple way to "SendKeys" using API ?