An update for all using gobetwino.exe now or in the future,
Problem description
The idea of gobetweino is to create the following pipeline
Arduino ---- Serial ----> PC/Gobetwino ---- windows ----> Scalc.exe
<------------------------------------------ Process ID ---+
The arduino asks gobetwino to start a program on the PC, and it returns the processID that the Arduino needs to send commands to. This is needed as the Arduino-sketch can talk to multiple apps on the PC in parallel and Gobetwino needs to know to which process it must send the keypresses etc.
The problem stated by Johan is that after a few seconds the processID is lost, there is only time to write one line (or even not). Starting scalc.exe works 100%.
Analysis
After a few tests it became evident that scalc.exe is a sort of bootloader to start soffice.exe in the right modus operandi. And after that it stops running ==> so its PID got lost .
Arduino ---- Serial ----> PC/Gobetwino ---- windows ----> Scalc.exe ----> Soffice.exe
<------------------------------------------ Process ID ---+ ?-- Process ID -+
stopped running
Solution
So the way to solve this problem is to call soffice.exe directly (see below), and feed it with the keys to start a new spreadsheet:
Arduino ---- Serial ----> PC/Gobetwino ---- windows ----> Soffice.exe
<------------------------------------------ Process ID ---+
Now soffice.exe seems to remember the last modus it was started in (not tested extensively) so it might look as if that is not needed and you could write opportunistic code (adviced NOT to do) that will fail eventually.
Footnote:
Furthermore soffice.exe can run in the background to start faster, I have killed the proces to have a clean start, not tested (TODO) what it would do if it ran in the background and gobetwino wants to start a new instance.
Similar problems will happen if gobetwino is used with other apps that start apps.
As I have not used gobetwino before - it was on my "experiments waiting for an interesting case" list - I was charmed by its functionality. I have some ideas to use gobetwino to let Arduino fill in webforms, twitter, navigate google maps, start my favorite apps and logins with one keypress etc.
download: - http://www.mikmo.dk/gobetwino.html
Rob
---- update ----
Open Office can be started directly in the spreadsheet modus by using soffice.exe -calc