Ansheer R.

asked • 11/24/20

Copy/pasting in software that does not support copy/paste.

I was given a small data entry job in which I had to type 2000 data and I had to do this in a specific software. Problem is that I typed almost 200 data in that software and I came to know that the software which that guy gave me does not support Copy/Paste.


And i write a code to screenshot the data and convert to text with the help of OCR .

THIS IS THE CODE it automatic write text and go to next line end of the application ask to captcha that i do manually
import pytesseract as tess
from PIL import Image
import pyautogui
import time
import keyboard

#globel variable
textList= []
x = 1

#ScreenShot
def shot():
time.sleep(5)
im = pyautogui.screenshot(region=(0,65,1300,290))
im.save('image.png')
print('ScreenShot Done ...........')
translate()

#Image to string
def translate():
tess.pytesseract.tesseract_cmd = r'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
# img = Image.open('C:\\Users\\anshe\\Desktop\\screenshot\\image.png')
img = Image.open("C:\\Users\\anshe\\Pictures\\file30.png")
text = tess.image_to_string(img)
global textList
textList = list(filter(None, text.splitlines()))
#To data only

while textList.count(' '):
textList.remove(' ')
print("translate Done")
time.sleep(2)


#To TExt Filed Fill
def main():
while len(textList) != 0:
for data in textList:
for char in data:
pyautogui.press(char)
time.sleep(.5)
pyautogui.press('tab')
pyautogui.PAUSE('esc')
print("Going to SHot")
shot()

print("Start...")

while x <= 100:
main()
x = x+1


# pyautogui.click(x=2,y=7)
# keyboard.write('a')
# pyautogui.press('tab')
# print(len(textList))
# shot()
# print(len(textList))


i have to complete 100 data per day... Please help me....

1 Expert Answer

By:

Patrick B. answered • 11/24/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Ansheer R.

but windows 10 on keyboard screen is working in that software but my programme is not ..
Report

11/25/20

Ansheer R.

if i attack the data base it will know by software developer. and there is a file named in application directory 'System.Data.SQLite.dll' how to open it
Report

11/25/20

Patrick B.

ok then it is using SQLite as it's database.. try locating the database file, and then open it at the command line prompt: sqlite dbfilename you can then start doing queries to see the data
Report

11/27/20

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.