Reputation: 1
So I have this code:
import time
import pyautogui
from AppOpener import open
open("bloc de notas")
time.sleep(0.5)
with open('sometext.txt', 'r') as file:
texto = file.read()
pyautogui.typewrite(texto)
where I want to copy the text frome "sometext.txt" but I get an error because it can´t find it in the list of applications:
SOMETEXT TXT NOT FOUND... TYPE (LS) for list of applications.
I thought using the words "as file" would be enough. But I get the error. Is there a way around this? Also sometext.txt is on the same folder that the code.
Upvotes: 0
Views: 38