shell scripting + java = why it no work?

8 views
Skip to first unread message

ManicTheHedgehog

unread,
Jun 9, 2011, 5:39:33 AM6/9/11
to ToowoombaLinux
long time no see guys :D
anyway ive been trying to write a shell script to perform a set of
keystrokes within a game much like a macro key, and bind it to a key
combination, in this case alt+home.
the game i'm trying to do this for is minecraft.
the objective is to have the system send t/home <enter> at the touch
of a button.
if theres any minecraft players in the group you will know exactly
what i'm trying to do.
this is my script:

keyboard.send_keys("t/home")
keyboard.send_key("<enter>")

it works in every program i run it in except for minecraft. i'm
guessing it has something to do with java.
the way i understand it, the linux version of java runtime runs in its
own virtual machine (not sure if i'm right however)
if it runs as an independant operating system inside a virtual
environment then to me it makes sense that it would have its own key
binding definitions. the game registers t/home but not the enter
keystroke. if i am correct java has its own idea of what to call the
enter key, so i am of the mind to try using the key code (34) instead
of trying to guess what name java has assigned to the key. but i dont
know the syntax of the command to type into my script.
do i merely type keyboard.send_key("<34>") ???
if anyone has some experience in shell scripting can someone help me
out?

toady

unread,
Jun 9, 2011, 6:26:46 AM6/9/11
to ToowoombaLinux
Hey Manic -
yes it has been a while - I've had a string of family crises and uni
stuff to keep me under the thumb last few months - but I'm ready to
respond to any call from TLC...
But I'm afraid I have absolutely no idea how to help you here. I'm
having very similar problems trying to run java-based software within
Puppy linux (e.g., SciPlore). It's BrickWallsVille for me. I reckon
you're right about the way java is organised in Linux vs Windows
though. Please post an update if you make any progress, or what you
tried and failed,
Always Watching,
Toady.

On Jun 9, 7:39 pm, ManicTheHedgehog <technomance...@hotmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages