Jump to content

Help! WinMenuSelectItem and ControlClick not working


Recommended Posts

Hi,

Newbie here. Am trying to automate the selection of Menu Items from Microsoft Outlook.

I've tried WinMenuSelectItem and nothing happens. Tried ControlClick and didn't get that to work

either. I think the later was due to not finding the proper ControlID.

Below is an example of the code.

Thanks in Advance!

;Open MS Outlook and open a new mail message

Run("C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE")

If Not WinWait("Inbox - Microsoft Outlook", "", 120) Then

WinMenuSelectItem("Inbox - Microsoft Outlook", "", "&File", "New", "Mail Message Ctrl+N")

Exit

EndIf

Sleep(10000)

;Tried the following but they don't seem to work either.

; ControlClick("Inbox - Microsoft Outlook", "", "[CLASS:MsoCommandBar; TEXT:Menu Bar; INSTANCE:1]")

; ControlClick("File", "", "[CLASS:MsoCommnadBarPopup; TEXT:New]")

; ControlClick("Inbox - Microsoft Outlook", "", "File")

If Not WinClose("Inbox - Microsoft Outlook") Then

Exit

Endif

If Not WinWaitClose("Inbox - Microsoft Outlook", "", 30) Then

Exit

Endif

Link to comment
Share on other sites

Hi,

I've tried including the following files: A3LMenu.au3 and A3LToolbar.au3

but get the following messages:

ERROR: can't open include file <A3LMenu.au3>

ERROR: can't open include file <A3LToolbar.au3>

I'm have version V3.2.10.0.

Where do I go from here?

Link to comment
Share on other sites

I'm have version V3.2.10.0.

Where do I go from here?

3.2.11.0

Edit: Nevermind, search for AutoItLib in the Example Scripts.. I'm not sure if that's even compatible with AutoIt anymore though, I uninstalled after it started giving me tons of errors with redeclaring constants that are already in AutoIt.

Edited by Achilles
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Hi,

I've tried including the following files: A3LMenu.au3 and A3LToolbar.au3

but get the following messages:

ERROR: can't open include file <A3LMenu.au3>

ERROR: can't open include file <A3LToolbar.au3>

I'm have version V3.2.10.0.

Where do I go from here?

Auto3Library was ported into AutoIt's standard UDF format.

So you must make some little script "accomodation".

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...