I develop using Eclipse [Mars, Java 8 JRE]. As you may know, Eclipse UI has some interface usability issues, and I needed some macros to make quality-of-life improvements. Attached is a snippet showing an issue with SetFocus and this style of window. I have worked with the Windows class and Visual Studio to work with GUI handles before, so I know that Java windows are not really Windows windows

, so it's hard to execute Windows window commands on things that are not really Windows windows. But, I thought I should be able to at least set the focus to the Java window and be able to execute keyboard shortcuts against that window. Also, I tried using the mouse commands after setting the focus, and it would not let me run mouse commands against the Java window.
The following snippet should locate the Windows handle for the Java eclipse instance, focus it, get the screen resolution and move the mouse into the X on the top right-hand corner of the screen (and click it). This is a simple repro for the issue, I certainly would like to do more complicated eclipse shortcuts using macro scheduler. The following code does find the eclipse instance and bring it into the foreground, but the mouse command never executes.I substituted the mouse for a simple keyboard character, and that did not work either.
Code: Select all
Let>WIN_REGEX=1
Let>WIN_USEHANDLE=1
GetWindowHandle>(.*?-) Eclipse,hWnd
Assigned>hWnd,eclipse_found
IF>%eclipse_found%=TRUE
SetFocus>hWnd
WaitWindowFocused>hWnd
GetScreenRes>nWidth,nHeight
Sub>nWidth,10
MouseMove>nWidth,10
LClick
ENDIF
Edit: I decided to make a separate topic for this issue, but I have a suspicion that the reason quickbuttons doesn't work with eclipse is the same reason that macro scheduler is having an issue. So if we could solve one, we might solve two.