Sign in to follow this  
Followers 0
jgshier

Outlook

4 posts in this topic

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



#2 ·  Posted (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 by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0