WoodGrain Posted September 12, 2016 Share Posted September 12, 2016 (edited) 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 expandcollapse popup>>>> 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 Edited September 12, 2016 by WoodGrain Additional information. Link to comment Share on other sites More sharing options...
AutoBert Posted September 12, 2016 Share Posted September 12, 2016 You are using x,y params wrong, when used the coords must be the ControlClick Coords: 81, 138 not the absolut MousePos coords. Link to comment Share on other sites More sharing options...
WoodGrain Posted September 13, 2016 Author Share Posted September 13, 2016 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 More sharing options...
WoodGrain Posted September 13, 2016 Author Share Posted September 13, 2016 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()? expandcollapse popup>>>> 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 More sharing options...
WoodGrain Posted September 22, 2016 Author Share Posted September 22, 2016 1st bump. Link to comment Share on other sites More sharing options...
Danyfirex Posted September 23, 2016 Share Posted September 23, 2016 Hello. Two options. 1.- Use mouse positions. 2.- Use IUIAutomation Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now