Page 1 of 3
Execute from terminal
Posted: Mon Sep 05, 2011 8:02 am
by sconsolas
Is there a way to start SixEmu (without the GUI) from terminal?
Also, I would like to save the terminal output to a textfile. Is it possible to save it? Every time i press "ESC" the terminal closes.
Thanks in advance
Re: Execute from terminal
Posted: Mon Sep 05, 2011 8:36 am
by Matlo
The command line arguments depend on the GIMX hardware:
- bluetooth:
Start emu with the gui, and start emuclient from a terminal:
[code]emuclient --config <config.xml> --status[/code]
- usb
There's no emu for the usb version. Just start emuclient from a terminal:
[code]emuclient --precision 16 --serial --config <config.xml> --refresh <period in ms> --port <serial port> --status
[/code]
refresh period: 4 for 250Hz, 8 for 125Hz, 10 for 100Hz
serial port: COMX (windows) or /dev/ttyUSBX (linux) (X=1,2...)
Re: Execute from terminal
Posted: Mon Sep 05, 2011 12:11 pm
by sconsolas
Thanks for your fast reply.
My goal is to record a macro by getting a log of the terminal output and convert it to a sixemu-macro friendly code to execute it from your program.
I got to the point when i execute emuclient from terminal, but i cant save the log of the keys, as they are not shown on the terminal.
How can i save the output of the terminal to a file? I cant do it with > XXX.txt because it always opens in a new terminal window.
Do you have a macro recording code?
Edit: I use the BT version
Re: Execute from terminal
Posted: Mon Sep 05, 2011 12:28 pm
by Matlo
Sorry I forgot the "--status" at the end of the command line...
Re: Execute from terminal
Posted: Mon Sep 05, 2011 12:55 pm
by sconsolas
And which are the posible value of -status?
Re: Execute from terminal
Posted: Mon Sep 05, 2011 1:00 pm
by Matlo
No need to write anything else, it just tells emuclient to output the status of the controller.
Code: Select all
emuclient --config <config.xml> --status
Re: Execute from terminal
Posted: Mon Sep 05, 2011 1:48 pm
by sconsolas
Great!
I got the output. I will try to make an script to translate the log to a Macro-friendly languaje.
Thanks a lot
Re: Execute from terminal
Posted: Wed Sep 28, 2011 3:58 pm
by sconsolas
Thanks again for your help.
Now i need to start emuclient, wait 4 secs to sync, execute a macro and then exit. Is that possible from terminal?
Re: Execute from terminal
Posted: Wed Sep 28, 2011 4:15 pm
by Matlo
First solution:
At the beginning of your macro file:
and at the end of your macro file:
Another solution:
In a terminal:
Code: Select all
sudo apt-get install xdotool
emuclient --config <config.xml> &
sleep 4
xdotool key Escape
Re: Execute from terminal
Posted: Thu Sep 29, 2011 8:35 am
by sconsolas
Thanks for your fast reply.
What i am trying to do es to Sync, wait,
autostart a macro and once the macro is finished, exit.
Is a good idea to put the "KEY ESCAPE" at the end of the macro. I will use.
But i still cant execute a macro, because the only key that works with the xdotool es "Escape".
Here is what i do (The exit is already in the macro).
Code: Select all
emuclient --config <config.xml> &
sleep 4
xdotool key F1
But it doesnt work.
If i use
Code: Select all
emuclient --config <config.xml> &
sleep 4
xdotool key Escape
it exits perfectly, but i need to autostart a macro.
Do you know what may be the problem?