Jump to content
Sign in to follow this  
Astinov

Activate menu items in a ribbon

Recommended Posts

Astinov

I am new to AutoIt. Trying to activate the "Resize" menu item in MS Paint but with no success. I am using Windows 8.1 Enterrpise and Paint.exe is with a ribbon UI. Anybody help...

Here is my (stupid) code:

=====================================

#include <MsgBoxConstants.au3>


$WinName = "[CLASS:MSPaintApp]"


    ; Test if the window exists and display the results.
    ;If WinExists("[CLASS:MSPaintApp]") Then

   If WinExists($WinName) Then
        MsgBox($MB_SYSTEMMODAL, "", "Window exists")
    Else
        MsgBox($MB_SYSTEMMODAL, "", "Window does not exist")
    EndIf

WinActivate($WinName)


$Result = WinMenuSelectItem($WinName, "", "&Home", "Resize")

;Send ("^W", flag = 0)
;Send ("!f")


sleep (5000)

============ and here is the "Resize" function, which I want to activate

Edited by Astinov

Share this post


Link to post
Share on other sites
Astinov

Tx computergroove, but still no effect. The script works correctly till the line

WinActivate($WinName)

I inserted your code after this line but...

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  

×