Jump to content
idiot

trying to read up text

Recommended Posts

up text is critical element of a script to check if cursor is in right position, however I have difficulties getting it work

I tried functions rs_GetUpText, rs_GetCustomSizeUpText, rs_GetUpTextAt, but they returned nothing,

 

now I am trying GetTextAtEx, it has a lot of parameters, that I poorly understand, mainly UpChars

is there a tutorial how to set up and use this function?

 

below is an example of the simplest script I was trying, what was I doing wrong?

 

program get10uptexts;
{.include OSI\OSI.scar}

var
n: integer;

begin
n:=10;
repeat
 begin
  writeln(rs_GetUpText);
  wait(1000);
  n:=n-1;
 end;
until n=0
end.

Edited by idiot
making the code look nice
Link to comment
Share on other sites

If you're going to use OSI, you shouldn't use SCAR's OCR directly for most things. First check out this page on how to set up OSI in your script: http://wiki.scar-divi.com/osi/index.php?title=Basic_RS2_OSI_Usage#Defines_and_Including

After that you can use the OCR wrappers defined in OSI: https://github.com/OSI1/OSI1/blob/master/RS2/Core/Text.scar#L34

Link to comment
Share on other sites

may be something is wrong with settings on my computer because it did not work, i ll try to reinstall everything

 

this is what I was getting, despite having uptext in top left conner:

New client targeted (918340)

Successfully compiled (484 ms)

OSI RS2 routines enabled

OSI RS2 color random detection and solving disabled

Loaded RS2 Fonts: NPCChars, UpChars, SmallChars, StatChars, FriendChars, LoginChars, XPChars

 

Successfully executed (2355 ms)

Link to comment
Share on other sites

may be something is wrong with settings on my computer because it did not work, i ll try to reinstall everything

 

this is what I was getting, despite having uptext in top left conner:

New client targeted (918340)

Successfully compiled (484 ms)

OSI RS2 routines enabled

OSI RS2 color random detection and solving disabled

Loaded RS2 Fonts: NPCChars, UpChars, SmallChars, StatChars, FriendChars, LoginChars, XPChars

 

Successfully executed (2355 ms)

 

Your OSI isn't up to date, I can tell because it isn't loading all the new font sets I uploaded to OSI.

 

Install latest scar scar-divi.com

Install latest OSI File -> Includes manager

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...