--- In [EMAIL PROTECTED], Alex Peters <[EMAIL PROTECTED]> wrote:
> Well then, in that case you could do something like this in your
batch
> file:
>
> :: if %Status% is empty (it's all one line)
> If %Status%!==! "C:\Program Files\PowerPro\PowerPro.exe" *Format
Item List MainBar Item 21 IconFile F:\Windows\IPSec\StatusIsEmpty.ico
IconNum 1
Thanks, Alex. I didn't know PPro could do that. In the meantime, I
built my own PProExec.exe, following a lead I found via Google ...
two versions (console/windows). FWIW, it goes like this (below,
simple but effective).
- Vince
/* PPROEXEC.CPP/WPPROEXEC.CPP */
#include <windows.h>
#include <stdio.h>
#define GUI /* remove this for a console build */
#ifdef GUI
#pragma comment(linker, "/ENTRY:WinMainCRTStartup")
#pragma comment(linker, "/OUT:Release/pproexec.exe")
INT WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR szCmdLine, INT) {
#else /* not GUI */
#pragma comment(linker, "/ENTRY:mainCRTStartup")
#pragma comment(linker, "/OUT:Release/wpproexec.exe")
INT main (INT argc, CHAR *argv[] ) {
CHAR *szCmdLine = GetCommandLine();
#endif /* GUI/CONSOLE */
CHAR *szPProCmd;
HWND hWndPPro;
if ( !(hWndPPro = FindWindow("PowerProMain", NULL)) )
ExitProcess(1);
if ( __argc == 1 ) {
#ifdef GUI
MessageBox(NULL, "Syntax: pproexec <PowerPro command>",
"PProExec", MB_OK);
#else
fprintf(stderr, "Syntax: pproexec <PowerPro command>\n");
#endif
ExitProcess(1);
}
szPProCmd = strstr(szCmdLine, __argv[1]);
COPYDATASTRUCT cd = {1, strlen(szPProCmd) + 1, szPProCmd};
SendMessage(hWndPPro, WM_COPYDATA, 0, (LPARAM) &cd);
return 0;
}
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/JV_rlB/TM
---------------------------------------------------------------------~->
**** EDIT YOUR POSTINGS !!!! ****
Please remove as much as possible from original messages before replying to them.
________________________________________________
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/