DeadAdm1n Posted June 9, 2022 Posted June 9, 2022 hello all, im still fairly new with auto it, and I'm stumped with a issue on using a return that tesseract gives me, then put it into a spreadsheet using ooocalc I've been threw the help file of ooocalc, even looked in help with the _excel stuff, also tried different formatting to get the script to insert the return variable into spreadsheet right now all the script does, is preps everything, and scans the picture for its variable. tesseract does return a value, ive double checked with debug mode, and also via sending the return variable to a msgbox. and it doesn't write it to the spreadsheet. (that sounds redundant) my code: expandcollapse popup#include <Tesseract.au3> #include <Array.au3> #include <OOoCalcConstants.au3> #include <OOoCalc.au3> HotKeySet("e", "EndProgram") Func EndProgram() Exit EndFunc ;==>EndProgram MsgBox($MB_YESNO, "NotSiri", "Would you like to update your Report? Daddy.") If ($idyes) Then WinClose("[CLASS:Photo_Lightweight_Viewer]", "") sleep(50) ShellExecute("getFile.bat") ElseIf ($idno) Then Exit EndIf WinWait("[CLASS:Photo_Lightweight_Viewer]", "", 10) WinActivate("[CLASS:Photo_Lightweight_Viewer]", '') Sleep(100) WinMove("[CLASS:Photo_Lightweight_Viewer]", '', '1', '1', 866, 735) $_WinPos = WinGetPos("[CLASS:Photo_Lightweight_Viewer]", '') Sleep(2000) Global $oCalc = _OOoCalc_BookNew() WinWait("[CLASS:SALFRAME]") WinSetState("[CLASS:SALFRAME]", "", @SW_MINIMIZE) sleep(500) ;_OOoCalc_WriteCell($oCalc, "Grand Total:", "B5") --works, but i need a variable to be entered WinActivate("[CLASS:Photo_Lightweight_Viewer]", '') sleep(400) ;scan() $tube = _TesseractScreenCapture(0, "", 0, 4, 428, 416, 528, 440, 1) ;-- tried using global $tube---didnt work sleep(100) _OOoCalc_WriteCell($oCalc, $tube, "C4") ;-------------Im not using these functions yet.---------------------Functions------------------------------------------------------------ Func scan() Sleep(100) Global $tube = _TesseractScreenCapture(0, "", 0, 4, 428, 416, 528, 440, 0) Sleep(100) Global $case = _TesseractScreenCapture(0, "", 0, 4, 428, 480, 528, 506, 0) Sleep(100) Global $water = _TesseractScreenCapture(0, "", 0, 4, 346, 322, 381, 333, 0) Sleep(100) Global $oil1 = _TesseractScreenCapture(0, "", 0, 4, 497, 322, 529, 333, 0) Sleep(100) Global $oil2 = _TesseractScreenCapture(0, "", 0, 4, 628, 322, 660, 333, 0) Sleep(100) Global $oil3 = _TesseractScreenCapture(0, "", 0, 4, 760, 343, 799, 333, 0) Sleep(100) nextPic() Sleep(400) Global $trans = _TesseractScreenCapture(0, "", 0, 4, 463, 340, 544, 362, 0) Sleep(100) nextPic() Sleep(400) EndFunc ;==>scan Func nextPic() Sleep(100) send("{LEFT}") Sleep(100) EndFunc ;==>nextPic
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