Autor Beitrag
Ivo@CoMRoK
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 258

Win XP
D3 Prof., D7 Pe.
BeitragVerfasst: Mi 08.02.06 16:58 
Hi ich hab mirn Prog geschrieben( noch nicht fertig) wo ich Sachen eingeb und
der Internal Piept. Soweit Sogut. Nur: Wenn ich mehr als 3 Befehle hab macht der immer nur zwei verschiedene Peeps.
ich hab schon mit sleep probiert und in ne Liste (hätt ja klappen könn) aber hilft alles nix:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;
  Liste: TStringlist;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var i: Integer;
begin
  i := 1;
  Liste.Clear;
  repeat
    Liste.Add(Copy(Edit1.Text,i,i+1));
    i := i + 2;
  until i >= Length(Edit1.Text);
  i := 0;
  repeat
    if Liste.Strings[i] = 'A1' then Windows.Beep(55,200);
    if Liste.Strings[i] = 'A2' then Windows.Beep(110,200);
    if Liste.Strings[i] = 'A3' then Windows.Beep(220,200);
    if Liste.Strings[i] = 'A4' then Windows.Beep(440,200);
    if Liste.Strings[i] = 'A5' then Windows.Beep(880,200);
    if Liste.Strings[i] = 'A6' then Windows.Beep(1760,200);
    inc(i);
    sleep(10);
  until i >= Liste.Count;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Liste := TStringlist.Create;
end;

end.

_________________
Fällt der Bauer tot vom Traktor, stand am Waldrand ein Reaktor.
Ein altes indianisches Sprichwort besagt:Es kann gefährlich sein gelben Schnee zu essen.