PDA

View Full Version : Creating a Form Tutorial by Starblaster100



Starblaster100
05-13-2006, 06:28 PM
Form Tutorial by Starblaster100

What is a Form?

A form is a graphical way of setting up a script. It is a friendly and easy way for a user to fill in specific details to make a script work properly.

How do i create a form?

Using the Form Editor in Scar. Hit tools and then Form Editor.

When are they best Used?

Whenever you want them to be used. Usually if you are going to use forms, they appear at the start of the script.

The Tutorial Link:

Try this Link First (http://www50.megaupload.com/files/938ca3257fda7fb9d1532120359fa5cc/Form%20Tutorial%20by%20Starblaster100.zip)
Otherwise this one (http://www.megaupload.com/?d=OOG088T4)

Extra Information you should know:

Obviously this Tutorial only Covers the basics of creating a form, and there are infinite possibilities when creating them.
This Tutorial is Interactive, so if it says 'Click Tools' it is going to wait until you click tools!
On the first page where you select which part of the tutorial you want to see, wait a couple of seconds before pressing a button otherwise it starts half way throught he tutorial - I have no idea why
I suggest looking at other scripts to see how the forms are designed there. I've attached one of my scripts which uses a form, and you can see how it is made. It has a few extra things in it not shown in the tutorial, such as saving options, openning links and openning a new form from the current one. Its also quite a nice working script ;)


If you need anymore help in making forms, dont hesitate to ask me

Enjoy

Starblaster100

Languine
05-13-2006, 06:43 PM
Nice im definitly going to download this! Good job.

Avaphi
05-13-2006, 07:05 PM
I am downloading right now, Seems promising :) BTW Congrats on your 100th post starblaster !

Starblaster100
05-13-2006, 07:11 PM
o, lol, thanks :P

ub3r |<1||3r*1337*
05-13-2006, 08:01 PM
Wow! another great tutorial by Star!! woW!!!!!!!

i'm trying to download captivate with bittorrent. if i ever get it, i'll post the link for the straight download.

Mjordan
01-30-2007, 01:57 AM
thanks star. i know this is an old tut, but still very useful.

macromacro123
03-04-2007, 04:38 AM
omg cant u just post the tut here?so much noobs nowadays..

Mjordan
03-04-2007, 02:44 PM
omg cant u just post the tut here?so much noobs nowadays..

ROFLMAO are you calling star a noob? and he cant post its here it a video, retard

eddie
03-04-2007, 03:19 PM
It has to be said macromacro123.. You are a n00b. Anyhoo.. Thanks star for the tut, now im going to make all my personal ones have bigger and better forms :)

robeike
03-07-2007, 08:49 PM
k thanks STAR i'm just downloaded it going to take a look!

SonOfSheep
03-09-2007, 09:57 PM
Thank you! This teaches things you don't learn by just messing around (my main method of learning). I also learn by reading other's scripts but reading form code is torture!.

I am going to use forms in the upcoming version of my Oak Annihilator script.

Rune Hacker
04-06-2007, 05:42 AM
How can i watch this tut since it is a "Shockwave Flash Object". What can read it? (i use windows xp)

stein3
04-07-2007, 12:58 PM
open it with IE or Firefox i believe.

If you've ever been to YouTube you should have FLV plugins.

stein3
04-07-2007, 01:28 PM
k this didn't help me at all :(...

It only showed me what I already knew. You arrange the buttons and name them. How do I get the code thats like:

button1.***
button1.***
button1.***
edit2.***
and so on? where does that come from and how do I find it for my form?

