Thread: \\.\pipe\WinUAE
View Single Post
Old 21 October 2015, 23:39   #11
boir
Registered User
 
Join Date: Aug 2015
Location: europe
Posts: 17
Quote:
You can also just use "EVT SPC_PAUSE 1".
Indeed

Quote:
Since I have nothing better to do , here's a python script
Very helpful, thank you.

A comment in your python source says
Quote:
# join all command line args (except scriptname)
but if I pass two parameters like this
Code:
uae_ipc.py "EVT SPC_PAUSE 1" "EVT SPC_SCREENSHOT 1"
only the first pause command is triggered. No real problem though since I can simply run two separate times.
edit: Aha, now I get it your code there makes unquoted spaced input like this
Code:
uae_ipc.py EVT SPC_PAUSE 1
into one single parameter.

While you had nothing better to do I also had nothing better to do so I tried to expand the ipctester c++ code to accept command line parameters. Only problem is I don't know any c++. But I've pieced something together through googling a lot that kind of works. It adds this at line 74 in ipctester.cpp

Code:
  if (argc >= 2) {

	int i;
	for (i=1;i<argc;i++) {
	DWORD ret;
	if (strlen(argv[i]) == 0)
	    continue;
	threadmode_in = 0;
	while (threadmode_out)
	    Sleep(10);
	if (!WriteFile(p, argv[i], strlen (argv[i]) + 1, &ret, NULL)) {
	    printf("WriteFile() failed, err=%d\n", GetLastError());
	    return 0;
	}
	threadmode_in = 1;
  }
  return 0;
  }
It runs and accept command line parameters. But after a few runs I got the error
Code:
Couldn't open pipe '\\.\pipe\WinUAE' err=2
Maybe someone who in fact knows c++ can fix that and other problems with the code? A standalone executable could be useful for those who don't have python and pywin32 installed.

Last edited by boir; 21 October 2015 at 23:49.
boir is offline  
 
Page generated in 0.05076 seconds with 9 queries