Jump to content

Function Call only works 24 times please help


Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...