stein3
04-07-2007, 01:30 PM
so far all I can get is:
object frmDesign: TfrmDesign
Left = 312
Top = 120
Width = 242
Height = 258
Caption = 'frmDesign'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
ShowHint = True
Visible = True
OnActivate = FormActivate
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 5
Top = 60
Width = 67
Height = 16
Caption = 'Message 1'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Label2: TLabel
Left = 5
Top = 89
Width = 67
Height = 16
Caption = 'Message 2'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Label3: TLabel
Left = 5
Top = 122
Width = 67
Height = 16
Caption = 'Message 3'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Label4: TLabel
Left = 5
Top = 149
Width = 67
Height = 16
Align = alCustom
Caption = 'Message 4'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Label5: TLabel
Left = 4
Top = 23
Width = 132
Height = 16
Caption = 'Number of Messages:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object startbut: TButton
Left = 83
Top = 184
Width = 75
Height = 25
Hint = 'starts script'
Caption = 'Start'
ParentShowHint = False
ShowHint = True
TabOrder = 8
end
object message1edit: TEdit
Left = 80
Top = 57
Width = 121
Height = 21
Hint = 'enter message'
ParentShowHint = False
ShowHint = True
TabOrder = 9
Text = 'message1edit'
end
object message2edit: TEdit
Left = 80
Top = 87
Width = 121
Height = 21
Hint = 'enter message'
ParentShowHint = False
ShowHint = True
TabOrder = 10
Text = 'message2edit'
end
object message3edit: TEdit
Left = 80
Top = 117
Width = 121
Height = 21
Hint = 'enter message'
ParentShowHint = False
ShowHint = True
TabOrder = 11
Text = 'message3edit'
end
object message4edit: TEdit
Left = 80
Top = 147
Width = 121
Height = 21
TabOrder = 12
Text = 'message4edit'
end
object Edit5: TEdit
Left = 141
Top = 21
Width = 35
Height = 21
Hint = '#'
ParentShowHint = False
ShowHint = True
TabOrder = 13
Text = 'Edit5'
end
end
but it really doesn't help me at all :(

the flea
04-08-2007, 02:28 PM
Star the tutorial is down can somebody re upload it for me ;)

rkroxpunk
04-11-2007, 12:19 AM
it's up........use the 2nd link

Post 300 :D yay

gsquare567
04-12-2007, 10:23 PM
when i open it in captivate it says its file type is not supported or its corrupted...

SKy Scripter
04-12-2007, 10:28 PM
Creating a Form Tutorial by Starblaster100 - 05-13-2006, 11:28 AM

uhmm a little old heh... ;)

gsquare567
04-13-2007, 01:37 AM
Creating a Form Tutorial by Starblaster100 - 05-13-2006, 11:28 AM

uhmm a little old heh... ;)

so? this guy's the king of kings u think his work will ever be outdated? he's like a shakespeare to SCAR/SRL... btw, got it workin thanks to a great post before me; opened with firefox. incredible tut, but still didnt really explain the 4 procedures u need to use. guess star expects us to be almost half as smart as him ^^

Starblaster100
04-13-2007, 08:25 AM
Sorry, ill try updating the tut when i get a bit of time.

the scar noob
04-13-2007, 01:49 PM
uhm it's up, the second link but i can't open the tut itself :(

gsquare567
04-13-2007, 06:06 PM
open in mozilla

SKy Scripter
04-13-2007, 09:27 PM
i never said Starblaster100 was a bad scripter i just said this script isn't
going to last very long..


so? this guy's the king of kings u think his work will ever be outdated? he's like a shakespeare to SCAR/SRL... btw, got it workin thanks to a great post before me; opened with firefox. incredible tut, but still didnt really explain the 4 procedures u need to use. guess star expects us to be almost half as smart as him ^^

lol wow,
StarBlaster100 is kool and all but... Nevermind (not saying anthing)

the scar noob
04-14-2007, 07:31 PM
no i mean that i can't open the file taht we download...

the scar noob
04-14-2007, 09:58 PM
problem solved, opened with Internet Explorer, great tut!! :p
EDIT: sorry for double post...

Lalaji
05-07-2007, 08:18 PM
Nice downloading it right now.

han941306
08-15-2007, 02:29 PM
cool Form TuT!
It can help some who are lazy and wants to auto's lol..
I think it just like VB? :duh:

The Element
08-15-2007, 03:25 PM
More like Delphi. Atleast for me. Only because I know Delphi though.

Anyways, great job starblaster. I had this saved on my friends computer and whatched itbut I could never find the thread to post about it. This and a fw form tutorials in the so called "advanced" section have tought me how to make some pretty cool forms.

han941306
08-28-2007, 12:45 PM
Cool TuT!
Thanks for it..
I can make a form so it can easier to setup..
Thanks!

Tootoot222
08-31-2007, 08:35 AM
nice tut thanks, but i can't get it to work,
when i make my form, then try to run it i get this error:


Successfully compiled
[Runtime Error] : Exception: Cannot make a visible window modal in line 28 in script


here's the code that i used
program New;


var
frmDesign : TForm;
UsernameLabel : TLabel;
Button1 : TButton;
TextBox1 : TEdit;
CheckBox1 : TCheckBox;
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); // <--- this is line 28
end;

