• Welcome to #1 Roulette Forum & Message Board | www.RouletteForum.cc.

News:

WARNING: Forums often contain bad advice & systems that aren't properly tested. Do NOT believe everything. Read these links: The Facts About What Works & Why | How To Proplerly Test Systems | The Top 5 Proven Systems | Best Honest Online Casinos

Main Menu
Popular pages:

Roulette System

The Roulette Systems That Really Work

Roulette Computers

Hidden Electronics That Predict Spins

Roulette Strategy

Why Roulette Betting Strategies Lose

Roulette System

The Honest Live Online Roulette Casinos

Tom's RSS Pro for Playtech Tutorial: Using Silver's Scripts.

Started by ThomasGrant, Oct 28, 09:26 AM 2010

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

ThomasGrant

"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

ThomasGrant

I will continue to add script to this bot of mine.
Until I have it finished.
Then I may do a follow up.
Add more to this tutorial.
Show how I built it.
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

ThomasGrant

Ok, in this post.
I will be going over Load and Save.
Using the OpenDialog1 and SaveDialog1

So in these two procedures.
I will be Loading and Saving settings.

Save_Settings;

In this part of the code.
We open up the SaveDialog requester window.
SaveDialog1.Title:='Save Files: Settings'; {The Titles of the Dialog Window}

   SaveDialog1.InitialDir:='';
   SaveDialog1.DefaultExt := 'txt';
   SaveDialog1.FileName:='settings';
   SaveDialog1.Filter:='Txt files (*.txt)|*.txt';

   { InitialDir: The folder you wish the Dialog window to open in}

   SaveDialog1.Execute(false); {This Opens the Dialog window}

   if SaveDialog1.FileName='' then ShowMessage('Save file was cancelled');{If you press cancel, this message will appear}


Now, not sure if you noticed.
But we used a fair few options before the Dialog window was opened.
So let's take a look at them.

SaveDialog1.InitialDir:='';
{Opens the Dialog window in the folder you are working in}

SaveDialog1.FileName:='settings';
{Here we can set the name of the file wish to save}

SaveDialog1.DefaultExt := 'txt';
SaveDialog1.Filter:='Txt files (*.txt)|*.txt';
{These two deal with file extensions}

The next part of the code is where we save the info from Form3.

if SaveDialog1.FileName='' then ShowMessage('Save file was cancelled');{If you press cancel, this message will appear}
   else if SaveDialog1.FileName<>'' then
   begin
       Form3:=TForm3.Create(Application);{Here I create the application without opening it}
       AssignFile(F,SaveDialog1.FileName);
       Rewrite(F);
Writeln(F,Form3.Edit_Max_Red.Text);
Writeln(F,Form3.Edit_Max_Black.Text);
Writeln(F,Form3.Edit_Max_High.Text);
Writeln(F,Form3.Edit_Max_Low.Text);
Writeln(F,Form3.Edit_Max_Odd.Text);
Writeln(F,Form3.Edit_Max_Even.Text);
Writeln(F,Form3.Edit_Max_DL.Text);
Writeln(F,Form3.Edit_Max_DM.Text);
Writeln(F,Form3.Edit_Max_DH.Text);
Writeln(F,Form3.Edit_Max_C1.Text);
Writeln(F,Form3.Edit_Max_C2.Text);
Writeln(F,Form3.Edit_Max_C3.Text);

Writeln(F,Form3.Edit_Max_DLM.Text);
Writeln(F,Form3.Edit_Max_DLH.Text);
Writeln(F,Form3.Edit_Max_DMH.Text);
Writeln(F,Form3.Edit_Max_C12.Text);
Writeln(F,Form3.Edit_Max_C13.Text);
Writeln(F,Form3.Edit_Max_C23.Text);

Writeln(F,Form3.Edit_Max_Tier.Text);
Writeln(F,Form3.Edit_Max_Voisins.Text);
Writeln(F,Form3.Edit_Max_Orph.Text);
       ShowMessage('Save file '+SaveDialog1.FileName);{If a filenam is selected then show this message}
       CloseFile(F);        
   end;


So that is SaveDialog.

Next is OpenDialog.
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

ThomasGrant

OpenDialog.

Here, I open the OpenDialog window so I can load in some saved settings.
OpenDialog1.Title:='Open Files: Settings'; {The Titles of the Dialog Window}

    OpenDialog1.InitialDir:='';
    OpenDialog1.DefaultExt := 'txt';
    OpenDialog1.FileName:='settings';
    OpenDialog1.Filter:='Txt files (*.txt)|*.txt';

    { InitialDir: The folder you wish the Dialog window to open in}

    OpenDialog1.Execute(false); {This Opens the Dialog window}

    if OpenDialog1.FileName='' then ShowMessage('Open file was cancelled');{If you press cancel, this message will appear}


And you add these lines in.
else if OpenDialog1.FileName<>'' then
    begin
        Form3:=TForm3.Create(Application);
        AssignFile(F,OpenDialog1.FileName);{If no file exist. Then you will get an error message}
    Reset(F);{open the file for reading}
    i := 0;
    while not eof(F) do {loop that will repeat until the end of file will be not found}
    begin
        S:=ReadLn(F); {read the first line into "s" variable}
if i=0 then Form3.Edit_Max_Red.Text:=s;
if i=1 then Form3.Edit_Max_Black.Text:=s;
if i=2 then Form3.Edit_Max_High.Text:=s;
if i=3 then Form3.Edit_Max_Low.Text:=s;
if i=4 then Form3.Edit_Max_Odd.Text:=s;
if i=5 then Form3.Edit_Max_Even.Text:=s;
if i=6 then Form3.Edit_Max_DL.Text:=s;
if i=7 then Form3.Edit_Max_DM.Text:=s;
if i=8 then Form3.Edit_Max_DH.Text:=s;
if i=9 then Form3.Edit_Max_C1.Text:=s;
if i=10 then Form3.Edit_Max_C2.Text:=s;
if i=11 then Form3.Edit_Max_C3.Text:=s;

if i=12 then Form3.Edit_Max_DLM.Text:=s;
if i=13 then Form3.Edit_Max_DLH.Text:=s;
if i=14 then Form3.Edit_Max_DMH.Text:=s;
if i=15 then Form3.Edit_Max_C12.Text:=s;
if i=16 then Form3.Edit_Max_C13.Text:=s;
if i=17 then Form3.Edit_Max_C23.Text:=s;

if i=18 then Form3.Edit_Max_Tier.Text:=s;
if i=19 then Form3.Edit_Max_Voisins.Text:=s;
if i=20 then Form3.Edit_Max_Orph.Text:=s;
        i := i+1;
    end;
    CloseFile(F);//close the file
        ShowMessage('Open file '+OpenDialog1.FileName);{If a filenam is selected then show this message}
        Form3.Showmodal;
    end;
"What we do in life, echoes in eternity"

*Link Removed*  The Roulette Professor. *Link Removed*

-