Sign in to follow this  
Followers 0
lolcat

ControlClick - ToolbarWindow32

4 posts in this topic

Hi,

New to AutoIT and scripting in general, please bear with me.

I'm trying to automate the process of exporting a config and license file from a video management software called exacqVision.

So far this is what I have =) Launching the .exe, waiting for a server login and maximizing the window.

Run("c:\Program Files (x86)\exacqVision\client\edvrclient.exe")
Sleep (5000)
WinSetState ("exacqVision Klient", "ID_MAIN_SPLITTER", @SW_MAXIMIZE )

The next step should be navigating to the config page by clicking the correct button in the top toolbar. The Toolbar has 3 buttons and using AutoIT Window Info shows that all three have the same info, only differences are the ControlClick Coords.

Here is what I'm trying, which doesn't seem to do anything atm.

ControlClick("exacqVision Klient", "[CLASS:ToolbarWindow32; INSTANCE:1]", "Primary", 1, 96, 21 )

Here's part of the Window Info summary, fixed on the button I want to click:

>>>> Window <<<<
Title:  exacqVision Klient
Class:  wxWindowClassNR
Position:   -9, -9
Size:   1938, 1120
Style:  0x17CF0000
ExStyle:    0x00000100
Handle: 0x00000000001007C4

>>>> Control <<<<
Class:  ToolbarWindow32
Instance:   1
ClassnameNN:    ToolbarWindow321
Name:   
Advanced (Class):   [CLASS:ToolbarWindow32; INSTANCE:1]
ID: 654
Text:   
Position:   1, 1
Size:   117, 39
ControlClick Coords:    96, 21
Style:  0x52000141
ExStyle:    0x00000000
Handle: 0x00000000000A0A56

>>>> Mouse <<<<
Position:   97, 22
Cursor ID:  0
Color:  0x666666

>>>> StatusBar <<<<
1:  
2:  1733,20 kB/s
3:  23. februar 2011
4:  10:11:27
5:  

>>>> ToolsBar <<<<
1:  309 
2:  310 
3:  311

I'm a bit lost and would appreciate any pointers!

Share this post


Link to post
Share on other sites



lolcat,

Welcome to the Autoit forum. :)

You have missed out the "text" parameter! :idiot:

Try this: :idiot:

ControlClick("exacqVision Klient", "", "[CLASS:ToolbarWindow32; INSTANCE:1]", "Primary", 1, 96, 21 )

Does it work now? ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Hi Melba23,

Thanks for the quick reply!

Yes, you are right, I was missing the text parameter. I added it but there was no noticeable difference when executing the script.

Could it be the coords are wrong? I'm using the default Coord Mode "Screen" in Window Info.

Any other information I can provide to help troubleshoot this further?

Regards

laughing feline

Share this post


Link to post
Share on other sites

lolcat,

I have had very variable results when using ControlClick on multiple "button" but actually single control items like this. It all seems to depend on the app itself as to whether it works or not. :)

I have often found it better to use MouseClick - although then you need a bit of computation to get the GUI position and the position of the "button" within the GUI translated into screen coords. But that is what AutoIt is good at, so it hardly has any effect on the speed of response. Give it a go - you know where we are if you run into trouble. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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