Pregunta

¿Cómo se envía código clave a la ejecución de la aplicación actualmente en Linux que se ejecuta en el vino? Me gustaría que el que fuera bajo bash por simplicidad.

¿Fue útil?

Solución

Usar paquete llamado xvkbd . Debe estar dentro de todas las distribuciones de Linux. La sintaxis es simple:

xvkbd -text [line of keycodes]

Por ejemplo correr Warcraft 3 juego con el inicio de sesión automático de Battle.net sería:

#!/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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top