01.06.2012, 19:03
|
Прохожий
|
|
Регистрация: 18.05.2012
Сообщения: 19
Репутация: 10
|
|
Вот код:
Код:
procedure TForm1.CommandLabelChange(Sender: TObject);
begin
if CommandLabel.Text = 'Command : Start' then
Form1.Left:=0;
Form1.Top:=0;
Application.Restore;
ButtonStop.Enabled:=false;
ButtonPlay.Enabled:=false;
if CommandLabel.Text = ('Command : Play') then
Form1.Left:=0;
Form1.Top:=0;
x := 434;
y := 258;
SetCursorPos(x, y);
Mouse_Event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
Mouse_Event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
Application.Restore;
ButtonStop.Enabled:=true;
ButtonPlay.Enabled:=false;
if CommandLabel.Text = 'Command : Stop' then
Form1.Left:=0;
Form1.Top:=0;
x := 60;
y := 472;
SetCursorPos(x, y);
Mouse_Event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
Mouse_Event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
Application.Restore;
ButtonStop.Enabled:=false;
ButtonPlay.Enabled:=true;
if CommandLabel.Text = 'Command : Warning' then
Form1.Left:=0;
Form1.Top:=0;
MemoWeb.Lines.Add(TimeToStr(Time));
MemoWeb.Lines.Add('Приготовьтесь, начинаем!');
end;
end.
Проблема в том - что если я в CommandLabel введу любое число букву и т п то воспроизводятся обе комманды!! а мне надо чтоб если Command : Play то воспроизводилась только она!
|