made SendMessage command logic more sensitive

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1010 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
justin1014 2002-09-13 23:09:23 +00:00
parent 541fafa81c
commit 7604e28f3f

View file

@ -2280,6 +2280,13 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
return add_entry(&ent);
case TOK_SENDMESSAGE:
ent.which=EW_SENDMESSAGE;
if (line.gettoken_str(1)[0] == '/' || line.gettoken_str(2)[0] == '/' ||
line.gettoken_str(3)[0] == '/' || line.gettoken_str(4)[0] == '/')
{
PRINTHELP()
}
SCRIPT_MSG("SendMessage:");
{
int a=5;
@ -2289,11 +2296,17 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
SCRIPT_MSG("(->%s)",line.gettoken_str(5));
a++;
}
if (!strncmp(line.gettoken_str(a),"/TIMEOUT=",9))
{
ent.offsets[5]|=atoi(line.gettoken_str(a)+9)<<2;
SCRIPT_MSG(" (timeout=%d)",ent.offsets[5]>>2);
a++;
}
if (line.getnumtokens()>a)
{
PRINTHELP()
}
}