Jump to content

How do I click this button?


WoodGrain
 Share

Recommended Posts

Hi guys,

Trying to map my mouse button 4 (I'm pretty sure it's 4 rather than 5, but I can experiment) to click the back button in a program (screenshot attached). In terms of positioning it sits in the middle of 3 screens if that makes a difference.

I assume I can use something like (though I prob don't need the 1st two lines if using ControlClick?):

WinActivate("ConnectWise v2016.4 (41139)", "Chrome Legacy Window")
WinWaitActive("ConnectWise v2016.4 (41139)", "Chrome Legacy Window")
ControlClick("ConnectWise v2016.4 (41139)", "Chrome Legacy Window", "[CLASS:Chrome_RenderWidgetHostHWND; INSTANCE:1]", "Left", 1, 0, 30)

When I hover my mouse over the button I get the following information in Window Info

>>>> Window <<<<
Title:  ConnectWise v2016.4 (41139)
Class:  TabBrowser_MainFrame
Position:   -8, -8
Size:   1696, 1026
Style:  0x17CF0000
ExStyle:    0x00040100
Handle: 0x0000000000010C56

>>>> Control <<<<
Class:  Chrome_RenderWidgetHostHWND
Instance:   1
ClassnameNN:    Chrome_RenderWidgetHostHWND1
Name:   
Advanced (Class):   [CLASS:Chrome_RenderWidgetHostHWND; INSTANCE:1]
ID: 315622768
Text:   Chrome Legacy Window
Position:   0, 30
Size:   1680, 957
ControlClick Coords:    81, 138
Style:  0x56300000
ExStyle:    0x00000020
Handle: 0x0000000000040AC6

>>>> Mouse <<<<
Position:   81, 191
Cursor ID:  0
Color:  0x004E7F

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
ConnectWise: My Calendar
Chrome Legacy Window


>>>> Hidden Text <<<<
Chrome Legacy Window

 

Back Button.jpg

Edited by WoodGrain
Additional information.
Link to comment
Share on other sites

That should have been so obvious given the position of the button was not anywhere near 0, 30 lol. TBH, I had some issues figuring out the controlID, turns out the above was correct by using the "Advanced (Class)", so while I was posting I was trying to figure that out more so than the coords.

Those coords work, all working now, thanks AB

Link to comment
Share on other sites

Hmm, ok, so it's not working again, looks like the contolID is different...

Can someone advise what I can use in the ControlID field of the ControlClick()?

>>>> Window <<<<
Title:  ConnectWise v2016.4 (41139)
Class:  TabBrowser_MainFrame
Position:   -8, -8
Size:   1696, 1026
Style:  0x17CF0000
ExStyle:    0x00040100
Handle: 0x0000000000010C56

>>>> Control <<<<
Class:  Chrome_RenderWidgetHostHWND
Instance:   2
ClassnameNN:    Chrome_RenderWidgetHostHWND2
Name:   
Advanced (Class):   [CLASS:Chrome_RenderWidgetHostHWND; INSTANCE:2]
ID: 314454488
Text:   Chrome Legacy Window
Position:   0, 30
Size:   1680, 957
ControlClick Coords:    81, 140
Style:  0x56300000
ExStyle:    0x00000020
Handle: 0x0000000000050980

>>>> Mouse <<<<
Position:   81, 193
Cursor ID:  0
Color:  0xFFFFFF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
ConnectWise: My Calendar
Chrome Legacy Window


>>>> Hidden Text <<<<
Chrome Legacy Window

 

Link to comment
Share on other sites

  • 2 weeks later...
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

×
×
  • Create New...