Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best AutoHotKey macros? [closed]

Tags:

I use AutoHotKey for Windows macros. Most commonly I use it to define hotkeys that start/focus particular apps, and one to send an instant email message into my ToDo list. I also have an emergency one that kills all of my big memory-hogging apps (Outlook, Firefox, etc).

So, does anyone have any good AHK macros to share?

like image 961
leeborkman Avatar asked Sep 19 '08 01:09

leeborkman


People also ask

What is better than AutoHotkey?

Conclusion. Pulover's Macro Creator is the best AutoHotkey alternative because it offers more features, is a lot more versatile, and is still as easy to use as AutoHotkey is.

Can AutoHotkey record a macro?

MACRO RECORDER in AutoHotKey: It is based on AutoHotkey language and provides users a simple recorder. Easily record without coding: Mouse Moves, clicks and Keys press capture. Just record sequences of what you do. MACRO RECORDER saves all for you in an executable File "macro.

How do I stop an AutoHotkey macro?

Re: How to stop a script You can use a suspend AutoHotkey function, just press [ESC] and the script stop working, press again and it works.

How do I pause an AutoHotkey script?

To pause or resume the entire script at the press of a key, assign a hotkey to the Pause function as in this example: ^! p::Pause ; Press Ctrl+Alt+P to pause. Press it again to resume.


1 Answers

Very simple and useful snippet:

SetTitleMatchMode RegEx ; ; Stuff to do when Windows Explorer is open ; #IfWinActive ahk_class ExploreWClass|CabinetWClass     ; create new folder     ;     ^!n::Send !fwf      ; create new text file     ;     ^!t::Send !fwt      ; open 'cmd' in the current directory     ;     ^!c::         OpenCmdInCurrent()     return #IfWinActive  ; Opens the command shell 'cmd' in the directory browsed in Explorer. ; Note: expecting to be run when the active window is Explorer. ; OpenCmdInCurrent() {     WinGetText, full_path, A  ; This is required to get the full path of the file from the address bar      ; Split on newline (`n)     StringSplit, word_array, full_path, `n     full_path = %word_array1%   ; Take the first element from the array      ; Just in case - remove all carriage returns (`r)     StringReplace, full_path, full_path, `r, , all       full_path := RegExReplace(full_path, "^Address: ", "") ;      IfInString full_path, \     {         Run, cmd /K cd /D "%full_path%"     }     else     {         Run, cmd /K cd /D "C:\ "     } } 
like image 131
Eli Bendersky Avatar answered Sep 28 '22 12:09

Eli Bendersky