How to use the pyautogui.hotkey function in PyAutoGUI

To help you get started, we’ve selected a few PyAutoGUI examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse / sumo / tests / netedit / neteditTestFunctions.py View on Github external
def typeThreeKeys(key1, key2, key3):
    """
    @brief type three keys at the same time (key1 -> key2 -> key3)
    """
    # wait before every operation
    time.sleep(DELAY_KEY)
    # type two keys at the same time
    pyautogui.hotkey(key1, key2, key3)
github angus-y / PyIris-backdoor / payloads / lin_injection_payload.py View on Github external
return
            pyautogui.press(arg)
            s.sendall('[+]Injected pressed key' + End)
        elif injection_type == 'sh':
            if not arg:
                s.sendall('[-]Supply a key as an arg'+End)
                return
            if ' ' in arg:
                arg = arg.split(' ')
                for key in arg:
                    pyautogui.keyDown(key)
                for key in reversed(arg):
                    pyautogui.keyUp(key)
                s.sendall('[+]Injected keyboard shortcut' + End)
            else:
                pyautogui.hotkey(arg)
                s.sendall('[+]Injected keyboard shortcut' + End)
        elif injection_type == 'valids':
            tar_list = '|/'.join(valid_keys)
            s.sendall(tar_list + End)
        elif injection_type == 'click_left':
            pyautogui.click(button='left')
            s.sendall('[+]Injected left mouse click' + End)
        elif injection_type == 'click_right':
            pyautogui.click(button='right')
            s.sendall('[+]Injected right mouse click' + End)
        elif injection_type == 'move_to':
            if not arg:
                s.sendall('[-]Supply a key as an arg'+End)
                return
            try:
                arg = arg.split(' ')
github Serlopal / wow_fishing_bot / RLbot.py View on Github external
def throw_bait(self, fishing_hotkey):
		pyautogui.hotkey(fishing_hotkey)
github Serlopal / wow_fishing_bot / bot_SIFT.py View on Github external
def throw_bait(self, fishing_hotkey):
		pyautogui.hotkey(fishing_hotkey)
github TREE-Ind / desktop-control / __init__.py View on Github external
def handle_paste_intent(self, message):
        self.speak("Pasting from clipboard")
        pyautogui.hotkey("ctrl", "v")
github TREE-Ind / desktop-control / __init__.py View on Github external
def handle_cut_intent(self, message):
        self.speak("Cutting to clipboard")
        pyautogui.hotkey("ctrl", "x")
github EvilPort2 / final-year-project / modules / gesture_recognition / gesture_api1.py View on Github external
def prev_window(x = None):
	gui.hotkey('altleft', 'shiftleft', 'tab')
github LifeAlgorithm / VitalSourcePrinter / VitalSourcePrinter_PageDown.py View on Github external
pdfWriter.write(pdfOutputFile)
                pdfOutputFile.close()
                pdf1File.close()
                pdf2File.close()
                os.remove(filedir + 'Ebook.pdf')
                os.remove(filedir + 'File2.pdf')
                os.rename(filedir + 'Ebook1.pdf', filedir + 'Ebook.pdf')
                print("Page: " + str(page + 2) + ' of ' + str(len(RomanBookList)))         
        print("\nRoman Numerals Done\n")
        pyautogui.hotkey('ctrl', 'pagedown', interval = 0.25)

    else:
        PageEntry1 = NumberList[0]
        PageEntry2 = NumberList[1]
                            
        pyautogui.hotkey('ctrl', 'p')
        pyautogui.press(keys = 'tab', presses = 2, interval = 0.25)
        pyautogui.press('delete', 5)
        pyautogui.typewrite(PageEntry1)
        pyautogui.press('tab')
        pyautogui.press('delete', 5)
        pyautogui.typewrite(PageEntry2)
        pyautogui.typewrite(['tab', 'tab', 'enter', 'enter'], interval = 0.25 )
        pyautogui.typewrite("Ebook", interval = 0.50)
        pyautogui.press('enter', interval = 0.5)
        time.sleep(0.25)

    def NumberProcess(start, inputLastPageList):
        for page in range(start, len(NumberList), 2): 
                pyautogui.hotkey('ctrl', 'p', interval = 0.25)
                pyautogui.press('tab', 2, interval = 0.25)
                pyautogui.press('delete', 5, interval = 0.25)