Shhhhh!
Shhhhh!
lol I knew that reaction was coming...
Wow. How could I have missed this thread. I have been thinking about this too, and Stupid3ooo's ChooseOption comes close to the ideal solution. It narrows down the search box. And allthough they look like popup's, they are actually fixed bitmaps at fixed position. Much unlike the uptext that randomly floats +-2 pixels.
Have you tried contacting masquerader? He's the FontMaster
THIS IS OLD STUPID's CHOOSEOPTION:
PHP Code:{*******************************************************************************
function ChooseOption(x, y: Integer; txt: String): Boolean;
By: Stupid3ooo
Description: Finds Popup menu, then clicks on it.
*******************************************************************************}
function ChooseOption(x, y: Integer; txt: string): Boolean;
var
x1, y1, x2, y2, LeftCorner, RightCorner: Integer;
begin
LeftCorner := BitmapFromString(4, 4, 'z78DA33753135313137C5' +
'411A600064715CEA914500CACE13F0');
RightCorner := BitmapFromString(4, 4, 'z78DA33753135313137' +
'C5200D30002E35F8C501C9C013F0');
if (FindBitmap(LeftCorner, x1, y1)) and (FindBitmap(RightCorner, x2, y2)) then
begin
if (FindText(x, y, txt, upchars, x1, y1, x2, 502)) then
begin
Result := True;
Mouse(x + Length(txt) * 3, y + 3, 2, 2, True);
end
else if (FindText(x, y, 'Cancel', upchars, x1, y1, x2, 502)) then
Mouse(x + 9, y + 3, 2, 2, True);
end;
FreeBitmap(LeftCorner);
FreeBitmap(RightCorner);
end;
Where do you retrieve your baseline from?
Maybe you should grab this semicolon bitmap:
I think it is unique, but it is a hypothesis. Well, that is what I had in mind of doing but-what-I-havent-been-able-to-do-since-I-am-sooo pre-occupied, pfew.
Good work.
TOB? Why are you not a member around here? Please apply...or did you already?
SRL is a Library of routines made by the SRL community written for the Program Simba.We produce Scripts for the game Runescape.
I'll PM masquerader now, hopefully he can take this off my hands (I'm working on a lot of scripts atm lol).
I think the width's of '<Skill> XP' and 'Next Level at' and the widths of the numbers is messing up the way it finds the width between the dtms and divides. And I don't know how to go about solving that so that it works for every account.
I'll look into the chooseoption thing if a dev (or anyone with more time than me) doesn't fix it.
Baseline is above the P. I was using a dtm of the P and the semi colon, because dtm of semicolon obviously doesn't work (and a dtm of the right edge of the box). I didn't want to use bitmaps, but if masq doesn't have time to do it, I guess I'll try it.
Well, when SRL first came out I wasn't interested in SCAR and I just recently got back into forums. I haven't applied because I haven't made any scripts really with SRL, or in general. I didn't think I would be accepted so I chose not to apply until [if] I make a script using SRL.

haha, ok, i'll take a look at it
ps:
fawki, can you add FontMaster to my title?
lol
[edit]
here:
Code:function skillxp(skill:string; current:boolean):integer; //masquerader w/ others var textx,texty,x1, y1, x2, y2, LeftCorner, RightCorner: Integer; text,xp:string; t:tpoint; begin LeftCorner:= DTMFromString('78DA63346164603006622C0026CA684A841A9' + '03926449883A6E6FFFF0598E60411614E100173406A8289703301' + '3500C6560919'); RightCorner:= DTMFromString('78DA635CC2C8C0100CC458004C947131916A8' + '250D5FCFFBF0055CD124C3558CD3121600E488D3101739610A9C6' + '04BF1A00F7DF0C91'); result:=-1; GameTab(2); case lowercase(skill) of 'attack': t := SkillCoords(1, 1); 'hitpoints': t := SkillCoords(1, 2); 'mining': t := SkillCoords(1, 3); 'strength': t := SkillCoords(2, 1); 'agility': t := SkillCoords(2, 2); 'smithing': t := SkillCoords(2, 3); 'defence': t := SkillCoords(3, 1); 'herblore': t := SkillCoords(3, 2); 'fishing': t := SkillCoords(3, 3); 'ranged': t := SkillCoords(4, 1); 'thieving': t := SkillCoords(4, 2); 'cooking': t := SkillCoords(4, 3); 'prayer': t := SkillCoords(5, 1); 'crafting': t := SkillCoords(5, 2); 'firemaking': t := SkillCoords(5, 3); 'magic': t := SkillCoords(6, 1); 'fletching': t := SkillCoords(6, 2); 'woodcutting': t := SkillCoords(6, 3); 'runecrafting': t := SkillCoords(7, 1); 'slayer': t := SkillCoords(7, 2); 'farming': t := SkillCoords(7, 3); else writeln('invalid skill'); end; MMouse(t.x, t.y + 12, 5, 5); repeat wait(10); until findcolor(x,y,10551295,554, 205, 743, 465); if((FindDtm(LeftCorner,x1,y1,554, 205, 743, 465))and(FindDtm(RightCorner,x2,y2,554, 205, 743, 465))) then begin if(current)then begin text:=skill; text[1]:=UpperCase(text[1])[1]; end else text:='at' if(istextinareaex(x1,y1,x2,y2,textx,texty,text, 0, smallchars,false,true, 0,2,0))then begin if(istextinareaex(textx,texty,textx+100,texty,textx,texty,':',0,smallchars,false,true,0,2,0))then begin xp:=trim(gettextatex(textx+6,texty,0,smallchars,false,true,0,2,0,9,false,tr_digits)) result:=strtoint(xp); end; end; end; freedtm(leftcorner); freedtm(rightcorner); end;
Works really well, but it seems to always trim off the last number, so 2595 appears as 259. Any idea why?
Yea same here. No title until you fix that lol.
I think its because the left side of the number changes with the length of the name of the skill, the right side changes with the number of digits in the number,and the distance to edge of the box changes with the length of Next level at and the number compared to the top line. All these together make it hard.
There are currently 1 users browsing this thread. (0 members and 1 guests)