PDA

Просмотр полной версии : Помогите в скрипте


Gerain
18.06.2010, 21:46
Что тут неправильно
begin
SendMsg('WITHDRAW and DEPOSIT');
buf:=hstr('A7 2B 23 00 00 A0 86 01 00 01 00 00 00 00 00 00 00 00 00 00 00 '); //withdraw
SendToServer;
application.processmessages;
buf:=hstr('A7 2B 23 00 00 40 0D 03 00 01 00 00 00 00 00 00 00 00 00 00 00'); //deposit
SendToServer;
application.processmessages;
end;
if FromClient and (pck=HStr('34 03 00 00 00')) then
begin
SendMsg('WITHDRAW');
buf:=hstr('A7 2B 23 00 00 A0 86 01 00 01 00 00 00 00 00 00 00 00 00 00 00 '); //withdraw
SendToServer;
application.processmessages;
end;
if FromClient and (pck=HStr('34 04 00 00 00')) then
begin
SendMsg('DEPOSIT');
buf:=hstr('A7 2B 23 00 00 40 0D 03 00 01 00 00 00 00 00 00 00 00 00 00 00 '); //deposit
SendToServer;
application.processmessages;
end;
if FromClient and (pck=HStr('34 06 00 00 00')) then
for i:=50 to 50 do begin ///от 1 до N (где N количество отсылок)
buf:=hstr('49 2E 00 77 00 69 00 74 00 68 00 64 00 72 00 61 00 77 00 00 00 00 00 00 00'); //withdraw
SendToServer;
application.processmessages;
buf:=hstr('49 2E 00 64 00 65 00 70 00 6F 00 73 00 69 00
74 00 00 00 00 00 00 00'); //deposit
SendToServer;
application.processmessages;
end;
end.
вот в слове end

NLObP
19.06.2010, 01:08
Gerain, попробуй убрать совсем

вот так компилится
var
i : integer;
begin
SendMsg('WITHDRAW and DEPOSIT');
buf:=hstr('A7 2B 23 00 00 A0 86 01 00 01 00 00 00 00 00 00 00 00 00 00 00 '); //withdraw
SendToServer;
application.processmessages;
buf:=hstr('A7 2B 23 00 00 40 0D 03 00 01 00 00 00 00 00 00 00 00 00 00 00'); //deposit
SendToServer;
application.processmessages;
if FromClient and (pck=HStr('34 03 00 00 00')) then
begin
SendMsg('WITHDRAW');
buf:=hstr('A7 2B 23 00 00 A0 86 01 00 01 00 00 00 00 00 00 00 00 00 00 00 '); //withdraw
SendToServer;
application.processmessages;
end;
if FromClient and (pck=HStr('34 04 00 00 00')) then
begin
SendMsg('DEPOSIT');
buf:=hstr('A7 2B 23 00 00 40 0D 03 00 01 00 00 00 00 00 00 00 00 00 00 00 '); //deposit
SendToServer;
application.processmessages;
end;
if FromClient and (pck=HStr('34 06 00 00 00')) then
for i:=1 to 50 do begin ///от 1 до N (где N количество отсылок)
buf:=hstr('49 2E 00 77 00 69 00 74 00 68 00 64 00 72 00 61 00 77 00 00 00 00 00 00 00'); //withdraw
SendToServer;
application.processmessages;
buf:=hstr('49 2E 00 64 00 65 00 70 00 6F 00 73 00 69 00 74 00 00 00 00 00 00 00'); //deposit
SendToServer;
application.processmessages;
end;
end.

ps: правильность работы не проверял

Xen
19.06.2010, 07:47
А это зачем?:) Этот метод для циклов

application.processmessages;