Sign in to follow this  
Followers 0
superboss

Function Call only works 24 times please help

4 posts in this topic

Hi there guys,

long time no speak :-)

Im having an issue, which took me a long time to debug, as normally I only execute this function call maybe 15 times, sometimes it does a few more.

So for a long time it appeared as if simply put, sometimes it works and sometimes it doesnt.

Anyway

To cut a long story short, this is my piece of debugging code

**************************

Start Code

$Counter = 0

While 1 = 1

$Counter = $Counter + 1

$Qty = _TesseractScreenCapture(0,"",1,2,1096,1677,1658,1048,0)

$Qty = StringLeft($Qty, 2)

$Qty = Number($Qty)

Sleep(200)

If $Qty = 0 then ExitLoop

WEnd

MsgBox(0,"Msg", $Counter)

End Code

***********************************

Basically, it ends at 24 every time.

Whats happening is, the 24th Call and onwards, Tesseract is returning a blank tif image and therefore $Qty becomes 0.

It was strange how it sometimes just refused to work and returned a 0, until I figured out what was happening.

So Im guessing all I need to do is clear the memory after every call?

_TesseractScreenCapture Function calls the standard UDF as taken from the following link

The reason im posting it here, is because I dont think it is a problem with the Tesseract.au3 file I am using, but rather How I am calling the function and not releasing the memory?

Is there a different way of calling the function so this doesnt keep happening?

Any help greatly appreciated

Thanks

S

Share this post


Link to post
Share on other sites



superboss,

You might like to take a look at this post which might solve your problem. ;)

If it does, let me know and I will link the post to the main Tesseract UDF thread you referenced above. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Thanks Melba, that was the solution.

That'll teach me for thinking the problem was with me, hah, I forgot Im perfect :-)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

superboss,

I forgot Im perfect

Famous last words.... ;)

M23

I will post a link in the main UDF thread and PM the author. :)

Edited by Melba23
Added information

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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  
Followers 0