#NEWLINE# def ocrLocate( self , haystackFilename , text ) : #NEWLINE# #INDENT# results = [ ] #NEWLINE# sshot = self . _gti . refreshScreenshot ( haystackFilename ) #NEWLINE# ( width , height ) = sshot . size ( ) #NEWLINE# ( fwidth , fheight ) = ( float ( width ) , float ( height ) ) #NEWLINE# for guiItem in sshot . findItemsByOcr ( text ) : #NEWLINE# #INDENT# ( left , top , right , bottom ) = guiItem . bbox ( ) #NEWLINE# results . append ( guielements . TextRectangle ( ( ( left / fwidth ) , ( top / fheight ) ) , ( ( right / fwidth ) , ( bottom / fheight ) ) , text ) ) #NEWLINE# #UNINDENT# return tuple ( results )