I have been testing with Half-Life 2 to confirm that these inputs work with DirectX games. This allows any edits you make to these project files to be reflected when you run the tests. Then you can pip install this project in an editable state by doing pip install -e. To run the supplied tests: first setup a virtualenv. You can find a discussion of the problems with using vkCodes in video games here: Testing You might also be interested in the main SendInput documentation here: The DirectInput key codes can be found by following the breadcrumbs in the documentation here: press ( 'esc' ) # Simulate pressing the Escape key. doubleClick () # Double click the mouse at the > pydirectinput. move ( None, 10 ) # Move mouse 10 pixels down, that is, move the mouse relative to its current position. click ( 200, 220 ) # Click the mouse at the x, y coordinates 200, 220. click () # Click the mouse at its current location. moveTo ( 100, 150 ) # Move the mouse to the x, y coordinates 100, 150. Watch the tutorial here: Coming soon Example Usage > import pyautogui > import pydirectinput > pydirectinput. Get involved in open source! Learn more about programming! Pad your resume! Have fun! Want to see a missing feature implemented? Why not give it a try yourself! I welcome all pull requests and will be happy to work with you to get a solution fleshed out. The function interfaces are the same, but this package may not implement all optional parameters and features. You can continue to use PyAutoGUI for all of its cool features and simply substitute in PyDirectInput for the inputs that aren't working. This package is intended to be used in conjunction with PyAutoGUI. If you find yourself in that situation, give this library a try! You may find that PyAutoGUI does not work in some applications, particularly in video games and other software that rely on DirectX. PyAutoGUI uses Virtual Key Codes (VKs) and the deprecated mouse_event() and keybd_event() win32 functions. This library aims to replicate the functionality of the PyAutoGUI mouse and keyboard inputs, but by utilizing DirectInput scan codes and the more modern SendInput() win32 function.
0 Comments
Leave a Reply. |