Jump to content
Sign in to follow this  
BlackFog

Array variable subscript badly formatted

Recommended Posts

BlackFog

Hi,

I was using that OCR Program but everytime I run the Script there is "Array variable subscript badly formatted" at

Dim $char[$width][$length]

Dim $char[$width][^ ERROR

My Code is that:

#include <ocr.au3>

HotKeySet("h","check")

while 1
    sleep(100)
WEnd

func check()
$test = _OCR("65", "55", "335", "35")
MsgBox(0,"something",$test,1)
EndFunc

The Directlink to the Function is here.

I hope that anybody can help me an sorry for my bad English :).

BlackFog

Edited by BlackFog

Share this post


Link to post
Share on other sites
BlackFog

Thank's for the fast Reply but this didn't change anything.

BlackFog

Share this post


Link to post
Share on other sites
weaponx

In your OCR function, $length is calculated as $length = $Dy - $Ay

Your are passing $length = 35 - 55 which is a negative number, this will not work.

Something like this might work: $test = _OCR("65", "55", "335", "60")

Edited by weaponx

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.