Feb-04-2021, 11:22 PM
hello!
i created a script who pyautogui.locatOnScreen() for a specific image and takes automatically a screenshot, . and he convert the image to text automatically .
but i want a simple tool with tkinter . when i click print buttom the script works and shows me the text that is converted on a Labell . but i don't know how to make this tool .
this is my code
i created a script who pyautogui.locatOnScreen() for a specific image and takes automatically a screenshot, . and he convert the image to text automatically .
but i want a simple tool with tkinter . when i click print buttom the script works and shows me the text that is converted on a Labell . but i don't know how to make this tool .
this is my code
import pyautogui as py import time from PIL import Image from pytesseract import * pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe' while 1: indice1 = py.locateOnScreen("image3.png",confidence=.8) if indice1: print("indice see it ") myScreenshot = py.screenshot(region=(626, 3398, 285, 119)) myScreenshot.save(r'C:\Users\rachidel07\Desktop\ok\venv\image.png') img=Image.open("image.png") output = pytesseract.image_to_string(img) print(output) else: print ("non")