Jump to content
Sign in to follow this  

How to search ControlID button in the program?

Recommended Posts

Hi folks,

I am newbie

In regard to my previous post http://www.autoitscript.com/forum/index.php?showtopic=116834 I started new thread (sorry I didn't get further answer that I anticipated and I thought no one would check in anymore).

Here's the problem:

In the program LANView I need to press the "Start" button (to start measure traffic from WiFi adapter in my WLAN) using AutoIt script. Below I attach two screens from the software:

Screen1. Overview program post-58881-12790287841302_thumb.jpg

Screen2. left field menu where the buttons are placed. post-58881-12790287912679_thumb.jpg

I tried to use AU3Info to grab information about Control ID's, classes etc. (AU3Info borders everything same as in Screen2), but It seems there are no controlID button to which I can refer. Just see this code:

>>>> Window <<<<
    Title:   LANView 3.1.0 - TSRh Team
    Class:   TfrmMain
    Position:   -8, -8
    Size:   1296, 786
    Style:   0x17CF0000
    ExStyle:   0x00010100
    Handle:   0x00070800

    >>>> Control <<<<
    Class:   TJvOutlookBar
    Instance:   1
    ClassnameNN:   TJvOutlookBar1
    Advanced (Class):   [CLASS:TJvOutlookBar; INSTANCE:1]
    ID:   329370
    Position:   0, 64
    Size:   129, 660
    ControlClick Coords:   36, 258
    Style:   0x54000000
    ExStyle:   0x00000000
    Handle:   0x0005069A

    >>>> Mouse <<<<
    Position:   36, 342
    Cursor ID:   0
    Color:   0xA6CAF0

    >>>> StatusBar <<<<

    >>>> ToolsBar <<<<

    >>>> Visible Text <<<<                (
    Traffic Monitor: Done

    >>>> Hidden Text <<<<

The only available control uses TJvOutlookBar class. I googled TJvOutlookBar and checked this is some Delphi libary from JVCL package, commonly used to create left menu same as eg. Outlook. To me it means nothing, I am no programmer. ;]

Anyway...meanwhile I was checking different tags from AU3Info "Control" section I noticed that only changes ControlClick Coords values. I do not know if this might be helpful?

Once again I kindly ask for your help, because I don't know what to do.

Share this post

Link to post
Share on other sites

I don't think you are going to get handles or ControlID to the individual icon/buttons on that toolbar.

You would have to ControlClick() to the appropriate coordinates, or maybe use shortcuts.

Can you 'start' via the keyboard with something like Alt-f, Alt-s? If so, you could ControlSend() those keystrokes.


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post

Link to post
Share on other sites

P.S Someone suggested me to use ImageSearch libary (I tried to search something about it on the forum,but returned 10 pages makes me fell confused),

which recognize buttons as pictures and tries to find them on the screen and click it.

But I don't know if this will work out, especially when I want run script on different computers with different: screen resolution, settings etc.

Share this post

Link to post
Share on other sites

So here is the issue. You are trying to get a button within a control - the 'button' may not be registered within windows so you may not be able to get it. Its like trying to get the control handle of an element within a list control, you just can't do that in that way. I would believe the AutoIt Info tool is correct in what it returns and if it does not see the difference between them its going to be heard.

A simple solution might be using MouseMove and MouseClick. Also have a look at MouseCoordMode option.

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...