[Something you can test] rs_GetUpText
Wizzup?
2010-01-23 18:50:18
So this function has been in Simba for awhile, and I think it works OK. It is accurate in most cases, even though there are probably still some things I can tweak in it to make it perform better. Most important thing is that it is stable.
Could you guys test it? Just walk around in rs a bit, see if it works. It is mistakes a char for another char, please report here, but I'm mainly looking for an actual crash, if any.
Wizzup?
2010-01-24 18:25:31
Bump. Posted it in the wrong forum first.
Function
2010-01-24 19:00:12
I'm on it! Will post again in a sec hold on.
EDIT: I'm new :duh: Do you use it like if( rs_getuptext = '' )then writeln? Or some other way?
Wizzup?
2010-01-24 19:08:49
From: Function
I'm on it! Will post again in a sec hold on.
EDIT: I'm new :duh: Do you use it like if( rs_getuptext = '' )then writeln? Or some other way?
writeln(rs_getuptext);
Will do fine. :)
Function
2010-01-24 19:15:46
From: Wizzup?
writeln(rs_getuptext);
Will do fine. :)
Alright but would you use my way for checking stuff? Like in a real script?
EDIT: Heres what I got for you and it really really likes the ^ symbol
[SIMBA]
[REAL]
Use Bank booth / 8 more option^
Use Bank booth / 8 more options
Take Willow logs ^ 5 more options
Take Willow logs / 5 more options
Walk here ^nk3r Fw4 (level: 40) / 15 more options
Walk here T4nk3r Ftw4 (level: 40) / 15 more options
Walk here Hp Ranqe Hp (level: 36) / 3 more options
Walk here Hp Ranqe Hp (level: 36) / 3 more options
Chop down Tree / 3 more options
Chop down Tree / 3 more options
Talk-to Fo^unato / 3 more options
Talk-to Fortunato / 3 more options
Net Fishing spot / 3 more options
Net Fishing spot / 3 more options
Wizzup?
2010-01-24 20:06:31
Thanks. :)
The often seeing a "^" indicates the two characters have no spacing between them. (rt in Fortunato for example)
I guess it's decent for stuff the way we use it in our script. (To answer your question)
We basically get the entire uptext string, like you printed with writeln(). Then, if we want to search for Fortunato, we'd search if the uptext contains 'unato'. If we wanted to mine a rock, we would check for 'ine' and 'ock'.
'Mine' and 'Rock' would work as well, but are more prune to error if the uptext isn't 100% accurate.
Current consensus: Can use some more work, but I guess there is more important stuff at the moment. ( At least it did not crash. :D )
EDIT:
If you want to do some more testing, and want to see how it works, I can compile my "test" tool for you…? It's pretty graphical and shows about 4 or 5 steps. This way you can show me where it goes wrong.
Function
2010-01-24 20:09:33
From: Wizzup?
Thanks. :)
EDIT:
If you want to do some more testing, and want to see how it works, I can compile my "test" tool for you…? It's pretty graphical and shows about 4 or 5 steps. This way you can show me where it goes wrong.
I would totally be up for that!
Wizzup?
2010-01-29 17:25:20
From: Function
I would totally be up for that!
http://old.villavu.com/merlijn/OCRBench.exeFont path should be the 'Fonts' directory. You can make it target saved bitmaps, or any window. (Use the selector button)
Function
2010-01-29 17:40:36
From: Wizzup?
http://old.villavu.com/merlijn/OCRBench.exe
Font path should be the 'Fonts' directory. You can make it target saved bitmaps, or any window. (Use the selector button)
Alright, I don't really get what I'm doing :/
1) I press set "Set Path" And go to Simba/Fonts
2) I drag set client to runescape
3) I click "OCR filter"
4)
Sorry if I'm doing something wrong :/
Wizzup?
2010-01-29 18:18:39
You're doing it right, but you should alt+tab out of runescape, otherwise (as you can see) the client will lose it's uptext.
Function
2010-01-29 18:28:55
Wizzup?
2010-01-29 20:19:28
Thanks for that, I'm really happy someone takes all the time to test this!
It would be especially useful if you could find me places where it doesn't work, though; then I can actually fix it instead of being proud of the fact that it works quite well. :p
Tomorrow I'll add a feature that auto saves the last analysed screen to a bitmap, so if it fails, it will be easy to send the bitmap. :)
Function
2010-01-30 00:59:19
What justify's something not working? Here the red text is different from all the rest… So tell me if this is an error please
Gu3st...
2010-01-30 03:22:36
Looks like the door handle's color is exactly the same as the text, thus making the OCR think the door handle is a part of the text..
I'll test this too, Wizzup :)
EDIT:
Simtoon
2010-01-30 03:37:17
From: Wizzup?
Thanks for that, I'm really happy someone takes all the time to test this!
I feel offended
Wizzup?
2010-01-30 06:39:07
Zyt3x: Due to the colour issues you found I always make rs_GetUpText use shadows, so it will be a lot less sensitive to that. About the 'p' not working well - you see that external pixel there? That needs to be filtered out, that was kind of on my TODO list, thanks for pointing it out.
Gu3st...
2010-01-30 09:16:05
No problem :P
Also, why is there a "t" at the end here? It wouldn't affect scripts but it shouldn't be there..

