BlackFog Posted August 24, 2007 Posted August 24, 2007 (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][^ ERRORMy 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) EndFuncThe Directlink to the Function is here.I hope that anybody can help me an sorry for my bad English .BlackFog Edited August 24, 2007 by BlackFog
weaponx Posted August 24, 2007 Posted August 24, 2007 (edited) Did you try (passing numbers without quotes): #include HotKeySet("h","check") while 1 sleep(100) WEnd func check() $test = _OCR(65, 55, 335, 35) MsgBox(0,"something",$test,1) EndFunc Edited August 24, 2007 by weaponx
BlackFog Posted August 24, 2007 Author Posted August 24, 2007 Thank's for the fast Reply but this didn't change anything. BlackFog
weaponx Posted August 24, 2007 Posted August 24, 2007 (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 August 24, 2007 by weaponx
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now