Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-2024-08-06· OpenAIAi2 WildChat-4.8M (AI2)

Create a command so that when i press F7 i left click at -650,200

  1. User

    Create a command so that when i press F7 i left click at -650,200

  2. Assistant

    To create a command that triggers a mouse left-click at the coordinates (-650, 200) when you press F7, you can use a scripting language or automation tool. One common tool for doing this on Windows is AutoHotkey. Below are instructions on how to set this up using AutoHotkey:

    1. Install AutoHotkey: If you haven't already, download and install AutoHotkey from its official website: AutoHotkey Download.

    2. Create a new script:

      • Right-click on your desktop or in a File Explorer window.
      • Select New > AutoHotkey Script.
      • Name the script file something like ClickScript.ahk.
    3. Edit the script:

      • Right-click on the newly created script file and select Edit Script.
      • Delete any content inside and paste the following script:
      F7::
      Click, -650, 200
      Return
      

      This script listens for the F7 key press and then executes a mouse click at the screen coordinates (-650, 200).

    4. Save and run the script:

      • Save your changes and close the editor.
      • Double-click the ClickScript.ahk file to run it. You should see a green AutoHotkey icon in your system tray, indicating the script is running.
    5. Test the script:

      • Press F7, and the mouse should click at the specified coordinates.

    Note: Coordinates are relative to the active window by default. If you want coordinates to be absolute on the screen, you might need to adjust the script as follows:

    F7::
    CoordMode, Mouse, Screen ; Set the coordinate mode to screen coordinates
    Click, -650, 200
    Return
    

    Remember to rerun your script by double-clicking it again after making changes.