So here is the scenario... I'm writing a simple macro to check to see if a button is enabled. If yes... click it and log the transaction. If no log a "not ready transaction". I've done this before on a different control and it worked great. But now I'm having troubles after the 3rd time I try to get the control handle.
Here is my code:
//Set Focus
SetFocus>A Station
//Find the handle of the "Send" button
//Get handle of Options window
GetWindowHandle>A Station,hwndAStation
//Returns proper handle
//Get left pane handle (child of main window)
LibFunc>User32,FindWindowExA,hwndLeftPane,hwndAStation,0,WindowsForms10.Window.8.app.0.378734a,
//Returns proper handle
//Get control pane handle (page address controls)
LibFunc>User32,FindWindowExA,hwndPageControls,hwndLeftPane,0,WindowsForms10.Window.8.app.0.378734a,
//Returns proper handle
//Get button handle (send button)
LibFunc>User32,FindWindowExA,hwndBtnSend,hwndPageControls,0,WindowsForms10.BUTTON.app.0.378734a,Send
//Returns NOTHING!
//do stuff with handle for button in question
Basically everthing is working great until I try to get the last crontol handle. It keeps returning 0. I've tried many iterations but can't seem to get this to work...
For now I think I'll use the img lib functions to "see" if the button is enabled or disabled. I was hoping for a more graceful and efficient solution though.
Any help is greatly appreciated!
THANKS!