SRL Archive - S.M.A.R.T.

SMART canvas question ...


NickMystre

2011-12-01 00:25:07

Hello Everyone … :smile:

Please can you help a noob with what I am sure for many of you is really easy.

When using this code most of you will know that you will get yourself to the RS client login window under SMART.

program new;
{$DEFINE SMART}
{$i srl/srl.scar}

begin
ClearDebug();
SetupSRL();
end.

What I would like to do is to experiment with writing to the SMART canvas but not have to restart the windows / client each time - ie just run my modified script to observe the changes. Can someone please show me how this is done ?

Thx :garfield:
N

KingKong

2011-12-01 00:50:17

you want to stop smart restarting? the do this: smart_server := 1; before setting up srl

Coh3n

2011-12-01 00:55:04


program new;
{$DEFINE SMART}
{$i srl/srl.scar}

begin
{$IFDEF SMART}
SMART_Server := 1;
SMART_Members := False;
SMART_Signed := True;
SMART_SuperDetail := False;
{$ENDIF}

ClearDebug();
SetupSRL();
end.
Won't restart SMART each time. :)

KingKong

2011-12-01 00:59:25

@ cohen, the ifdef is not needed

Coh3n

2011-12-01 01:18:05

I know, I just like having it. No sense in setting the variables if they're never used. It doesn't really matter either way.

NickMystre

2011-12-01 02:55:11

From: Coh3n
Won't restart SMART each time. :)


@Coh3n & @KingKong: Thank you for your replies …

In looking though various scripts, I've picked up on the following.

Do these two sets of lines mean the same thing ? If not, what is the difference ?

1.
{$DEFINE SMART} *AND* {.include SRL/SRL/misc/smart.scar}

2.
{.include SRL/SRL.scar} *AND* {$i srl/srl.scar}


As for Simba and SRL-5 in docs.villavu.com, do where have similar docs for SMART ?


E1: @KingKong: I appreciate the feedback. Thank you!

Is there somewhere on the forum I might have found some information on {DEFINE} ?

From my digging around software I am aware of exported functions, but this wasn't what I meant to ask :-(
I know about dependancywalker - but haven't used it much.

E2: @Sir R. M8gic1an AND @Coh3n: Thank you both for the information and examples.

@Coh3n: I understood your {$DEFINE } explanation. Now I need to dig up some of those examples from the forum to
dissect.

Thank you.

Ciao :garfield:
N

KingKong

2011-12-01 04:11:54

From: NickMystre
@Coh3n & @KingKong: Thank you for your replies …

In looking though various scripts, I've picked up on the following.

Do these two sets of lines mean the same thing ? If not, what is the difference ?

1.
{$DEFINE SMART} *AND* {.include SRL/SRL/misc/smart.scar}

2.
{.include SRL/SRL.scar} *AND* {$i srl/srl.scar}


As for Simba and SRL-5 in docs.villavu.com, do where have similar docs for SMART ?

Thanks again.

Ciao :garfield:
N


1) Yes they do the exact same thing.
2) Yes they also do the same thing.
.include = $i (done for backwards compatibility)

Docs for SMART? you mean a list of all the functions in SMART? because you won't need it unless you plan to use it without Simba. Almost every function you need to auto on RS is included with SRL. If you really want to find out all the functions that SMART exports, download dependency walker(http://www.dependencywalker.com/) and open libsmart.dll with it and it will list all the functions.

Coh3n

2011-12-01 13:11:22

If you're simply looking for functions to paint onto SMART, you can check out SRL/SRL/misc/paintsmart.scar.

Sir R. M8gic1an

2011-12-01 14:42:41

{$DEFINE SMART} *AND* {.include SRL/SRL/misc/smart.scar}

These two are not the same. One includes the file Smart.scar, the other defines a 'variable' (for lack of correct term) compiler derivative, cheers Cohen, called SMART.

In practice, if you DEFINE SMART and then include SRL, SRL will include SMART for you. But in many other scenarios DEFINE is used for other things.

For example, DEFINE SIMBA or DEFINE SCAR 3_25UP were used for us to know which program you are using (Simba vs Scar), so that we could make SRL compatible with both as they support different functions, and the effects of this can still be seen in places of the include.

-RM

Coh3n

2011-12-01 15:10:31

{$DEFINE WHATEVER} is a compiler derivative, for example:

{$DEFINE EXAMPLE}

{$IFDEF EXAMPLE}
procedure a();
begin
end;
{$ELSE}
procedure b();
begin
end;
{$ENDIF}

begin
end.
If EXAMPLE is defined, like it is in this example, then procedure a is a valid procedure (i.e. it's compiled), and b isn't (it's not compiled). If EXAMPLE isn't defined, b is valid and a isn't. Know what I mean?

Wyn

2011-12-01 16:16:57

I just set target to smart and it doesn't restart smart…