superboss Posted January 3, 2012 Share Posted January 3, 2012 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.AnywayTo 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 linkThe 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 appreciatedThanksS Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 3, 2012 Moderators Share Posted January 3, 2012 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
superboss Posted January 3, 2012 Author Share Posted January 3, 2012 Thanks Melba, that was the solution. That'll teach me for thinking the problem was with me, hah, I forgot Im perfect :-) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 3, 2012 Moderators Share Posted January 3, 2012 (edited) superboss,I forgot Im perfectFamous last words.... M23I will post a link in the main UDF thread and PM the author. Edited January 3, 2012 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
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