# A simple request that ChatGPT nailed first time

Me:

> Can you write an autohotkey script to bind to Win+O which launches notepad and triggers the file open menu?

ChatGPT:

```rust
#o::
Run, notepad.exe
Sleep 500
Send ^o
return
```

> When you press the Win+O key combination, this script will execute the following actions:
> 
> 1. Launch Notepad by running `notepad.exe`
>     
> 2. Wait for half a second (500 milliseconds) to ensure that Notepad has finished launching.
>     
> 3. Send the keyboard shortcut for opening the file open menu (`^o`).
>     
> 
> You can save this script as a `.ahk` file and then double-click it to run it with AutoHotkey.

## Thoughts

I think this demonstrates how useful AI can be for helping you with those tasks you do so infrequently that you're very unlikely to remember syntax without having to do a lot of googling or digging through past scripts.

[AutoHotkey](https://www.autohotkey.com/) is one of those technologies that I make use of on a daily basis but almost never have to change, or write new things in.

In this instance, ChatGPT saved me mental CPU cycles, keystrokes, potential syntax errors and StackOverflow trawling.

Not revolutionary perhaps, but useful nonetheless.