This happened several times, not only once
Wizzup?
2010-01-30 09:18:23
From: Zyt3x
No problem :P
Also, why is there a "t" at the end here? It wouldn't affect scripts but it shouldn't be there..
This happened several times, not only once
Because there's some noise there, where the window is. I figured it isn't of real importance since you should mainly be using Pos anyway to check for uptext.
It's not very easy to design a filter to filter all those points away, as the risk of removing good points is relatively high. That's why I haven't tried my hand it it yet.
Boreas
2010-01-30 13:26:15
Not for all cases, but for cases like that where the noise is at least 3-4 char widths away from the rest of the text, could you filter outliers by distance without much risk?
Wizzup?
2010-01-30 14:07:52
From: Boreas
Not for all cases, but for cases like that where the noise is at least 3-4 char widths away from the rest of the text, could you filter outliers by distance without much risk?
Yeah, that's a possibility… Guess it can't hurt.
/me tries not to forget. :)
Is Simba designed specifically for RuneScape? If not, I think RuneScape related functions like this should be removed from Simba and made in an include.
Unless, of course, it cannot be made in a include and has to be in the core.
From: Sex
Is Simba designed specifically for RuneScape? If not, I think RuneScape related functions like this should be removed from Simba and made in an include.
Unless, of course, it cannot be made in a include and has to be in the core.
On the introduction page it states that is is designed mainly to be a RuneScape macroing program.
Oh, sorry I'll read it now :p.
My bad guys.
Awkwardsaw
2010-01-30 23:21:09
Error: Exception: Font [UpChars_s] not found. at line 178
178: if length(rs_GetUpText) > 9 then
wat do? :o
mastaraymond
2010-01-31 06:41:55
From: Awkwardsaw
Error: Exception: Font [UpChars_s] not found. at line 178
178: if length(rs_GetUpText) > 9 then
wat do? :o
You have to point Simba to the font directory;
View -> View Settings -> Fonts -> Path -> Double click on the expanded tree -> change the directory to scar's Font path.
Wizzup?
2010-01-31 07:09:28
From: Sex
Is Simba designed specifically for RuneScape? If not, I think RuneScape related functions like this should be removed from Simba and made in an include.
Unless, of course, it cannot be made in a include and has to be in the core.
Hmm… It may be moved to a more modular part later. ATM we are just trying to make Simba as clean as possibly while maintaining a quick development speed, so we can get it ready soon.
Hey runned just fine for sometime, then it started returning this error:
[PHP]Error: Exception: TMWindow.ReturnData: The parameters passed are wrong; xs,ys 7,7 width,height 400,20 at line 5[/PHP]
Script Snippet:
[PHP]program new;
var Text: string;
begin
repeat
Text := rs_GetUpText;
if (Text <> '') then
Writeln(rs_GetUpText);
until (False);
end.
[/PHP]
~Home :)
EDIT: It gets fixed when i Target client again, and the error comes when the client kinda gets UnTargeted? Or something :S
Wizzup?
2010-02-01 04:18:27
What did you use as target? (Runescape in firefox as a tab, the runescape.exe, SMART)
From: Wizzup?
What did you use as target? (Runescape in firefox as a tab, the runescape.exe, SMART)
Firefox Runescape Website. No other tabs.
~Home :)
EDIT: Like if i do this, minimize Simba, Click Calculator in other window. Then it results error :)
Wizzup?
2010-02-01 04:28:19
From: Home
Firefox Runescape Website. No other tabs.
~Home :)
EDIT: Like if i do this, minimize Simba, Click Calculator in other window. Then it results error :)
It shouldn't happen unless the Runescape window handles changes. Anyway, it may just be a bug in this OCRBench only. (It's kind of sloppy when it comes to that)
From: Wizzup?
It shouldn't happen unless the Runescape window handles changes. Anyway, it may just be a bug in this OCRBench only. (It's kind of sloppy when it comes to that)
Meh… It changes :S
I have no idea why :S

~Home
jimmy_mac
2010-02-01 04:51:34
Targetting doesnt work for me with runescape in win7 64-bit. It does with other windows just not the runescape client. the red line around it just dissapears.
E: I didnt mean other versions of windows, i meant other opened windows (on my computer)
mastaraymond
2010-02-01 10:28:40
The red line has to do with Runescape redrawing, shouldn't be an issue really ;).
However the fact that those handle's are different is kinda worrying.. Are you sure that you didn't switch from Low to HD (in runescape) or something like that?
From: mastaraymond
The red line has to do with Runescape redrawing, shouldn't be an issue really ;).
However the fact that those handle's are different is kinda worrying.. Are you sure that you didn't switch from Low to HD (in runescape) or something like that?
100 % Sure :S
It was a little bit shock to me, because i didn't know that they do change.
~Home
Wizzup?
2010-02-01 11:41:01
From: Home
100 % Sure :S
It was a little bit shock to me, because i didn't know that they do change.
~Home
Simply switching tabs in Firefox is enough to cause these issues. I'm not sure what Windows Vista/7 does when it comes to window handles - but they shouldn't change more than XP… Perhaps it would be worth investigating this.
@Jimmy_mac: Target settings works fine in that case, it just doesn't redraw the red triangle again.