The Artima Developer Community
Sponsored Link

Java Answers Forum
how to operate macro using java ?

3 replies on 1 page. Most recent reply: Mar 19, 2004 6:32 AM by twc

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
aj3423 aj

Posts: 16
Nickname: aj3423
Registered: Aug, 2003

how to operate macro using java ? Posted: Mar 17, 2004 8:35 PM
Reply to this message Reply
Advertisement
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!


Hagrid

Posts: 4
Nickname: hagrid
Registered: Sep, 2003

Re: how to operate macro using java ? Posted: Mar 19, 2004 2:59 AM
Reply to this message Reply
Well, I'm very curious if someone could write such an application in Java.

To my knowledge, without use of (much) native code, Java applications cannot "catch"/"send" keystrokes from/to other applications.

Viswanatha Basavalingappa

Posts: 84
Nickname: viswagb
Registered: Nov, 2003

Re: how to operate macro using java ? Posted: Mar 19, 2004 5:18 AM
Reply to this message Reply
Hi,

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

try
hope this info helpfull
Viswa
---------
then

twc

Posts: 129
Nickname: twc
Registered: Feb, 2004

Re: how to operate macro using java ? Posted: Mar 19, 2004 6:32 AM
Reply to this message Reply
> 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++).

Flat View: This topic has 3 replies on 1 page
Topic: Use of Static Variables Previous Topic   Next Topic Topic: procedure

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use