procedure ClickButton(sender: TObject); // Adding Buttons and Interactivity
begin
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
end;

Procedure AddPic; // Loading a Picture
var
Picture : integer;
Canvas : TCanvas;
begin
{Picture := LoadBitmap()}
Canvas:= GetBitmapCanvas(Picture);
CopyCanvas(Canvas, frmDesign.Canvas, 1, -1, 300, 520, 0, 0, 315, 520);
end;

Procedure FormPaintStar(Sender : TObject); // Adding a picture
begin
AddPic;
end;

Procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 230;
frmDesign.Height := 157;
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 := True;
frmDesign.PixelsPerInch := 96;
UsernameLabel := TLabel.Create(frmDesign);
UsernameLabel.Parent := frmDesign;
UsernameLabel.Left := 9;
UsernameLabel.Top := 23;
UsernameLabel.Width := 74;
UsernameLabel.Height := 20;
UsernameLabel.Hint := 'Username';
UsernameLabel.Caption := 'Username';
UsernameLabel.Font.Color := clWindowText;
UsernameLabel.Font.Height := -16;
UsernameLabel.Font.Name := 'MS Sans Serif';
UsernameLabel.Font.Style := [];
UsernameLabel.ParentFont := False;
UsernameLabel.ParentShowHint := False;
UsernameLabel.ShowHint := True;
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.Left := 117;
Button1.Top := 61;
Button1.Width := 75;
Button1.Height := 25;
Button1.Hint := 'Click here to start the script';
Button1.Caption := 'Start';
Button1.Font.Color := clWindowText;
Button1.Font.Height := -12;
Button1.Font.Name := 'MS Sans Serif';
Button1.Font.Style := [];
Button1.ParentFont := False;
Button1.ParentShowHint := False;
Button1.ShowHint := True;
Button1.TabOrder := 8;
TextBox1 := TEdit.Create(frmDesign);
TextBox1.Parent := frmDesign;
TextBox1.Left := 87;
TextBox1.Top := 24;
TextBox1.Width := 121;
TextBox1.Height := 21;
TextBox1.Hint := 'Type your username here';
TextBox1.ParentShowHint := False;
TextBox1.ShowHint := True;
TextBox1.TabOrder := 9;
CheckBox1 := TCheckBox.Create(frmDesign);
CheckBox1.Parent := frmDesign;
CheckBox1.Left := 37;
CheckBox1.Top := 67;
CheckBox1.Width := 74;
CheckBox1.Height := 17;
CheckBox1.Hint := 'Do you want antirandoms?';
CheckBox1.Caption := 'Antirandom';
CheckBox1.ParentShowHint := False;
CheckBox1.ShowHint := True;
CheckBox1.TabOrder := 11;
end;

begin
SafeInitForm; // Load and Show Forms
SafeShowFormModal;
// Main loop here
end.

Starblaster100
08-31-2007, 09:47 AM
frmDesign.Visible := True;


In every script that must be set to false.

Tootoot222
08-31-2007, 10:24 AM
:duh: lol i guess i should've read the tut again lol :duh:

killermage69
09-18-2008, 07:36 AM
Thank for another wonderful tut!