I'd like to create an application that can do the follow things: 1. can record keys the user clicked into macro, and save it to a hot key. at any time if the user click the hot key, it is equivalent that the recorded keys are clicked. 2. note that the hot key should be able to apply to any other program running on my windows.
just like some cheating tools for the game Simulator. i think it should use macro, but i'm new to it. there isn't any package about macro in java api. i searched this topic in www.google.com but didn't find any tutorial or example about it, any suggestion would be highly appreciated!
> It is possible, > here is how. > > 1. Read about Windows/win 32 HOOK functions > > 2. there is hook.DLL in both VB and C++ prog. > > 3. use the JNI and get the Functions of hook.dll > > 4. use the Keyboard hook dll
While this may work, it ties the code to Windows. Why write in Java if it will only work on Windows? You might as well use a Windows-only language (i.e. VB or VC++).