| 01-24-2009, 07:35 AM | #1 |
I use pickup listchecker to host in wine. The fixed 25s auto refresh got a little frustrating. Here's code to tell plc to refresh. Code:
#include <windows.h>
#include <stdio.h>
static const char PLC_WINDOW_TITLE[] = "pickup.listchecker v1.0.592 (01/07/2008) Winpcap disabled";
static const unsigned PLC_REFRESH_MESSAGE = 0x40F;
int main(int argc, char **argv)
{
BOOL ret;
HWND win;
win = FindWindow(NULL,PLC_WINDOW_TITLE);
printf("plc wnd: %x\n",win);
ret = PostMessage(win,PLC_REFRESH_MESSAGE,0,0);
CloseHandle(win);
return 0;
}Binary attached. It's cross compiled with mingw, YMMV. I embed it in a shell script for autorefreshing: Code:
#!/bin/sh while [ 1 ] do ./plcref.exe sleep 5 done |
| 01-26-2009, 01:28 AM | #2 |
Doesn't the /refreshbnet command allow you to refresh manually? |
| 01-26-2009, 04:08 AM | #3 |
Yes. I'm lazy. |
