Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

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

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
×
×
  • Create New...