Re: Hotkey Manager
- From: "Luc The Perverse" <sll_noSpamlicious_z_XXX_m@xxxxxxxxxx>
- Date: Sat, 14 Oct 2006 09:49:59 -0700
"Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4530bc32$0$627$bed64819@xxxxxxxxxxxxxxxxxxxx
Luc The Perverse wrote:
I had no idea I posted this in HTML
How embarassing
Never mind...
Now, as to your /other/ problem (;-) I think you can assume that no
reasonable
Java implementation is ever going to start up fast enough for this to work
well -- there's just too much to do before it can get any useful work
done.
Also, I don't know of any way of hooking "global" keyboard events from
Java
(but that might just be my ignorance).
So both considerations suggest that a good architecture would be for your
Java
stuff to be a single long-lived process which (amongst other things)
listened
on a socket, waiting to be told to start an "application" (which is really
just
another window opened from the same program). It would probably be
sufficient
to create a little program in some fast-starting language which opened a
socket
connection and passed an instruction through to the "main" program then
quit (I
use that architecture myself). If so then you can tell Windows to start
that
program from a hot-key combination without having to mess with real
Windows
programming by putting a shortcut with that hotkey somewhere in the start
menu.
That leaves you with the choice of implementation language. One option
would
be to use a small footprint language like C (or compiled Forth or whatever
suits your fancy); however it might be that one of the Windows scripting
languages like jscript would work just as well in practice if the DLLs
needed
to interpret the script tended to be loaded into memory already (and if
it's
possible to open a local socket from them -- I have no idea whether it
is).
Of course, if you can find a way to hook global hot-keys from Java then
there's
no need for the helper program or the socket...
I don't know why I never think of Datagrams - but the solution is perfect!
It would even allow me to broaden the scope of the program to allow messages
over the network (although I suppose I would need to add verification or use
TCP if it is off the local computer). I always think I have to work with
stupid windows messages.
I have never written a networking program in any language but Java (I tried
one in C++ and eventually gave up) Oh yeah - I wrote something in VB
once - but that doesn't solve any problems I am having.
I will probably write it in C or C++ and use your idea - because you are
smart :)
Thank you d00d.
--
LTP
:)
.
- References:
- Hotkey Manager
- From: Luc The Perverse
- Re: Hotkey Manager
- From: Luc The Perverse
- Re: Hotkey Manager
- From: Chris Uppal
- Hotkey Manager
- Prev by Date: Re: Hotkey Manager
- Next by Date: Re: Math.Floor
- Previous by thread: Re: Hotkey Manager
- Next by thread: Re: Dropped Sockets?
- Index(es):
Relevant Pages
|