Question

Comment puis-je envoyer keycode à l'application en cours d'exécution sous Linux qui est en cours d'exécution sous le vin? Je voudrais l'être sous ce bash pour plus de simplicité.

Était-ce utile?

La solution

package Utilisez appelé xvkbd . Il devrait être dans toutes les distributions Linux. La syntaxe est simple:

xvkbd -text [line of keycodes]

Par exemple en cours d'exécution Warcraft 3 jeu avec connexion automatique Battle.net serait:

#!/bin/bash
cd ~/.wine/drive_c/Program\ Files/Warcraft3/
wine euroloader.exe -opengl > /dev/null 2> /dev/null & # run W3
sleep 5; # wait until animation fades out
xvkbd -text "b" # "b" is for Battle.net
sleep 7;
xvkbd -text "password\r" # password
sleep 3;
xvkbd -text "h" # "h" is for channel
sleep 5;
xvkbd -text "h" # honestly I don't know why, but without this the script might not work
sleep 5;
xvkbd -text "zcu\r" # type in your channel and join the room
sleep 5;
xvkbd -text ".load\r" # I'm using ghost, so I'll ask him what map is loaded
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top