Results 1 to 8 of 8

Thread: UpText Temp Fix

  1. #1
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default UpText Temp Fix

    Hi all.

    I would like to know how I can overcoem the uptext issue at the moment without having to hardcode the coordinates and without haveing to write new procedures to do the same thing

    Lets say I Use the following.

    Simba Code:
    procedure WithDrawItems;
    var
    Temp:Integer;
    Begin
      DTM_SoftClay := DTMFromString('mlwAAAHicY2dgYGgF4gogrgPibiCeAsRdQFwDxCyMDAwcQMwPxYxA/Aso/heIQ+14gCQTDowbMOLBUAAA/WYGgQ==');
      DTM_Clay := DTMFromString('mggAAAHicY2NgYGBnBBKMEJoXiIWAmAuIHYDYBYjdgdgZiG2A2AKIazJcgRqYsGDsgBEHhgAACIsDBQ==');
      OpenbankFast('db');
      Wait(500 + random(400));
    // Withdraw Soft Clay From Bank
      While (not(InvFull)) do
      Begin
    {  WithDraw(2,2,28);
      Wait(500 + random(400));}

      If WithDrawItem(DTM_SoftClay, 'dtm', 28, 'soft', []) then   // WithDraw item From Bank
      Begin
        WriteLn('Success');
        CloseBank;
        FreeDTM(DTM_SoftClay);
        FreeDTM(DTM_Clay);
      End;
      End;
    End;

    I still want to use WithDrawItem which gets it up text from rs_GetUpText, now Wizzup has made a post here about how to fix it. But I just don`t find rs_GetUpText in the srl dir. In which file is rs_GetUpText so that I can edit it.

    And if it is not edible because it is harcoded and part of the ocr engine, how can I overcome this issue without hardcoding and a new procedure or function? Is it possible?

    Or should i Just use WithDraw at the moment and harcode everything, but then afterwards all hardcoded scripts would have to be changed again, it`s just double work, and is it really necessary?

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    You should be able to override the existing rs_GetUpText by overriding it with a function with the same name that uses rs_GetUpTextAtEx. See my post. Just paste this before you include SRL anything. (At the very top of your script)



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  3. #3
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    If I use rs_GetUpTextAtEx , then how do I use it with WithDrawItem.

    I don`t think it is possible, or am I mistaken? If possible can you show me and example how to use it to get WithDrawItem to work?

    E. Wizzup, I`m a bit slow, I just understood what you meant. Thanks for your Help
    Last edited by VastlySuperior; 07-25-2012 at 09:45 AM. Reason: Found Solution

  4. #4
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    @ Wizzup

    I have done as you suggested, but now I receive this error because it still works from variables used in srl, and now it is called before srl is included.

    Simba Code:
    [Error] C:\Simba\Scripts\TestBed.simba(7:13): Unknown identifier 'GetUpTextAtEx' at line 6
    Compiling failed.

    GetUpTextAtEx is Unknown identifier. I would have to include that function as well before calling rs_GetUpTextAtEx

    Any new suggestions?

    E.

    I found what I should have done. I should have used rs_GetUpTextAtEx instead of GetUpTextAtEx. Thanks
    Last edited by VastlySuperior; 07-25-2012 at 10:05 AM.

  5. #5
    Join Date
    Nov 2011
    Location
    United states
    Posts
    516
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by VastlySuperior View Post
    @ Wizzup

    I have done as you suggested, but now I receive this error because it still works from variables used in srl, and now it is called before srl is included.

    Simba Code:
    [Error] C:\Simba\Scripts\TestBed.simba(7:13): Unknown identifier 'GetUpTextAtEx' at line 6
    Compiling failed.

    GetUpTextAtEx is Unknown identifier. I would have to include that function as well before calling rs_GetUpTextAtEx

    Any new suggestions?

    E.

    I found what I should have done. I should have used rs_GetUpTextAtEx instead of GetUpTextAtEx. Thanks
    Go into C:\Simba\Includes\SRL\srl\core

    open text.simba

    Find this:
    Simba Code:
    function GetUpText: string;
    begin
      Result := rs_GetUpText
    end;

    And change it to:

    Simba Code:
    function GetUpText: string;
    begin
      Result := rs_GetUpTextAt(7 , 57);
    end;

    all of your uptext issues should be gone hope that helped.

  6. #6
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by getdropped69 View Post
    Go into C:\Simba\Includes\SRL\srl\core

    open text.simba

    Find this:
    Simba Code:
    function GetUpText: string;
    begin
      Result := rs_GetUpText
    end;

    And change it to:

    Simba Code:
    function GetUpText: string;
    begin
      Result := rs_GetUpTextAt(7 , 57);
    end;

    all of your uptext issues should be gone hope that helped.
    Holy crap, why didnt someone say this earlier. It sucks relying on choosoption to know if you are clicking the right thing.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  7. #7
    Join Date
    Nov 2011
    Location
    United states
    Posts
    516
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Footy View Post
    Holy crap, why didnt someone say this earlier. It sucks relying on choosoption to know if you are clicking the right thing.
    Lol i bet that wasn't very effective lol I'm glad i could help

  8. #8
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by getdropped69 View Post
    Go into C:\Simba\Includes\SRL\srl\core

    open text.simba

    Find this:
    Simba Code:
    function GetUpText: string;
    begin
      Result := rs_GetUpText
    end;

    And change it to:

    Simba Code:
    function GetUpText: string;
    begin
      Result := rs_GetUpTextAt(7 , 57);
    end;

    all of your uptext issues should be gone hope that helped.
    Quite Help full. Thanks

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
  •