
We then return its original content to the clipboard from the TempClipboard variable.The sanitization function will return the "clean" title to the clipboard, from where we map it to the FileName variable.
This function will "sanitize" the text, removing non-alphanumeric characters and allowing us to use the title's text as a filename. We do the above because we want to copy the note's title to the clipboard, used as an intermediary for sending it to a function we'll add next.We then temporarily copy the clipboard's actual contents to the TempClipboard variable.
"Gui, GN:Submit" grabs the status of every GUI element, meaning it also "grabs" anything typed in the two text fields.
The "FileEncoding" line sets the created text file's encoding. "QNButtonOK:" states that what comes after is what AutoHotkey "should do" when the default OK button of the GUI is clicked. However, the app itself will be useless because we haven't yet added support for saving anything.įix that by adding the following to your script: QNButtonOK:įinalFilename = %NotesPath%\%FileName%%FileNameExtra% It may also help alleviate RSI (repetitive strain injury) for example, it can create substitutes for Alt-Tab using keys, mouse wheel, buttons - the choice is yours.As you will see, the main note's area will be pre-populated with the clipboard's contents. It can also individually disable or override Windows' shortcut keys, such as Win+R/E. In addition to its automation features described below, it excels at hotkeys, making virtually any keyboard key, mouse/joystick button, or combination into a fast hotkey. AutoHotkey provides a fast, scriptable freeware desktop automation tool with hotkeys.Įasily Automate almost anything you want: Send keystrokes & mouse clicks launch programs and documents work with the clipboard, registry, & sound card settings.