Results 1 to 7 of 7

Thread: File Access Error The Nothing?

  1. #1
    Join Date
    Dec 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default File Access Error The Nothing?

    Ok, well i use to be quite active around here then i left rs and left srl-forums too. Well now im back and im making a few scripts again. The one that im making right now is very simple. Its not finished yet though. Im hoping someone can help me and tell me when im getting File Access Error and why it doesnt do anything after repeat in the main loop because i tested it with numbers having it write a number 1 -10 depenging on how far it got. It seemed to end right at the repeat and not do anything.

    Well Heres the script:

    SCAR Code:
    program Moola;

    {.include SRL/srl.scar}

    var SpinNumber, WheelNumber:Integer;

    const
    TimesToTry =  10; //Number Of Time You Want It To Search For The Wheel.
    WaitBetweenTries =  7200000; //Number Of Millseconds Between Searches (7200000 = 2 Hours ) (wheel only come about every 6 hours but is suposivly random)

    function IsHomePage: boolean;

    begin
      result:= GetColor(745, 406) =13160660;
    end;

    procedure SearchHome;
    begin
      if IsHomePage then
      begin
        WriteLn('Were at The Search Home Page')
        HoldMouse(632, 334,True);
        MMouse(437, 335, 0, 0);       {< Gets ready To Input Text! }
        ReleaseMouse(437, 335, True);
        WriteLn('Clearing Old Text');
      end else
      begin
        writeln('were not at the search Homepage')
        HoldMouse(427, 207,True);
        MMouse(256, 207, 0, 0);       {< Gets ready To Input Text! }
        ReleaseMouse(256, 207, True);
        WriteLn('Clearing Old Text');
      end;
       SpinNumber := SpinNumber+1;
    end;

    procedure WriteText;  {Writes A text, edit it if you want} {its what it searches}
    begin
      Wait(700+random(400))
      begin
        Case Random(20) of
          0: TypeSend('NHL Stats');
          1: TypeSend('SRL Forums');
          2: TypeSend('Yahoo');
          3: TypeSend('Moola Strategys');
          4: TypeSend('Runescape');
          5: TypeSend('Runescape Scar');
          6: TypeSend('Hockey Standings');
          7: TypeSend('Hockey Playoffs');
          8: TypeSend('Msn Messenger');
          9: TypeSend('Moola Search');
          10: TypeSend('Freddy1990');
          11: TypeSend('Scar 3.14');
          12: TypeSend('Ice Hockey');
          13: TypeSend('Canada');
          14: TypeSend('USA');
          15: TypeSend('SRL Manuel');
          16: TypeSend('Computers');
          17: TypeSend('ebay');
          18: TypeSend('wikipedia');
          19: TypeSend('sports');
          20: TypeSend('Traveling');
        end;
        writeLn('Started Search')
      end;
    end;

    procedure refresh;
    begin
      Mouse(116, 38, 4, 4, true)
      wait(2000+random(100))
    end;

    Function IsThereWheel : Boolean;
    begin
       result:= GetColor(387, 278) =10053171;
    end;

    procedure ContinueOfWheel;
    begin
      if (Not(IsThereWheel)) then
      begin
        WheelNumber:= WheelNumber+1
      end;
    end;



    procedure PrintProgressReport;
    begin
      WriteLn(' ----------------------------------')
      WriteLn('We have searched ' + IntToStr(SpinNumber) + ' Times!')
      WriteLn('We Have Gotten The Wheel '+ IntToStr(WheelNumber) + ' Times!')
      WriteLn(' ----------------------------------')
    end;


    begin
      SetupSRL;
      IsHomepage;
      repeat
        Wait(WaitBetweenTries+random(40000))
        SearchHome;
        WriteText;
        IsThereWheel;
        ContinueOfWheel;
        refresh;
        PrintProgressReport;
      until(SpinNumber>TimesToTry)
    end.
    YoHoJo Is My Daddy
    We do not break any laws. We merely play "against the rules". We cheat. Thats what we are good at,thats what we do."
    WT-Fakawi

  2. #2
    Join Date
    Mar 2008
    Location
    Indiana
    Posts
    192
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm not quite sure what the problem is but. on your random cases it will never end up on traveling. Because
    Code:
    Random(20)
    returns 0 to 19 not 0 to 20.

    Couldn't resit not to point it out.

    Edit
    SCAR Code:
    {.include SRL/srl.scar}
    needs to be
    SCAR Code:
    {.include SRL/SRL.scar}
    or SRL won't compile correctly.


    Edit2:
    SCAR Code:
    Function IsThereWheel : Boolean;
    begin
       result:= GetColor(387, 278) =10053171;
    end;
    That does not return true or false I don't think correct me if I'm wrong.
    I think it should be something like this.
    SCAR Code:
    Function IsThereWheel : Boolean;
    begin
       if (GetColor(387, 278) = 10053171) then
         result := True;
       else
         result := False;
    end;
    I may be wrong but please correct me.

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

    Default

    @smithsps
    You don't need to have the spelling like that, its not case sensative.

    But what you could do, is go onto options -> firewall options (make sure it the file access one) then select always ask so it asks you if you want to access the file. IMO its worth it to put up with the little pop up every so often

  4. #4
    Join Date
    Mar 2008
    Location
    Indiana
    Posts
    192
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @ Dude Richard
    When ever you don't the case right it says
    SRL Compiled in 0 msec
    Which is not possible yet

    If the case is right it says (like normal)
    SRL Compiled in 16 msec

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

    Default

    No, it doesn't...

    I have a script which has it in lowercase and all the srl functions work fine.

    And tbh I don't care if it says O msec as long as it still works.

  6. #6
    Join Date
    Mar 2008
    Location
    Indiana
    Posts
    192
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    True , i just preferred that...

  7. #7
    Join Date
    Dec 2006
    Posts
    281
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    OMFG, lol guys this is sad i didnt even realise this till now, i had
    Wait(WaitBetweenTries+random(40000))

    near the begining of my script not the end XD i did that and the problems fixed! thanks for all your time and efforts though
    YoHoJo Is My Daddy
    We do not break any laws. We merely play "against the rules". We cheat. Thats what we are good at,thats what we do."
    WT-Fakawi

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. file access error :(
    By Griff in forum OSR Help
    Replies: 3
    Last Post: 05-22-2008, 07:12 AM

Posting Permissions

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