Jump to content
Sign in to follow this  
kuhasu

Are there any problems in my code?TIA

Recommended Posts

kuhasu

I\'ve done my best on the following code,can any buddy there help me to let the code run faster and point the errs within it pls?

Thank you very much in advance!

The following script take me 883 ms ,I wanna it be faster,And I wanna run 4 this kind of code at the same time,how?

And if there r four codes(just different in $top,$bottom,$left,$right) ,I wanna run them at the same time ,how can I performe it?

And I also ClipPut(\"$num\" & \"$num2\" & \"$num3\" & \"$num4\")

Thank you!

Edited by kuhasu

Share this post


Link to post
Share on other sites
kuhasu

anybody there?

I think I got some mistakes with func

Share this post


Link to post
Share on other sites
nobbe

hi

i am not shure anyone figures out what this script actually does or tries to do?? (too many variable names, all looks the same to me..?)

maybe try to explain in more detail what you are trying to do

BTW use "local" only after "func " started -... not as declaration on top of script "before" funcs..

Share this post


Link to post
Share on other sites
kuhasu

hi

i am not shure anyone figures out what this script actually does or tries to do?? (too many variable names, all looks the same to me..?)

maybe try to explain in more detail what you are trying to do

BTW use "local" only after "func " started -... not as declaration on top of script "before" funcs..

Thanks man!

It's a OCR programme to Numbers

almost all the variables are pixel axis.

I think I encounter some problems in the FUNCs I defined.Can u give me an advice?

Edited by kuhasu

Share this post


Link to post
Share on other sites
nobbe

hi

you need to read the help file about functions, its not difficult..

for ocr there are some samples here in the forum

for a simple ocr , it could compare pixel for matches to a 2 dimensional array , $a[0][0]- $a[8][8] for example

eg a setup for a character could be

******

*------*

*------*

*------*

*------*

*------*

*------*

******

for eg. "0" : you get the idea ?..

Share this post


Link to post
Share on other sites
kuhasu

Thank you.

I've modified my code and no errs now!

Anyone can help me simplified it pls?

And I wanna run four this kind of code at the same time,any ideas?

THX

Share this post


Link to post
Share on other sites
kuhasu

hi

i am not shure anyone figures out what this script actually does or tries to do?? (too many variable names, all looks the same to me..?)

maybe try to explain in more detail what you are trying to do

BTW use "local" only after "func " started -... not as declaration on top of script "before" funcs..

hi there,u mean I'd better use "dim" to replace "local"?THX

Share this post


Link to post
Share on other sites
kuhasu

Thank u.

I can be sure the way I'm doing for the condition I encounter is the best.

I need a optimization for my script.:)

"$X14>=$left AND $X14<=$right AND $Y16>=$top AND $Y16<=$bottom Then"--------------is there any shortcut fot comparing values?Actually I just make sure (x,y) in a matrix/retangle

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  

×