Sign in to follow this  
Followers 0
spyro

Throwing everything but the kitchen sink at this control

5 posts in this topic

Thanks to SmOke_N I have a script that finds ClassNameNN for me which works great. The problem is every which way I call a certain menu, the script acts differently. Here is some example data

ClassNameNN "App10.12345"

The menu option which I am calling goes like this

&File -> &New -> OptionName

New is the first option under File then the menu splits to the right and OptionName is the first item also. I need to call the directly and now by up, down, left, right

I have tried Various control send options such as

ControlSend("MainWindow","",App10.12345,"{altdown}")

Sleep(1000)

ControlSend("MainWindow","",App10.12345,"fn")

Sleep(1000)

ControlSend("MainWindow","",App10.12345,"{altup}")

Sleep(1000)

ControlSend("MainWindow","",App10.12345,"{enter}")

along with multiple other variations. I have also tried WinMenuSelectItem which did not seem to do anything to the application. This app is written using a .Net framework and probably non standard controls. Any Ideas on the best way to call this menu option which will give me the same results every time?


www.SecurityDistro.com

Share this post


Link to post
Share on other sites



Sounds like you have a Toolbar acting like a menu (ie. like Explorer). If so, you might want to take a look at the Auto3Lib Toolbar and Menu libraries. They allow you to click a menu by accelerator or button id and capture the popup menu that appears afterward.


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

Sounds like you have a Toolbar acting like a menu (ie. like Explorer). If so, you might want to take a look at the Auto3Lib Toolbar and Menu libraries. They allow you to click a menu by accelerator or button id and capture the popup menu that appears afterward.

I have actually read through and tried to use some functions in that library. I think I need a get started tutorial or something because I didn't get to far, my fault of course.

How do I retrieve some of the things that you mention in the library like $hWnd.

I read this:

$hWnd - Handle to the window containing the menu. Windows 98/Me and Windows

; 2000/XP: If this value is 0 and the $hMenu parameter represents a popup menu, the

; function will find the menu window.

I tried using the ClassNameNN and the Text but that didn't seem to do what I wanted. Can I get the handle using the AutoIt Window Info tool?

Thanks for any help. Still a newb to AutoIt


www.SecurityDistro.com

Share this post


Link to post
Share on other sites

NM, probably via the WinGetHandle function.


www.SecurityDistro.com

Share this post


Link to post
Share on other sites

Start with the demos and work from there. If you get stuck, PM me with an example and I'll help you out.


Auto3Lib: A library of over 1200 functions for AutoIt

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