updated win func
This commit is contained in:
@@ -86,9 +86,11 @@ def wait(duration: float) -> None:
|
||||
"""Waits for the specified duration in seconds."""
|
||||
time.sleep(duration)
|
||||
|
||||
def windows_key() -> None:
|
||||
def search_pc(query: str) -> None:
|
||||
"""Presses the Windows key."""
|
||||
pyautogui.hotkey('win')
|
||||
wait(2)
|
||||
press_keyboard(KeyboardInput(text=query))
|
||||
|
||||
def reprompt(nextsteps: str, processor) -> None:
|
||||
"""Re-execute GPT and take a new screenshot."""
|
||||
@@ -102,7 +104,7 @@ def _execute(name, args=[], processor=None):
|
||||
press_keyboard(KeyboardInput(**args))
|
||||
elif name == "wait":
|
||||
wait(**args)
|
||||
elif name == "windows_key":
|
||||
windows_key()
|
||||
elif name == "search_pc":
|
||||
search_pc(**args)
|
||||
elif name == "reprompt":
|
||||
reprompt(**args, processor=processor)
|
||||
|
Reference in New Issue
Block a user