Jump to content

[Closed] How to Call a MenuItem when the Menu is not a Standard Menu?


Zohar
 Share

Recommended Posts

Hello

For many applications, you can call a MenuItem from the MenuBar via the WinMenuSelectItem() function.

There are some applications tho, that don't use the standard menu, but something else.

For Example:

- Skype

- Windows Explorer/Internet Explorer

and some more

Can someone tell me how can I call a certain MenuItem of those 2 applications for example?

(there should be a way, for example via Windows Messages - but how do I know which message to send, out of the tens of messages that I catch with Winspector/Spy++)

Thank you

Edited by Zohar
Link to comment
Share on other sites

I didn't try WinMenuSelectItem() with the apps you mentioned but you can use Send() as long as you know the accelerators.

Opt("WinTitleMatchMode", 2)
$sTitle = "Internet Explorer"
Do
    Sleep(100)
Until ProcessExists("iexplore.exe")
WinWaitActive($sTitle)
Sleep(1000)
Send("!f")
Sleep(1000)
Send("t")

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Hi GEOSoft and thank you for your reply

Yeah, that's what I currently use, as a workaround,

but the problem with it, is that it shows the menus, and it flickers(when it's done fast).

WinMenuSelectItem() spares you this problem, in applications that have a standard menu.

From what I understood, when having an application that has a non-standard menu,

you can send a Windows Message(via _SendMessage()) to activate a desired MenuItem.

And that directly activates the MenuItem, without showing it.

Now I just need to know how to do it..

For example, how to find in Skype, how to activate some MenuItem...

Edited by Zohar
Link to comment
Share on other sites

Sorry, the only thing I can tell you about Skype is how to kill it. I wrote a script to do that for a few demented users.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

heh :D

ok. If anyone else knows, please help me..

I would really like to succeed calling a MenuItem in Skype(for example), without actually opening the menu.

I want it to be as simple and direct as WinMenuSelectItem().

please help me anyone

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...