-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
The enter key sometimes doesn't work
The enter key sometimes doesn't work.
I used the code below to get the program to press enter
Codes
# -*- coding: utf-8 -*-
try:
import pydirectinput as pdt
import time
except:
from pip import main
main(['install', 'PyDirectInput'])
import pydirectinput as pdt
import time
pdt.FAILSAFE = False
pdt.PAUSE = 0.05
T = 't'
ENTER = 'enter'
sleep = 2
command = '/sell string'
time.sleep(sleep)
loop = 0
while True:
loop += 1
print(loop)
print('Start')
pdt.press(T)
print(T)
time.sleep(0.001)
for i in command:
pdt.press(i)
print(i)
time.sleep(0.001)
pdt.press(ENTER)
print(ENTER)
print('End')Metadata
Metadata
Assignees
Labels
No labels