| View previous topic :: View next topic |
| Author |
Message |
bigboehmboy
Joined: 26 May 2009 Posts: 15
|
Posted: Wed Jan 06, 2010 2:34 pm Post subject: Very Small AHK Editing Macro |
|
|
I'm sure many of you already have some sort of macro like this, but I thought I'd share anyway. It definitely comes in handy when editing AHK scripts.
The script does 1 of 3 things:
If the window in focus is the AHK script (in a text editor): Save the script and reload AHK
Else, If the AHK script is open in a text editor: Switch to that window
Else: open the AHK script.
| Code: | SetTitleMatchMode, 2
F9::
IfWinActive, AutoHotkey.ahk
{
SendInput ^s
reload
}
else
{
IfWinExist, AutoHotkey.ahk
{
WinActivate
}
else
{
Run notepad C:\Documents and Settings\mboehm2\My Documents\AutoHotkey.ahk
}
}
return |
If anyone wanted to run this, they'd have to of course change the path to point to their AHK script. Note that I set the TitleMatchMode to match partial titles since I will edit a script in various word processors sometimes.
I've got a few slightly less trivial scripts on my home desktop which I hope to post later, but thought I'd put this one up now. |
|
| Back to top |
|
 |
tonne
Joined: 06 Jun 2006 Posts: 1651 Location: Denmark
|
Posted: Wed Jan 06, 2010 2:39 pm Post subject: Re: Very Small AHK Editing Macro |
|
|
| bigboehmboy wrote: | | If anyone wanted to run this, they'd have to of course change the path to point to their AHK script. |
Use A_ScriptFullPath _________________ RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2 |
|
| Back to top |
|
 |
bigboehmboy
Joined: 26 May 2009 Posts: 15
|
Posted: Wed Jan 06, 2010 6:32 pm Post subject: |
|
|
| Ooh, thanks for the tip! |
|
| Back to top |
|
 |
|