weevil Posted December 16, 2016 Share Posted December 16, 2016 (edited) Hi, I've got a funny window that doesn't seem to be playing ball. The Window info is below: No matter what I try, either by using the title, the class, bringing it into focus using WinExist IF statement, even just using "Send ("{ENTER}")" isn't working and the button is in focus!! expandcollapse popup>>>> Window <<<< Title: Reflection Workspace Class: #32770 Position: 401, 422 Size: 484, 189 Style: 0x94C801C5 ExStyle: 0x00010101 Handle: 0x003F1300 >>>> Control <<<< Class: Button Instance: 1 ClassnameNN: Button1 Name: Advanced (Class): [CLASS:Button; INSTANCE:1] ID: 2 Text: OK Position: 382, 124 Size: 88, 26 ControlClick Coords: 25, 22 Style: 0x50030000 ExStyle: 0x00000004 Handle: 0x005F0AC6 >>>> Mouse <<<< Position: 811, 593 Cursor ID: 0 Color: 0xCFCFCF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< OK Unable to locate Theme file: ProgramFilesFolder\Attachmate\Reflection\Private\Default\Users\Themes\Reflection2007.3270.themex. The default theme will be used. >>>> Hidden Text <<<< My code for this window at the moment is: While 1 If WinExists("[CLASS:#32770") Then MsgBox(0, "", "Win now exists") $hWnd = WinGetHandle("[Class:#32770]") Sleep(2000) ControlClick($hWnd, "", "[CLASS:Button1; INSTANCE:1]") Send("{ENTER}") Exit Else ContinueLoop EndIf WEnd As you can see I tried to manually press enter which just doesn't do anything, I've confirmed via ConsoleWrite debugging that the if statement does actually find the window, but nothing happens. WindowInfo also seems to find 3 distinct sections of the popup box. I've attached 3 images, each one has the windowinfo tool pointing at different bits - the button, the body and the title. How do I know which one autoit will see at any given time? Or will it see all 3? Very confused! Edited December 16, 2016 by weevil added more info Link to comment Share on other sites More sharing options...
Developers Jos Posted December 16, 2016 Developers Share Posted December 16, 2016 shouldn't that be?: ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]") Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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