jgshier 0 Posted March 16, 2004 I am running Outlook 2003. I am try to run a script to close a vpn connection after outlook closes., but can't get autoit to see outlook. WinWaitClose("Inbox - Microsoft Outlook") do something... I used windows spy to make sure it was the right window. Seems to work fine with Notepad... Even WinWaitActive("Inbox - Microsoft Outlook") does not work. Thanks Share this post Link to post Share on other sites
scriptkitty 1 Posted March 16, 2004 (edited) Outlook and OutlookExpress have some wierd windows. like HiddenWindow and FolderSync Window Class. You can close them and really not notice any difference, at least I can't figure out what they do atm. I usually use the text part with outlook scripts, ex: AutoItSetOption("WinTitleMatchMode", 2);2 = Match any substring in the title winactivate("Outlook","Folder") or I just: AutoItSetOption("WinTitleMatchMode", 2) winclose("HiddenWindow") winclose("FolderSync") ;... rest of script edit.. WinXP and WinME have different hidden windows. and oh yea, I found it like this: AutoItSetOption("WinTitleMatchMode", 2) $title = WinGetTitle("Outlook", "") MsgBox(0, "Full title read was:", $title) Edited March 16, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites
nobby 0 Posted March 17, 2004 Hey, Instead of getting the window title, why not use the ProcessExists function? If ProcessExists("Outlook.exe") then rest of script Cheers CheersNobby Share this post Link to post Share on other sites
scriptkitty 1 Posted March 17, 2004 oops, funny how I didn't read the first part of the question, yea process would be better, like maybe: ProcessWaitClose ( "Outlook.exe" ); optional [, timeout] AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites