![]() I suspect you are not doing enough validation (forĮxample, to forbid negative values or multi-character keys). What is it that you think should be made better in this code? Any feedback and suggestions would be much appreciated. Print("\n The delay between each autoclick should be an integer or a decimal value, defaulting to 1 (second). ![]() \n")ĭelay = float(input("Delay between each autopress in seconds (integer/float): ")) Print("\n The number of autopresses should be an integer value, defaulting to 1. N_clicks = int(input("Number of autopresses (integer): ")) ![]() I have done many of the changes mentioned in the answers and here is the final code: from pynput.keyboard import Controllerĭef auto_click(key: str, n_clicks: int, delay: float): I previously posted a question for codereview:Īnd I received some great feedback and changes to do in the code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |