Results 1 to 7 of 7

Thread: Close scar reopen scar?

  1. #1
    Join Date
    Dec 2007
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Close scar reopen scar?

    ok so i want this script to close scar and reopen it... or open another one at the end of the script and then for the last line close the current one... but i just got to thinking... that would end the script... is there a way to open another one... start that script and have THAT script close the old scar? ok let me put it into steps in case this confused you

    lets say current scar is Cscar and new scar is Nscar

    1.)Cscar script opens Nscar
    2.)Cscar script starts Nscar's script
    3.)Nscar closes Cscar.


    so.... i feel like an idiot lol

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    You would probably have to do it by color/dtm/bitmap, but might not work on every computer due to different settings.

  3. #3
    Join Date
    Nov 2007
    Location
    Australia
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    [Edit] sorry I didnt read your first post properly. Yeah it would probably work.
    http://travo.freetzi.com/statsig.phpno click adds in sig please.

  4. #4
    Join Date
    Apr 2007
    Posts
    379
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes it will! Interscar messaging, Here get this. One script is running, a repeat and the other script, once it finished Sends a message. Here is an example.

    Put
    SCAR Code:
    program New;
    {.include srl/SRL.scar}

    Procedure WriteLnExample;
     begin
       SendInterScarMessage('Second', 'Not Ready');
       Wait(1000);
       WriteLn('Just for an Example');
       wait(1000);
       WriteLn('Write a couple mroe things');
       wait(1000);
       WriteLn('Ok now we are done');
       wait(1000);
     end;
     
    Procedure TellOther;
     begin
       SendInterSCARMessage('Second', 'Start');
     end;
     
    Procedure WaitForReply;
     begin
       Repeat
         Wait(1000);
         WriteLn('Waiting For Reply');
         WriteLn(TheTime);
       Until(ReadInterSCARMessage('First') = 'Good To Go');
      WriteLn('Recieved Reply');
     end;
     
     
    begin
      WriteLnExample;
      TellOther;
      WaitForReply;
    end.

    in the First Scar(a)
    and

    SCAR Code:
    program TheOther;
    {.include srl/SRL.scar}

    Procedure WaitForMessage;
     begin
       SendInterSCARMessage('First', 'Not Ready');
       Repeat
         Wait(100);
         WritelN('Waiting');
         WriteLn(TheTime);
       Until(ReadInterSCARMessage('Second') = 'Start');
     end;

    Procedure RecievedMessage;
     begin
       Wait(50);
       WriteLn('Recieved Message');
       Wait(50);
       WriteLn('Second Script all Set');
       WriteLn(TheTime);
     end;
     
    Procedure ReplyToFirst;
     begin
       WriteLn('Sending Reply');
       SendInterSCARMessage('First', 'Good To Go');
       WriteLn(TheTime);
     end;
     
     
    begin
    WaitForMessage;
    RecievedMessage;
    ReplyToFirst;
    end.
    in the second SCAR(b);

    Run Scar A and Then Run SCAR B right next to each other. This way will start script b as soon as script a is done. It is just an example.

  5. #5
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Closing is hard.. Since scar hasn't got an way to close itself.

    You could close it by using API calls, but i assume you don't know what they are.. So, your kinda stick with stopping the script.
    Verrekte Koekwous

  6. #6
    Join Date
    Jul 2007
    Location
    St. Louis, Missouri, USA.
    Posts
    575
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Not really sure why you'd need to do this but you could certainly just have it open another one, start a script and then exit itself by pressing the close button... Or you could do interscar messaging.
    -You can call me Mick-



  7. #7
    Join Date
    Apr 2007
    Posts
    379
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think he means while he is at school he wants 1 script to run, and the other start up as soon as the first script finishes. Without him at his computer. I think Interscar messaging is the way to go.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. SRL Public will reopen...
    By Dankness in forum News and General
    Replies: 2
    Last Post: 08-12-2006, 11:53 PM
  2. Replies: 28
    Last Post: 06-22-2006, 04:27 PM

Posting Permissions

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