Results 1 to 16 of 16

Thread: {$Define SMART} and {$Define REFLECTION}

  1. #1
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default {$Define SMART} and {$Define REFLECTION}

    I think these should be put into SRL.scar:
    SCAR Code:
    {$IfDef SMART}
    {.include srl/srl/misc/smart.scar}
    {$EndIf}

    {$IfDef REFLECTION}
    {.include SRL/SRL/reflection/reflection.scar}
    {$EndIf}

    var
      World: integer;
      Signed, Members, HighDetail: boolean;

    I think this should be put into SetupSRL;
    SCAR Code:
    {$IfDef SMART}
      SmartSetupEx(World, Members, Signed, HighDetail);
      SetTargetDC(SmartGetDC);
      repeat
       wait(100);
      until(SmartGetColor(253, 233)<>1118604);
    {$EndIf}

    Then just {.include srl/srl.scar} would be enough.
    You could make script use SMART just by writing {$Define SMART} and reflection by writing {$Define REFLECTION}

    edit: btw, [ scar] tags don't recognize preprocessor commands, fix that immediately!

  2. #2
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Good idea for the S.M.A.R.T part, don't think reflection will be added tho.

  3. #3
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by N1ke! View Post
    Good idea for the S.M.A.R.T part, don't think reflection will be added tho.
    +1
    I don;t agree with adding reflection though.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  4. #4
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

  5. #5
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by marpis View Post
    why not reflection?
    Not every one appreciates Reflection. While ALMOST every one uses SMART.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  6. #6
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    Not every one appreciates Reflection. While ALMOST every one uses SMART.
    not every one appreciates olives and still they are sold in all stores? your argument has no logic.

  7. #7
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    S.M.A.R.T is default with SRL so it would be a good idea, but some people aren't away of reflection straight away, and there may be a mass of posts asking why they get errors with SRL, so perhaps not the best idea.

  8. #8
    Join Date
    Feb 2007
    Posts
    143
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you could just do this...

    setupsrl(true,false);

    true for smart false for reflection, unless your script uses it them make both booleans true

  9. #9
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Richard View Post
    S.M.A.R.T is default with SRL so it would be a good idea, but some people aren't away of reflection straight away, and there may be a mass of posts asking why they get errors with SRL, so perhaps not the best idea.
    Thats what I meant. I guess I worded it wrong -.-
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  10. #10
    Join Date
    Dec 2008
    Location
    In a galaxy far, far away...
    Posts
    584
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rogue poser View Post
    you could just do this...

    setupsrl(true,false);

    true for smart false for reflection, unless your script uses it them make both booleans true
    Not possible, since SMART and Reflection are includes.

    @noidea's topic: I think thats a pretty good idea... It can be like this:

    Scripters Side:
    SCAR Code:
    {$DEFINE SMART}
    {$DEFINE REFLECTION}
    {.include SRL/SRL.scar}

    SRL.scar:
    SCAR Code:
    {$IFDEF SMART}
      {.include SRL/SRL/misc/Smart.scar}
    {$ENDIF}

    {... all of SRL's include files...}

    // At the very end:
    {$IFDEF REFLECTION}
      {.include SRL/SRL/reflection/reflection.scar}
    {$ENDIF}

    So I don't see why not?



    ~NS

  11. #11
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    If you want to do {$DEFINE Reflection} Then I could probably add it into the reflection files. It will NOT go into SRL though.

    I think the SMART one could though.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  12. #12
    Join Date
    Dec 2008
    Location
    In a galaxy far, far away...
    Posts
    584
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wait lol I just realized... There is not point really of using {$DEFINE Reflection} since it is simply just a one liner to include the reflection file itself? - Besides it looking better. SMART should be enough IMO.



    ~NS

  13. #13
    Join Date
    Feb 2007
    Posts
    143
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Nadeem View Post
    Not possible, since SMART and Reflection are includes.
    how is it not possible, when you setup srl it loads a bunch of includes, you could use another file as a buffer to only load the includes specified... humor me for a second

    lets pretend i made a new file setSRL.scar

    i make this

    Code:
    procedure setSRLup(isSmart,isReflection:boolean)
    begin
    
    if(isSmart)
       setupSmart
    
    if(isReflection)
       setupReflection
    
    setupSrl
    
       
    end;
    and there were 2 more files, one setupReflection one setupSmart

    it would be a bit more convenient, but then again, why waste cpu cycles

    edit: then again that wouldnt really help as it would be the same as declaring smart or reflection and just not calling it
    Last edited by rogue poser; 06-12-2009 at 07:44 AM.

  14. #14
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by rogue poser View Post
    how is it not possible, when you setup srl it loads a bunch of includes, you could use another file as a buffer to only load the includes specified... humor me for a second

    lets pretend i made a new file setSRL.scar

    i make this

    Code:
    procedure setSRLup(isSmart,isReflection:boolean)
    begin
    
    if(isSmart)
       setupSmart
    
    if(isReflection)
       setupReflection
    
    setupSrl
    
       
    end;
    and there were 2 more files, one setupReflection one setupSmart

    it would be a bit more convenient, but then again, why waste cpu cycles

    edit: then again that wouldnt really help as it would be the same as declaring smart or reflection and just not calling it
    It wouldn't work because SMART.scar overrides some of SCAR's mouse and keyboard functions when it compiles. It doesn't matter if SetupReflection or SetupSmart is called it will still be overridden.

  15. #15
    Join Date
    Dec 2008
    Location
    In a galaxy far, far away...
    Posts
    584
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    It wouldn't work because SMART.scar overrides some of SCAR's mouse and keyboard functions when it compiles. It doesn't matter if SetupReflection or SetupSmart is called it will still be overridden.
    Exactly, because either way, the SMART and Reflection file's would have to be included for that loading function to work. {$DEFINE} = much better.



    ~NS

  16. #16
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    I have added {$DEFINE SMART} at the top of Smart.scar, so it is now easier to use in your scripts.

    Just include smart, if people do not wish to use it they can just comment it out, and then in your scripts do something of the like:
    SCAR Code:
    {$IFDEF SMART}
    Procedure SetupSmart;
    begin

      SmartSetupEx(100, False, True, False);
      Wait(5000);
      SetTargetDC(SmartGetDC);
      repeat
        wait(100);
      until(RSReady);

    end;
    {$ENDIF}

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •