Jump to content
Sign in to follow this  
Insolence

Diablo II OCR with spacing now...

Recommended Posts

It's for coordinate of each pixel away from the top-leftmost pixel.

<{POST_SNAPBACK}>

I'm beginning to understand it better now. Why do you have this kind of loop

For $Scans = 1 to 2

Why make it twice?

Share this post


Link to post
Share on other sites

To scan for multiple colors of text, I.E. Unique OR Rare items.


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

To scan for multiple colors of text, I.E. Unique OR Rare items.

<{POST_SNAPBACK}>

I think, another reason why I'm confused of the Getline is because I'm using the autoit.bmp which only contains single line of text. There is another bmp that I saw on your first post. Is that where getline used for, multiple lines of text?

Thanks,

Neil

Share this post


Link to post
Share on other sites

I think, another reason why I'm confused of the Getline is because I'm using the autoit.bmp which only contains single line of text. There is another bmp that I saw on your first post. Is that where getline used for, multiple lines of text?

Thanks,

Neil

<{POST_SNAPBACK}>

Yes.

diablo_ii_in_game.bmp

Edited by Insolence

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

Yes.

<{POST_SNAPBACK}>

Yep, I found it too a while ago :)

Am I correct that you are using getline to find other text on different lines, and then, once a pixel is found, save the coordinates to a variable?

I'm getting there but it's tough. I've placed a lot of msgboxes and mousemoves to figure out where pixelsearch is getting the pixel I want. :evil:

Again, I tried deciphering your character definition file. Do you deduct the value pair against the value pair in left topmost of each character? If so, how come, letter A has few pixels defined?

Thanks again!!! :D

Neil

Share this post


Link to post
Share on other sites

Yep, I found it too a while ago :)

Am I correct that you are using getline to find other text on different lines, and then, once a pixel is found, save the coordinates to a variable?

I'm getting there but it's tough. I've placed a lot of msgboxes and mousemoves to figure out where pixelsearch is getting the pixel I want. :evil:

Again, I tried deciphering your character definition file. Do you deduct the value pair against the value pair in left topmost of each character? If so, how come, letter A has few pixels defined?

Thanks again!!! :D

Neil

<{POST_SNAPBACK}>

I'm not exactly sure, but it works. All that matters is it's unique.

I think it has something to do with the shape of A, I think instead it finds the bottom left most pixel, as apposed to the top left most pixel.

What don't you understand? Have a message box display the current UniqueID it's generating as it goes.


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

I'm not exactly sure, but it works.  All that matters is it's unique.

I think it has something to do with the shape of A, I think instead it finds the bottom left most pixel, as apposed to the top left most pixel.

What don't you understand?  Have a message box display the current UniqueID it's generating as it goes.

<{POST_SNAPBACK}>

After 6 hours of continuous watching of each value in the array and tons of mousemove additions, I finally understood how it works. I got my own character definition now. W00T!!!

Awesome invention!!!! :)

Share this post


Link to post
Share on other sites

After 6 hours of continuous watching of each value in the array and tons of mousemove additions, I finally understood how it works. I got my own character definition now. W00T!!!

Awesome invention!!!! :evil:

<{POST_SNAPBACK}>

Glad to hear it :)

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

Glad to hear it :)

<{POST_SNAPBACK}>

I think I will have an issue once I port this over to another machine that I can only access via Microsoft Terminal Services. Do you think that scheduler will be able to execute this code and execute the app even if no one is connected?

Thanks,

Neil

Share this post


Link to post
Share on other sites

I think I will have an issue once I port this over to another machine that I can only access via Microsoft Terminal Services. Do you think that scheduler will be able to execute this code and execute the app even if no one is connected?

Thanks,

Neil

<{POST_SNAPBACK}>

I don't understand what you're asking.

As long as it's on the screen, and you tell it the right coords, it'll work.


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

ok i got a problem with ur OCR sir...first of all, im not good at auto it, i started like 3-4 weeks ago...basically i cant get ur program to work...i put in the right coordinates, and launched the program, and opened up d2, and it was supposed to read the word "sash" coz i dropped a belt...it gives me a msg box with numbers(i dunno wat that is) and then it doesnt put ne thing in the output, i think maybe im putting in the coordinates wrong or sumtin, but can i get sum help plz?


[font="Fixedsys"][size="3"][u][font="Franklin Gothic Medium"] [/font][/u][/size][/font]

Share this post


Link to post
Share on other sites

it doesnt seem to work for me either, i set the mousemove debug thing to see what its doing, it just scans two lines then stops, and it doesnt put anthing in output.txt

Share this post


Link to post
Share on other sites

hey im having problems with ur OCR...i put the coordinates right this time...everything works perfectly, but the problem is, sumtimes it gives me errors...i havent made ne changes to the script, i oly input the right coordinates...it works fine, but its 50-50...sumtimes it works, sumtimes it doesnt, it gives me errors sumtimes...please fix ur script...


[font="Fixedsys"][size="3"][u][font="Franklin Gothic Medium"] [/font][/u][/size][/font]

Share this post


Link to post
Share on other sites

I know is this a stupid question since I can't test it now. What does this do exactly?


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

Oke im testing this program on the image provided. But it gives me an error.

line 115 (File ".....\Real_OCR.au3"):

Local $aCoord, $Length, $Width, $Area,_

Local $aCoord, $Length, $Width, $Area^ERROR

Error: No variable give for "Dim", "Local", "Global" or "Const" statement.

And i didn't changed anything.

Share this post


Link to post
Share on other sites

oke for the guys that have the same problem as i do...

In the new version of autoit this script doesn't work anymore. Someone need to fix this script or you need to get the old version.

Version 3.1.1.0

The only problem that i got now is that i can't figure out what the colour for the yellow letters in diablo is:(

but thx insolence for this script. Works perfect exept for a zero and as you said before. The script can't see the difference between i and j .

Cause you didn't define a zero in your definition file it reads all zero's as a 9

Sometimes it reads it wrong for example two-handed.

cause there'S a - between two and handed it can seperate the two words and doesnt read them perfectly. you get something like twoanded.

if somebody finds the correct colour for yellow text in diablo, pls post it.

Share this post


Link to post
Share on other sites

Has anyone figured out exactly how to make new character definition file ? I've searched through all of the coding and tried to change the pixel locations but can't seem to get the way it work he says that it starts with first pixel it see's but some of the letters it doesn't seem to be right.

Share this post


Link to post
Share on other sites

You do know this is for Diablo right? It works with the diablo font.


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...