vitaminc
05-31-2007, 03:24 AM
Heres my autotalker with form and everything just fill out the three text boxes or leave them blank and it wont say anything. It currently has 4 speeds ( slow medium fast and superfast) so just tick one of them
Its not quite finished im planning on putting in a trader so that when it sees the trade color it will click on it and a progress report for it but i simply didnt have the time and wanted to see what you guys think of it (how it is now atleast)
Next version (if i make one)
-Cleaner code
-Auto trader
-Counter to see how many times you've said each phrase
-Progress report
please leave your comments/ problems
// VitaminC AutoTalker V .1 //
// Just use the form and your good to go //
// Credits to starblaster100's tutorial for alot of the form code//
program VitaminC_AutoTalker;
var
TextCounter : integer;
Speed : integer;
frmDesign : TForm;
Label1 : TLabel;
Label2 : TLabel;
Label3 : TLabel;
Label4 : TLabel;
Label5 : TLabel;
Text1 : TEdit;
Text2 : TEdit;
Text3 : TEdit;
Button1 : TButton;
Slow : TRadioButton;
Medium : TRadioButton;
Fast : TRadioButton;
RadioButton4 : TRadioButton;
FirstBool : Boolean;
SecondBool : Boolean;
Const
TradeColor= 8388736;
procedure SafeInitForm; // Default Code
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal; // Default Code
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal; // Default Code
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
procedure ClickButton(sender: TObject); // Adding Buttons and Interactivity
begin
If (Slow.Checked)Then Speed := 5000+Random(500);
If (Medium.Checked)Then Speed := 3000+Random(500);
If (Fast.Checked)Then Speed := 2000+Random(300);
If (RadioButton4.Checked)Then Speed := 1000+Random(300);
If (Text2.Text = ' ')Then FirstBool := False Else FirstBool := True
If (Text2.Text = 'Text2')Then FirstBool := False Else FirstBool :=True
If (Text3.Text = ' ')Then SecondBool := False Else SecondBool := True
If (Text3.Text = 'Text3')Then SecondBool :=False Else SecondBool :=True
Writeln('AutoTalking Started');
Writeln('Saying :');
Writeln(Text1.Text);
Writeln('Then');
Writeln(Text2.Text);
Writeln('Then');
Writeln(Text3.Text);
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
end;
Procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 468;
frmDesign.Height := 216;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 158;
Label1.Top := 44;
Label1.Width := 103;
Label1.Height := 13;
Label1.Caption := 'What you want to say';
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 158;
Label2.Top := 83;
Label2.Width := 106;
Label2.Height := 13;
Label2.Caption := 'What you want to say ';
Label3 := TLabel.Create(frmDesign);
Label3.Parent := frmDesign;
Label3.Left := 153;
Label3.Top := 122;
Label3.Width := 103;
Label3.Height := 13;
Label3.Caption := 'What you want to say';
Label4 := TLabel.Create(frmDesign);
Label4.Parent := frmDesign;
Label4.Left := 206;
Label4.Top := 13;
Label4.Width := 219;
Label4.Height := 13;
Label4.Caption := 'If you Do not want to say anything leave blank';
Label5 := TLabel.Create(frmDesign);
Label5.Parent := frmDesign;
Label5.Left := 66;
Label5.Top := 21;
Label5.Width := 31;
Label5.Height := 13;
Label5.Caption := 'Speed';
Text1 := TEdit.Create(frmDesign);
Text1.Parent := frmDesign;
Text1.Left := 329;
Text1.Top := 44;
Text1.Width := 121;
Text1.Height := 21;
Text1.TabOrder := 8;
Text1.Text := 'Text1';
Text2 := TEdit.Create(frmDesign);
Text2.Parent := frmDesign;
Text2.Left := 329;
Text2.Top := 83;
Text2.Width := 121;
Text2.Height := 21;
Text2.TabOrder := 9;
Text2.Text := 'Text2';
Text3 := TEdit.Create(frmDesign);
Text3.Parent := frmDesign;
Text3.Left := 329;
Text3.Top := 122;
Text3.Width := 121;
Text3.Height := 21;
Text3.TabOrder := 10;
Text3.Text := 'Text3';
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.Left := 195;
Button1.Top := 148;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'START!';
Button1.TabOrder := 11;
Button1.Onclick := @ClickButton
Slow := TRadioButton.Create(frmDesign);
Slow.Parent := frmDesign;
Slow.Left := 26;
Slow.Top := 54;
Slow.Width := 113;
Slow.Height := 17;
Slow.Caption := 'Slow';
Slow.TabOrder := 12;
Medium := TRadioButton.Create(frmDesign);
Medium.Parent := frmDesign;
Medium.Left := 25;
Medium.Top := 81;
Medium.Width := 113;
Medium.Height := 17;
Medium.Caption := 'Medium';
Medium.TabOrder := 13;
Fast := TRadioButton.Create(frmDesign);
Fast.Parent := frmDesign;
Fast.Left := 26;
Fast.Top := 109;
Fast.Width := 113;
Fast.Height := 17;
Fast.Caption := 'Fast';
Fast.TabOrder := 14;
RadioButton4 := TRadioButton.Create(frmDesign);
RadioButton4.Parent := frmDesign;
RadioButton4.Left := 26;
RadioButton4.Top := 138;
RadioButton4.Width := 113;
RadioButton4.Height := 17;
RadioButton4.Caption := 'Super Fast';
RadioButton4.TabOrder := 15;
end;
Procedure Talk1;
Begin
SendKeysSilent(Text1.Text);
Wait(200+Random(50));
SendKeysSilent(Chr(13));
Wait(Speed);
end;
Procedure Talk2;
Begin;
SendKeysSilent(Text2.Text);
Wait(200+Random(50));
SendKeysSilent(Chr(13));
Wait(Speed);
end;
Procedure Talk3;
Begin;
SendKeysSilent(Text3.Text);
Wait(200+Random(50));
SendKeysSilent(Chr(13));
Wait(Speed);
end;
begin
SafeInitForm;
SafeShowFormModal;
Repeat;
Wait(500+Random(100));
Talk1;
If FirstBool = True Then Talk2;
If SecondBool = True Then Talk3;
Until(false)
end.
I know the codes sloppy but help me out and critique my work
Ps if i dont answer im in bed or at work
Edit: and before you say anything most of the form code except the stuff that i NEEDED to make myself was taken from Starblaster100's tutorial but other than that i made everything myself... thanks to alot of great tutorials
Thanks!
Its not quite finished im planning on putting in a trader so that when it sees the trade color it will click on it and a progress report for it but i simply didnt have the time and wanted to see what you guys think of it (how it is now atleast)
Next version (if i make one)
-Cleaner code
-Auto trader
-Counter to see how many times you've said each phrase
-Progress report
please leave your comments/ problems
// VitaminC AutoTalker V .1 //
// Just use the form and your good to go //
// Credits to starblaster100's tutorial for alot of the form code//
program VitaminC_AutoTalker;
var
TextCounter : integer;
Speed : integer;
frmDesign : TForm;
Label1 : TLabel;
Label2 : TLabel;
Label3 : TLabel;
Label4 : TLabel;
Label5 : TLabel;
Text1 : TEdit;
Text2 : TEdit;
Text3 : TEdit;
Button1 : TButton;
Slow : TRadioButton;
Medium : TRadioButton;
Fast : TRadioButton;
RadioButton4 : TRadioButton;
FirstBool : Boolean;
SecondBool : Boolean;
Const
TradeColor= 8388736;
procedure SafeInitForm; // Default Code
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal; // Default Code
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal; // Default Code
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
procedure ClickButton(sender: TObject); // Adding Buttons and Interactivity
begin
If (Slow.Checked)Then Speed := 5000+Random(500);
If (Medium.Checked)Then Speed := 3000+Random(500);
If (Fast.Checked)Then Speed := 2000+Random(300);
If (RadioButton4.Checked)Then Speed := 1000+Random(300);
If (Text2.Text = ' ')Then FirstBool := False Else FirstBool := True
If (Text2.Text = 'Text2')Then FirstBool := False Else FirstBool :=True
If (Text3.Text = ' ')Then SecondBool := False Else SecondBool := True
If (Text3.Text = 'Text3')Then SecondBool :=False Else SecondBool :=True
Writeln('AutoTalking Started');
Writeln('Saying :');
Writeln(Text1.Text);
Writeln('Then');
Writeln(Text2.Text);
Writeln('Then');
Writeln(Text3.Text);
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
end;
Procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 468;
frmDesign.Height := 216;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 158;
Label1.Top := 44;
Label1.Width := 103;
Label1.Height := 13;
Label1.Caption := 'What you want to say';
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 158;
Label2.Top := 83;
Label2.Width := 106;
Label2.Height := 13;
Label2.Caption := 'What you want to say ';
Label3 := TLabel.Create(frmDesign);
Label3.Parent := frmDesign;
Label3.Left := 153;
Label3.Top := 122;
Label3.Width := 103;
Label3.Height := 13;
Label3.Caption := 'What you want to say';
Label4 := TLabel.Create(frmDesign);
Label4.Parent := frmDesign;
Label4.Left := 206;
Label4.Top := 13;
Label4.Width := 219;
Label4.Height := 13;
Label4.Caption := 'If you Do not want to say anything leave blank';
Label5 := TLabel.Create(frmDesign);
Label5.Parent := frmDesign;
Label5.Left := 66;
Label5.Top := 21;
Label5.Width := 31;
Label5.Height := 13;
Label5.Caption := 'Speed';
Text1 := TEdit.Create(frmDesign);
Text1.Parent := frmDesign;
Text1.Left := 329;
Text1.Top := 44;
Text1.Width := 121;
Text1.Height := 21;
Text1.TabOrder := 8;
Text1.Text := 'Text1';
Text2 := TEdit.Create(frmDesign);
Text2.Parent := frmDesign;
Text2.Left := 329;
Text2.Top := 83;
Text2.Width := 121;
Text2.Height := 21;
Text2.TabOrder := 9;
Text2.Text := 'Text2';
Text3 := TEdit.Create(frmDesign);
Text3.Parent := frmDesign;
Text3.Left := 329;
Text3.Top := 122;
Text3.Width := 121;
Text3.Height := 21;
Text3.TabOrder := 10;
Text3.Text := 'Text3';
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.Left := 195;
Button1.Top := 148;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'START!';
Button1.TabOrder := 11;
Button1.Onclick := @ClickButton
Slow := TRadioButton.Create(frmDesign);
Slow.Parent := frmDesign;
Slow.Left := 26;
Slow.Top := 54;
Slow.Width := 113;
Slow.Height := 17;
Slow.Caption := 'Slow';
Slow.TabOrder := 12;
Medium := TRadioButton.Create(frmDesign);
Medium.Parent := frmDesign;
Medium.Left := 25;
Medium.Top := 81;
Medium.Width := 113;
Medium.Height := 17;
Medium.Caption := 'Medium';
Medium.TabOrder := 13;
Fast := TRadioButton.Create(frmDesign);
Fast.Parent := frmDesign;
Fast.Left := 26;
Fast.Top := 109;
Fast.Width := 113;
Fast.Height := 17;
Fast.Caption := 'Fast';
Fast.TabOrder := 14;
RadioButton4 := TRadioButton.Create(frmDesign);
RadioButton4.Parent := frmDesign;
RadioButton4.Left := 26;
RadioButton4.Top := 138;
RadioButton4.Width := 113;
RadioButton4.Height := 17;
RadioButton4.Caption := 'Super Fast';
RadioButton4.TabOrder := 15;
end;
Procedure Talk1;
Begin
SendKeysSilent(Text1.Text);
Wait(200+Random(50));
SendKeysSilent(Chr(13));
Wait(Speed);
end;
Procedure Talk2;
Begin;
SendKeysSilent(Text2.Text);
Wait(200+Random(50));
SendKeysSilent(Chr(13));
Wait(Speed);
end;
Procedure Talk3;
Begin;
SendKeysSilent(Text3.Text);
Wait(200+Random(50));
SendKeysSilent(Chr(13));
Wait(Speed);
end;
begin
SafeInitForm;
SafeShowFormModal;
Repeat;
Wait(500+Random(100));
Talk1;
If FirstBool = True Then Talk2;
If SecondBool = True Then Talk3;
Until(false)
end.
I know the codes sloppy but help me out and critique my work
Ps if i dont answer im in bed or at work
Edit: and before you say anything most of the form code except the stuff that i NEEDED to make myself was taken from Starblaster100's tutorial but other than that i made everything myself... thanks to alot of great tutorials
Thanks!