Message Hook Window is working, Added BAR sendKeys and fixed colon key.

Message Hook Window is working and will allow you to see all messages
being processed by a target window.
Had to build Message Hook Window inside the native MsgHook.dll was
having issues keep a java window's WndProc callback processing.
This commit is contained in:
Edward Jakubowski
2014-05-27 21:59:26 -04:00
parent b5ede5e6cb
commit da3326a5e4
51 changed files with 650 additions and 967 deletions

View File

@@ -1,3 +1,10 @@
/*
* Copyright 2014, Synthuse.org
* Released under the Apache Version 2.0 License.
*
* last modified by ejakubowski
*/
package org.synthuse.commands;

View File

@@ -1,3 +1,10 @@
/*
* Copyright 2014, Synthuse.org
* Released under the Apache Version 2.0 License.
*
* last modified by ejakubowski
*/
package org.synthuse.commands;
import java.io.*;

View File

@@ -1,3 +1,10 @@
/*
* Copyright 2014, Synthuse.org
* Released under the Apache Version 2.0 License.
*
* last modified by ejakubowski
*/
package org.synthuse.commands;
import org.synthuse.*;

View File

@@ -1,3 +1,10 @@
/*
* Copyright 2014, Synthuse.org
* Released under the Apache Version 2.0 License.
*
* last modified by ejakubowski
*/
package org.synthuse.commands;
import java.awt.Dimension;

View File

@@ -1,3 +1,10 @@
/*
* Copyright 2014, Synthuse.org
* Released under the Apache Version 2.0 License.
*
* last modified by ejakubowski
*/
package org.synthuse.commands;
import java.awt.Point;
@@ -18,9 +25,9 @@ public class MouseCommands extends BaseCommand {
if (handle.isEmpty())
return false;
String wtype = getWindowTypeWithXpath(args[0]);
System.out.println("wtype: " + wtype + " hwnd " + handle.hWnd + " hmenu " + handle.hmenuStr + " pos " + handle.hmenuPos);
//System.out.println("wtype: " + wtype + " hwnd " + handle.hWnd + " hmenu " + handle.hmenuStr + " pos " + handle.hmenuPos);
Point p = getCenterWindowPosition(handle, wtype);
System.out.println("cmdClick: " + p.x + "," + p.y);
//System.out.println("cmdClick: " + p.x + "," + p.y);
RobotMacro.mouseMove(p.x + parentProcessor.targetOffset.x, p.y + parentProcessor.targetOffset.y);
RobotMacro.leftClickMouse();
return true;

View File

@@ -1,3 +1,10 @@
/*
* Copyright 2014, Synthuse.org
* Released under the Apache Version 2.0 License.
*
* last modified by ejakubowski
*/
package org.synthuse.commands;
import org.synthuse.*;
@@ -152,4 +159,22 @@ public class WindowsCommands extends BaseCommand {
return true;
}
public boolean cmdSendCommandMsg(String[] args) {
if (!checkArgumentLength(args, 3))
return false;
WinPtr handle = findHandleWithXpath(args[0]); //xpath to HWND is first argument
if (handle.isEmpty())
return false;
int id = Integer.parseInt(args[1]); //context menu id is supplied as second argument
int idLparam = Integer.parseInt(args[2]); //context menu id is supplied as second argument
handle.convertToNativeHwnd();
//LRESULT result =
//System.out.println("Send Message WM_COMMAND to " + handle.toString() + " PARAMS: " + id + ", " + idLparam);
//api.user32.PostMessage(handle.hWnd, Api.WM_COMMAND, new WPARAM(id), new LPARAM(0));
api.user32.SendMessage(handle.hWnd, Api.WM_COMMAND, new WPARAM(id), new LPARAM(idLparam));
return true;
}
}