Execute from terminal

Need help? Ask here and someone will help
sconsolas
Posts: 13
Joined: Mon Sep 05, 2011 7:57 am

Execute from terminal

Post 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
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Execute from terminal

Post 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...)
GIMX creator
sconsolas
Posts: 13
Joined: Mon Sep 05, 2011 7:57 am

Re: Execute from terminal

Post 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
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Execute from terminal

Post by Matlo »

Sorry I forgot the "--status" at the end of the command line...
GIMX creator
sconsolas
Posts: 13
Joined: Mon Sep 05, 2011 7:57 am

Re: Execute from terminal

Post by sconsolas »

And which are the posible value of -status?
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Execute from terminal

Post 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
GIMX creator
sconsolas
Posts: 13
Joined: Mon Sep 05, 2011 7:57 am

Re: Execute from terminal

Post 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
sconsolas
Posts: 13
Joined: Mon Sep 05, 2011 7:57 am

Re: Execute from terminal

Post 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?
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Execute from terminal

Post by Matlo »

First solution:

At the beginning of your macro file:

Code: Select all

DELAY 4000
and at the end of your macro file:

Code: Select all

KEY ESCAPE
Another solution:

In a terminal:

Code: Select all

sudo apt-get install xdotool
emuclient --config <config.xml> &
sleep 4
xdotool key Escape
GIMX creator
sconsolas
Posts: 13
Joined: Mon Sep 05, 2011 7:57 am

Re: Execute from terminal

Post 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?
Post Reply