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

News:

Every system can win in the short-term. It just depends on the spins you play.

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: Tutorial V4 (Code) In Depth

Started by ThomasGrant, Aug 12, 08:00 AM 2010

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ThomasGrant

THE CODE

Into the fire we go.

I didn't think coding was going to be this easy.
The more I learn.
The easier it gets.
The more I ask, the more I learn.

Now we finished putting the bot all together.
It time to fill it up.

So, I am a bit unconventional when it comes to coding.
I do things in a very logical neat way.
Just to keep organised.
And to organise sections.
I use lots of comments.

Here is an example of how I keep bits separated.

{#### Window Operations ##############################################}

{@@@@@@@@@@@@@@@@@@@@ Key element procedures @@@@@@@@@@@@@@@@@@@@@@@@@}

{@@@@@@@@@@@@@@@@@@@@ Form procedures @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}

Notes to self...
And other bits.

Not sure how other people code.
But this is how I do it.
"What we do in life, echoes in eternity"

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

ThomasGrant

First we have our very important.
Variables.

{###### Variables ###########}
var
MainForm3: TForm3;
var F : Text;
   S : String;  
var i;
{###### End: Variables ######}


This will grow and grow as we add more to the code.

Here you can see what I mean by comments.
I give myself a start and end section.

Next I do things that relate to the window.

{#### Window Operations ##############################################}
procedure close_me;
begin
   if Self.Top<0 then Self.Top:=0;
   if Self.Left<0 then Self.Left:=0;
   AssignFile(F,'c:\rss-data\winpos');
   Rewrite(F);              
   Writeln(F,Self.Top);
   Writeln(F,Self.Left);
   CloseFile(F);
end;

procedure load_winpos;
begin
   AssignFile(F,'c:\rss-data\winpos');{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 Self.Top:=s;
       if i=1 then Self.Left:=s;
       I := i+1;
   end;
   CloseFile(F);//close the file
end;

procedure Message(arg1);
begin
   ShowMessage(arg1);
end;
{#### End: Window Operations #########################################}


Lets look at these three.
procedure close_me;
procedure load_winpos;
procedure Message(arg1);

The first one on close, saves the window position to a specific file.
'c:\rss-data\winpos'

The second one, on open. Opens the window in its last saved window position.

I also did the same for form3.
Only changed the file name.
'c:\rss-data\reswinpos'

So on both windows when you open and close them.
They will always remember their position.

procedure Message(arg1);
Here is a handy procedure.
That I can call up anywhere.

procedure MainMenu1_AboutV4Click(Sender: TObject);
begin
Message('Toms Bot: V4
Created and designed by...
Thomas R. Grant
[url=link:://:.thomsargrant.com]:.thomsargrant.com[/url]');
end;


So we have the procedure "Message" followed by what ever message you want to show.

You could even put it in another procedure.

Like this.
procedure Button1Click(Sender: TObject);
begin
 Label1.Caption:='hi there';
 Label1.Caption:=mouse.CursorPos;
 Message('Current Mouse or cursor postition is. '+IntToStr(mouse.CursorPos));
end;

[attachimg=1]
Neat huh...
"What we do in life, echoes in eternity"

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

ThomasGrant

Easy so far.

Now let's make a procedure to turn objects on or of.

Here is a list of all the objects that are used in the bot.

MainMenu1_Load
MainMenu1_Save
MainMenu1_SaveRes
MainMenu1_EuroGrand
MainMenu1_Bet365
MainMenu1_Tropez
MainMenu1_Mapau
MainMenu1_21Nova
MainMenu1_William
MainMenu1_10c
MainMenu1_1D
MainMenu1_25c
MainMenu1_1c
MainMenu1_05
MainMenu1_Chip1
MainMenu1_Chip2
MainMenu1_Chip3
MainMenu1_Chip4
MainMenu1_Chip5
MainMenu1_Chip6
MainMenu1_Chip7
MainMenu1_UndoLast
MainMenu1_Man
MainMenu1_CasMode
MainMenu1_OutPutWin
MainMenu1_Dollar
MainMenu1_Euro
MainMenu1_Pound
MainMenu1_AboutV4
Test1
Test2
Button_UnDo
Button_Auto
Button_Manual
Button_Stop
Button_Start
Button_Collect
Button_Exit
Button_ModEC
Button_ModDC
Button0
Button1
Button2
Button3
Button4
Button5
Button6
Button7
Button8
Button9
Button10
Button11
Button12
Button13
Button14
Button15
Button16
Button17
Button18
Button19
Button20
Button21
Button22
Button23
Button24
Button25
Button26
Button27
Button28
Button29
Button30
Button31
Button32
Button33
Button34
Button35
Button36
CheckBoxRed
CheckBoxBlack
CheckBoxLow
CheckBoxHigh
CheckBoxOdd
CheckBoxEven
CheckBoxDL
CheckBoxDM
CheckBoxDH
CheckBoxDLM
CheckBoxDLH
CheckBoxDMH
CheckBoxC1
CheckBoxC2
CheckBoxC3
CheckBoxC12
CheckBoxC13
CheckBoxC23
EditRedMax=
EditBlackMax
EditLowMax
EditHighMax
EditOddMax
EditEvenMax
EditDLM
EditDMM
EditDHM
EditDLMM
EditDLHM
EditDMHM
EditC1M
EditC2M
EditC3M
EditC12M
EditC13M
Edit23M
EditRedUnit
EditBlackUnit
EditLowUnit
EditHighUnit
EditOddUnit
EditEvenUnit
EditDLU
EditDMU
EditDHU
EditDLMU
EditDLHU
EditDMHU
EditC1U
EditC2U
EditC3U
EditC12U
EditC13U
EditC23U
EditBalance
EditProfit
EditStopLoss
EditTest1
EditSpins
EditChip


So a good idea is to break it up.
Into sections.
We have menus.
Buttons
CheckBoxes
and
Edit fields.

And we can separate them into even smaller components.

So lets start with the menus.
First we make a procedure and give it an argument.
You will see why in a second.

Here is the procedure.

{#### Turn on or off objects ############}
procedure turn_off_things_menu(arg1);
begin
MainMenu1_Load.Enabled:=arg1;
MainMenu1_Save.Enabled:=arg1;
MainMenu1_SaveRes.Enabled:=arg1;
MainMenu1_EuroGrand.Enabled:=arg1;
MainMenu1_Bet365.Enabled:=arg1;
MainMenu1_Tropez.Enabled:=arg1;
MainMenu1_Mapau.Enabled:=arg1;
MainMenu1_21Nova.Enabled:=arg1;
MainMenu1_William.Enabled:=arg1;
MainMenu1_10c.Enabled:=arg1;
MainMenu1_1D.Enabled:=arg1;
MainMenu1_25c.Enabled:=arg1;
MainMenu1_1c.Enabled:=arg1;
MainMenu1_05.Enabled:=arg1;
MainMenu1_Chip1.Enabled:=arg1;
MainMenu1_Chip2.Enabled:=arg1;
MainMenu1_Chip3.Enabled:=arg1;
MainMenu1_Chip4.Enabled:=arg1;
MainMenu1_Chip5.Enabled:=arg1;
MainMenu1_Chip6.Enabled:=arg1;
MainMenu1_Chip7.Enabled:=arg1;
MainMenu1_UndoLast.Enabled:=arg1;
MainMenu1_Man.Enabled:=arg1;
MainMenu1_CasMode.Enabled:=arg1;
MainMenu1_OutPutWin.Enabled:=arg1;
MainMenu1_Dollar.Enabled:=arg1;
MainMenu1_Euro.Enabled:=arg1;
MainMenu1_Pound.Enabled:=arg1;
MainMenu1_AboutV4.Enabled:=arg1;
end;
{#### End: Turn on or off objects #######}


And to use it.
turn_off_things_menu(true);
or
turn_off_things_menu(false);

This will just turn them on.
Or of.

Darn simple.
"What we do in life, echoes in eternity"

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

ThomasGrant

Now to test it out.
That's why I made those two test buttons.

procedure Test1Click(Sender: TObject);
begin
  turn_off_things_menu(true);                              
end;

procedure Test2Click(Sender: TObject);
begin
   turn_off_things_menu(false);        
end;


You can see in the second picture,
That the menus are all ghosted.

[attachthumb=#]

[attachthumb=#]

[attachthumb=#]

"What we do in life, echoes in eternity"

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

ThomasGrant

We can modify what menus to leave out later.

Now onto the buttons.
Here is the list of all the buttons.

Test1
Test2
Button_UnDo
Button_Auto
Button_Manual
Button_Stop
Button_Start
Button_Collect
Button_Exit
Button_ModEC
Button_ModDC
Button0
Button1
Button2
Button3
Button4
Button5
Button6
Button7
Button8
Button9
Button10
Button11
Button12
Button13
Button14
Button15
Button16
Button17
Button18
Button19
Button20
Button21
Button22
Button23
Button24
Button25
Button26
Button27
Button28
Button29
Button30
Button31
Button32
Button33
Button34
Button35
Button36


We are going to use the same code as we did for the menus.
Plus we don't want all the button of. Now do we.

procedure turn_off_things_buttons(arg1);
begin
Button_Stop.Enabled:=arg1;
Button_Start.Enabled:=arg1;
Button_Collect.Enabled:=arg1;
Button_Exit.Enabled:=arg1;
Button_ModEC.Enabled:=arg1;
Button_ModDC.Enabled:=arg1;
Button0.Enabled:=arg1;
Button1.Enabled:=arg1;
Button2.Enabled:=arg1;
Button3.Enabled:=arg1;
Button4.Enabled:=arg1;
Button5.Enabled:=arg1;
Button6.Enabled:=arg1;
Button7.Enabled:=arg1;
Button8.Enabled:=arg1;
Button9.Enabled:=arg1;
Button10.Enabled:=arg1;
Button11.Enabled:=arg1;
Button12.Enabled:=arg1;
Button13.Enabled:=arg1;
Button14.Enabled:=arg1;
Button15.Enabled:=arg1;
Button16.Enabled:=arg1;
Button17.Enabled:=arg1;
Button18.Enabled:=arg1;
Button19.Enabled:=arg1;
Button20.Enabled:=arg1;
Button21.Enabled:=arg1;
Button22.Enabled:=arg1;
Button23.Enabled:=arg1;
Button24.Enabled:=arg1;
Button25.Enabled:=arg1;
Button26.Enabled:=arg1;
Button27.Enabled:=arg1;
Button28.Enabled:=arg1;
Button29.Enabled:=arg1;
Button30.Enabled:=arg1;
Button31.Enabled:=arg1;
Button32.Enabled:=arg1;
Button33.Enabled:=arg1;
Button34.Enabled:=arg1;
Button35.Enabled:=arg1;
Button36.Enabled:=arg1;
end;


And we just test it again.

procedure Test1Click(Sender: TObject);
begin
  turn_off_things_buttons(true);                               
end;

procedure Test2Click(Sender: TObject);
begin
   turn_off_things_buttons(false);
end;


Here is what it looks like.
"What we do in life, echoes in eternity"

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

ThomasGrant

Now we continue with ease with the last two.
CheckBoxes and Edit Fields.

It's the same steps as before.
So to save time.
Here is the completed code for that section with some modifications.

{#### Turn on or off objects ############}
procedure turn_off_things_menu(arg1);
begin
MainMenu1_EuroGrand.Enabled:=arg1;
MainMenu1_Bet365.Enabled:=arg1;
MainMenu1_Tropez.Enabled:=arg1;
MainMenu1_Mapau.Enabled:=arg1;
MainMenu1_21Nova.Enabled:=arg1;
MainMenu1_William.Enabled:=arg1;
MainMenu1_10c.Enabled:=arg1;
MainMenu1_1D.Enabled:=arg1;
MainMenu1_25c.Enabled:=arg1;
MainMenu1_1c.Enabled:=arg1;
MainMenu1_05.Enabled:=arg1;
MainMenu1_Chip1.Enabled:=arg1;
MainMenu1_Chip2.Enabled:=arg1;
MainMenu1_Chip3.Enabled:=arg1;
MainMenu1_Chip4.Enabled:=arg1;
MainMenu1_Chip5.Enabled:=arg1;
MainMenu1_Chip6.Enabled:=arg1;
MainMenu1_Chip7.Enabled:=arg1;
MainMenu1_OutPutWin.Enabled:=arg1;
MainMenu1_Dollar.Enabled:=arg1;
MainMenu1_Euro.Enabled:=arg1;
MainMenu1_Pound.Enabled:=arg1;
end;

procedure turn_off_things_buttons(arg1);
begin
Button_Stop.Enabled:=arg1;
Button_Start.Enabled:=arg1;
Button_Collect.Enabled:=arg1;
Button_Exit.Enabled:=arg1;
Button_ModEC.Enabled:=arg1;
Button_ModDC.Enabled:=arg1;
Button0.Enabled:=arg1;
Button1.Enabled:=arg1;
Button2.Enabled:=arg1;
Button3.Enabled:=arg1;
Button4.Enabled:=arg1;
Button5.Enabled:=arg1;
Button6.Enabled:=arg1;
Button7.Enabled:=arg1;
Button8.Enabled:=arg1;
Button9.Enabled:=arg1;
Button10.Enabled:=arg1;
Button11.Enabled:=arg1;
Button12.Enabled:=arg1;
Button13.Enabled:=arg1;
Button14.Enabled:=arg1;
Button15.Enabled:=arg1;
Button16.Enabled:=arg1;
Button17.Enabled:=arg1;
Button18.Enabled:=arg1;
Button19.Enabled:=arg1;
Button20.Enabled:=arg1;
Button21.Enabled:=arg1;
Button22.Enabled:=arg1;
Button23.Enabled:=arg1;
Button24.Enabled:=arg1;
Button25.Enabled:=arg1;
Button26.Enabled:=arg1;
Button27.Enabled:=arg1;
Button28.Enabled:=arg1;
Button29.Enabled:=arg1;
Button30.Enabled:=arg1;
Button31.Enabled:=arg1;
Button32.Enabled:=arg1;
Button33.Enabled:=arg1;
Button34.Enabled:=arg1;
Button35.Enabled:=arg1;
Button36.Enabled:=arg1;
end;

procedure turn_off_things_checkbox(arg1);
begin
CheckBoxRed.Enabled:=arg1;
CheckBoxBlack.Enabled:=arg1;
CheckBoxLow.Enabled:=arg1;
CheckBoxHigh.Enabled:=arg1;
CheckBoxOdd.Enabled:=arg1;
CheckBoxEven.Enabled:=arg1;
CheckBoxDL.Enabled:=arg1;
CheckBoxDM.Enabled:=arg1;
CheckBoxDH.Enabled:=arg1;
CheckBoxDLM.Enabled:=arg1;
CheckBoxDLH.Enabled:=arg1;
CheckBoxDMH.Enabled:=arg1;
CheckBoxC1.Enabled:=arg1;
CheckBoxC2.Enabled:=arg1;
CheckBoxC3.Enabled:=arg1;
CheckBoxC12.Enabled:=arg1;
CheckBoxC13.Enabled:=arg1;
CheckBoxC23.Enabled:=arg1;
end;

procedure turn_off_things_edit(arg1);
begin
EditRedMax.Enabled:=arg1;
EditBlackMax.Enabled:=arg1;
EditLowMax.Enabled:=arg1;
EditHighMax.Enabled:=arg1;
EditOddMax.Enabled:=arg1;
EditEvenMax.Enabled:=arg1;
EditDLM.Enabled:=arg1;
EditDMM.Enabled:=arg1;
EditDHM.Enabled:=arg1;
EditDLMM.Enabled:=arg1;
EditDLHM.Enabled:=arg1;
EditDMHM.Enabled:=arg1;
EditC1M.Enabled:=arg1;
EditC2M.Enabled:=arg1;
EditC3M.Enabled:=arg1;
EditC12M.Enabled:=arg1;
EditC13M.Enabled:=arg1;
Edit23M.Enabled:=arg1;
EditRedUnit.Enabled:=arg1;
EditBlackUnit.Enabled:=arg1;
EditLowUnit.Enabled:=arg1;
EditHighUnit.Enabled:=arg1;
EditOddUnit.Enabled:=arg1;
EditEvenUnit.Enabled:=arg1;
EditDLU.Enabled:=arg1;
EditDMU.Enabled:=arg1;
EditDHU.Enabled:=arg1;
EditDLMU.Enabled:=arg1;
EditDLHU.Enabled:=arg1;
EditDMHU.Enabled:=arg1;
EditC1U.Enabled:=arg1;
EditC2U.Enabled:=arg1;
EditC3U.Enabled:=arg1;
EditC12U.Enabled:=arg1;
EditC13U.Enabled:=arg1;
EditC23U.Enabled:=arg1;
EditBalance.Enabled:=arg1;
EditProfit.Enabled:=arg1;
EditStopLoss.Enabled:=arg1;
EditTest1.Enabled:=arg1;
EditSpins.Enabled:=arg1;
EditChip.Enabled:=arg1;
end;
{#### End: Turn on or off objects #######}


Now where to put it?
We put it when the program activates.

procedure Form2Activate(Sender: TObject);
begin
   load_winpos;
turn_off_things_menu(false);
turn_off_things_buttons(false);
turn_off_things_checkbox(false);
turn_off_things_edit(false);
end;


Here is what the end result looks like.

You get this look when the program starts.

[attachimg=#]
"What we do in life, echoes in eternity"

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

VLS

Quote from: ThomasGrant on Aug 12, 12:43 PM 2010
Here is what the end result looks like.

You get this look when the program starts.

.. that looks very VERY nice!

Good job Thomas  :thumbsup:
🡆 ROULETTEIDEAS․COM, home of the RIBOT WEB software, featuring Bet Selection and Money Management modules with a MULTI-LANGUAGE programming interface! ✔️

ThomasGrant

Now the reason I did all this.
Was so that I could chose what mode to play in.
What features to turn on or of during that mode.

So to continue with this lets use the buttons.
They are also in the menus.

"What we do in life, echoes in eternity"

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

ThomasGrant

Ok, I wanted to make some more minor modifications.

{#### Turn on or off objects ############}
procedure turn_off_things_menu(arg1);
begin
MainMenu1_Load.Enabled:=arg1;
MainMenu1_Save.Enabled:=arg1;
MainMenu1_SaveRes.Enabled:=arg1;
MainMenu1_EuroGrand.Enabled:=arg1;
MainMenu1_Bet365.Enabled:=arg1;
MainMenu1_Tropez.Enabled:=arg1;
MainMenu1_Mapau.Enabled:=arg1;
MainMenu1_21Nova.Enabled:=arg1;
MainMenu1_William.Enabled:=arg1;
MainMenu1_10c.Enabled:=arg1;
MainMenu1_1D.Enabled:=arg1;
MainMenu1_25c.Enabled:=arg1;
MainMenu1_1c.Enabled:=arg1;
MainMenu1_05.Enabled:=arg1;
MainMenu1_Chip1.Enabled:=arg1;
MainMenu1_Chip2.Enabled:=arg1;
MainMenu1_Chip3.Enabled:=arg1;
MainMenu1_Chip4.Enabled:=arg1;
MainMenu1_Chip5.Enabled:=arg1;
MainMenu1_Chip6.Enabled:=arg1;
MainMenu1_Chip7.Enabled:=arg1;
MainMenu1_UndoLast.Enabled:=arg1;
MainMenu1_Man.Enabled:=arg1;
MainMenu1_CasMode.Enabled:=arg1;
MainMenu1_OutPutWin.Enabled:=arg1;
MainMenu1_Dollar.Enabled:=arg1;
MainMenu1_Euro.Enabled:=arg1;
MainMenu1_Pound.Enabled:=arg1;
MainMenu1_AboutV4.Enabled:=arg1;
end;

procedure turn_off_things_buttons(arg1);
begin
Button0.Enabled:=arg1;
Button1.Enabled:=arg1;
Button2.Enabled:=arg1;
Button3.Enabled:=arg1;
Button4.Enabled:=arg1;
Button5.Enabled:=arg1;
Button6.Enabled:=arg1;
Button7.Enabled:=arg1;
Button8.Enabled:=arg1;
Button9.Enabled:=arg1;
Button10.Enabled:=arg1;
Button11.Enabled:=arg1;
Button12.Enabled:=arg1;
Button13.Enabled:=arg1;
Button14.Enabled:=arg1;
Button15.Enabled:=arg1;
Button16.Enabled:=arg1;
Button17.Enabled:=arg1;
Button18.Enabled:=arg1;
Button19.Enabled:=arg1;
Button20.Enabled:=arg1;
Button21.Enabled:=arg1;
Button22.Enabled:=arg1;
Button23.Enabled:=arg1;
Button24.Enabled:=arg1;
Button25.Enabled:=arg1;
Button26.Enabled:=arg1;
Button27.Enabled:=arg1;
Button28.Enabled:=arg1;
Button29.Enabled:=arg1;
Button30.Enabled:=arg1;
Button31.Enabled:=arg1;
Button32.Enabled:=arg1;
Button33.Enabled:=arg1;
Button34.Enabled:=arg1;
Button35.Enabled:=arg1;
Button36.Enabled:=arg1;
end;

procedure turn_off_things_checkbox(arg1);
begin
CheckBoxRed.Enabled:=arg1;
CheckBoxBlack.Enabled:=arg1;
CheckBoxLow.Enabled:=arg1;
CheckBoxHigh.Enabled:=arg1;
CheckBoxOdd.Enabled:=arg1;
CheckBoxEven.Enabled:=arg1;
CheckBoxDL.Enabled:=arg1;
CheckBoxDM.Enabled:=arg1;
CheckBoxDH.Enabled:=arg1;
CheckBoxDLM.Enabled:=arg1;
CheckBoxDLH.Enabled:=arg1;
CheckBoxDMH.Enabled:=arg1;
CheckBoxC1.Enabled:=arg1;
CheckBoxC2.Enabled:=arg1;
CheckBoxC3.Enabled:=arg1;
CheckBoxC12.Enabled:=arg1;
CheckBoxC13.Enabled:=arg1;
CheckBoxC23.Enabled:=arg1;
end;

procedure turn_off_things_edit(arg1);
begin
EditRedMax.Enabled:=arg1;
EditBlackMax.Enabled:=arg1;
EditLowMax.Enabled:=arg1;
EditHighMax.Enabled:=arg1;
EditOddMax.Enabled:=arg1;
EditEvenMax.Enabled:=arg1;
EditDLM.Enabled:=arg1;
EditDMM.Enabled:=arg1;
EditDHM.Enabled:=arg1;
EditDLMM.Enabled:=arg1;
EditDLHM.Enabled:=arg1;
EditDMHM.Enabled:=arg1;
EditC1M.Enabled:=arg1;
EditC2M.Enabled:=arg1;
EditC3M.Enabled:=arg1;
EditC12M.Enabled:=arg1;
EditC13M.Enabled:=arg1;
Edit23M.Enabled:=arg1;
EditRedUnit.Enabled:=arg1;
EditBlackUnit.Enabled:=arg1;
EditLowUnit.Enabled:=arg1;
EditHighUnit.Enabled:=arg1;
EditOddUnit.Enabled:=arg1;
EditEvenUnit.Enabled:=arg1;
EditDLU.Enabled:=arg1;
EditDMU.Enabled:=arg1;
EditDHU.Enabled:=arg1;
EditDLMU.Enabled:=arg1;
EditDLHU.Enabled:=arg1;
EditDMHU.Enabled:=arg1;
EditC1U.Enabled:=arg1;
EditC2U.Enabled:=arg1;
EditC3U.Enabled:=arg1;
EditC12U.Enabled:=arg1;
EditC13U.Enabled:=arg1;
EditC23U.Enabled:=arg1;
EditBalance.Enabled:=arg1;
EditProfit.Enabled:=arg1;
EditStopLoss.Enabled:=arg1;
EditTest1.Enabled:=arg1;
EditSpins.Enabled:=arg1;
EditChip.Enabled:=arg1;
end;

procedure turn_off_things_mod(arg1);
begin
Button_ModEC.Enabled:=arg1;
Button_ModDC.Enabled:=arg1;
end;

procedure turn_off_things_go(arg1);
begin
Button_Stop.Enabled:=arg1;
Button_Start.Enabled:=arg1;
Button_Collect.Enabled:=arg1;
end;
{#### End: Turn on or off objects #######}


procedure Form2Activate(Sender: TObject);
begin
    load_winpos;
turn_off_things_menu(false);
turn_off_things_buttons(false);
turn_off_things_checkbox(false);
turn_off_things_edit(false);
turn_off_things_mod(false);
turn_off_things_go(false);
end;


Now we can move on to adding this to the buttons and menus.

procedure Button_AutoClick(Sender: TObject);
begin
 
end;


procedure Button_ManualClick(Sender: TObject);
begin
 
end;


procedure Button_AutoClick(Sender: TObject);
begin
turn_off_things_buttons(false);
turn_off_things_checkbox(true);
turn_off_things_edit(true);
turn_off_things_mod(true);
turn_off_things_go(true);
end;

procedure Button_ManualClick(Sender: TObject);
begin
turn_off_things_buttons(true);
turn_off_things_checkbox(true);
turn_off_things_edit(true);
turn_off_things_mod(true);
turn_off_things_go(true);
end;


Not a big difference between the two is there?
But that's ok.

We use bit of this during play.
Turning of things.
So you don't stuff up any settings while the game is in play.
"What we do in life, echoes in eternity"

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

ThomasGrant

So that is how you can turn an object on or of.
Using a procedure. And an argument.

Ok, that was all fairly easy.
And to understand.
And to follow.

Here is the updated zipfile.

Next on the list of things to do is...

Save and Load
"What we do in life, echoes in eternity"

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

ThomasGrant

Ahh, sometimes you forget to do things.

On form3.
I forgot to put Close(); on the exit button.

And in form 2.
I forgot to turn the menus back on.

procedure Button_AutoClick(Sender: TObject);
begin
    turn_off_things_menu(true);
    turn_off_things_buttons(false);
    turn_off_things_checkbox(true);
    turn_off_things_edit(true);
    turn_off_things_mod(true);
    turn_off_things_go(true);
end;

procedure Button_ManualClick(Sender: TObject);
begin
    turn_off_things_menu(true);
    turn_off_things_buttons(true);
    turn_off_things_checkbox(true);
    turn_off_things_edit(true);
    turn_off_things_mod(true);
    turn_off_things_go(true);
end;


Form 3.
procedure Button_ExitClick(Sender: TObject);
begin
    Close();
end;


Anyway, onto LOAD and SAVE.

Lets work with for 3 for now.
Because that one is a lot easier.

So the first thing we got to do.
Is change the ReadOnly state from true to false.
This way you can type something in the memo to see the affect.
The ReadOnly is in the properties tab.

procedure Button_SaveClick(Sender: TObject);
begin
    SaveDialog1.Execute(false);
    MemoResAll.Lines.SaveToFile(SaveDialog1.FileName);
end;


So lets take a look a the pictures.

Just a reminder.
To add a suffix at the end of the file name.
I just named it testmessage
I forgot to add in the .txt
So had trouble uploading it here.

Note: SaveDialog1.Execute(false);
You have no idea what I went through to get this bit to work.
I think I may have mentioned it in a previous tutorial.
"What we do in life, echoes in eternity"

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

ThomasGrant

That wasn't all that hard, now was it?

Now we move onto form2 where have open and save dialogs.
This can be done in the main menu.
[attachimg=1]
"What we do in life, echoes in eternity"

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

ThomasGrant

Now before I do that.
I normally forget to tell you something.
I forgot to tell you how we are going to transfer info over to Form3.
This also took a long time to figure out.

RSS Pro is an emulator not the full Delphi program.

So what works in delphi may not work in RSS Pro.

procedure Test1Click(Sender: TObject);
begin
    MainForm3 := TForm3.Create(Application);
    MainForm3.Show;
    MainForm3.MemoResAll.Lines.Add('This is a test of me sending info from form2 to for3, the balance on form 2 was '+ EditBalance.Text);{Note: This is where we will send the results to}
end;


In the previous code.
I showed you how to add and open up the third form.
Here all I did was add in one extra line.

MainForm3.MemoResAll.Lines.Add('This is a test of me sending info from form2 to for3, the balance on form 2 was '+ EditBalance.Text);{Note: This is where we will send the results to}

Since the only object we use over at form 3 is MemoResAll
To send info to it.
MainForm3.MemoResAll.Lines.Add(' ');

As yet, I have not found any other way to do this.
As long as it works.
That's all I care about.
"What we do in life, echoes in eternity"

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

-