SRL Archive - OSR Help

UpText Temp Fix


VastlySuperior

2012-07-25 04:33:19

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.

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?

Wizzup?

2012-07-25 04:53:44

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)

VastlySuperior

2012-07-25 05:11:59

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

VastlySuperior

2012-07-25 06:02:12

@ 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.

[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

Getdropped

2012-07-25 17:32:14

From: VastlySuperior
@ 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.

[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:
function GetUpText: string;
begin
Result := rs_GetUpText
end;

And change it to:

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

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

Footy

2012-07-25 17:40:52

From: getdropped69
Go into C:\Simba\Includes\SRL\srl\core

open text.simba

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

And change it to:

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.

Getdropped

2012-07-25 18:43:23

From: Footy
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 ;)

VastlySuperior

2012-07-26 01:27:30

From: getdropped69
Go into C:\Simba\Includes\SRL\srl\core

open text.simba

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

And change it to:

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