that will hold the key down without lifting the "finger" off the key for 10 seconds So I don't have enough to post the actual solution but I figured it out in a few minutes this works for python 3.10 and up. If you want to just press a key down then do from pyautogui import* > pyautogui.typewrite('Hello world!', interval=0.25) # type with quarter-second pause in between each key > pyautogui.moveTo(500, 500, duration=2, tween=pyautogui.easeInOutQuad) # use tweening/easing function to move mouse over 2 seconds. > pyautogui.moveRel(None, 10) # move mouse 10 pixels down > currentMouseX, currentMouseY = pyautogui.position() > screenWidth, screenHeight = pyautogui.size() I got the code from here > import pyautogui It is easier, and can be used within a few lines of code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |