 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Piz
Joined: 16 Feb 2008 Posts: 46
|
Posted: Sat Mar 01, 2008 4:36 pm Post subject: Add .AHM as associated file type |
|
|
I've been building up quite an extensive collection of code since I started writing AutoHotkey scripts. I've taken to giving my library modules (i.e. include files) an extension of .AHM (for AutoHotkey Module), to distinguish them from apps.
I've manually added an Explorer file type association for them (and I'm going to create a separate icon ), but I thought that if others like the idea of separating code modules from apps then the .AHM extension might be appealing to them as well. So my request is to officially adopt the extension and add it to the installation as an associated AutoHotkey file type. |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Mar 01, 2008 5:19 pm Post subject: Re: Add .AHM as associated file type |
|
|
I've been using & recommend .ahi for AutoHotkey Include...they were called just includes before the whole "standard library" term was introduced...but still it's a "library of includes"...so I think .ahi fits...not that calling it modules is bad, I've just already been using .ahi...
Also I don't know about an "...associated AutoHotkey file type."...if associated with AutoHotkey it would just run like any other script...it should have an AutoHotkey Icon, but the default action should be edit... |
|
| Back to top |
|
 |
Piz
Joined: 16 Feb 2008 Posts: 46
|
Posted: Sat Mar 01, 2008 8:08 pm Post subject: Re: Add .AHM as associated file type |
|
|
.AHI would be OK for the extension (though, of course, I prefer mine ).
I would have no problem with the default action being edit, if that's what most people want - I could always change it by hand. The reason I would change it is that I include a test code section in my modules, and I run the module itself to run the test code (see below). That doesn't make sense for long test code, because all that code, even though it's commented out for "production" use, ends up in any script that includes a module. However, I only run uncompiled scripts when testing, so the commented test code doesn't end up in the compiled "production' version, making its size a non-issue.
Here's my module template, minimally fleshed out to demonstrate how I have things set up. Note that you can enable/disable the test code by changing a single character in the file:
| Code: | /*
pizDemo.ahm
Module for demonstrating Piz's modules.
Legal info at end of file.
The user of this module should only refer to the constants, variables, and functions listed in the PUBLIC section. Everything else in the module is subject to change without notice and cannot be depended upon to function or even exist in future versions.
*/
;++ INCLUDES +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;None
;-- INCLUDES -------------------------------------------------------------------
;++ DIRECTIVES +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;None
;-- DIRECTIVES -----------------------------------------------------------------
;++ PUBLIC +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;CONSTANTS
;None
;VARIABLES
;None
;FUNCTIONS
/*
pizDemo_version()
*/
;-- PUBLIC ---------------------------------------------------------------------
;++ GLOBALS, PRIVATE +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;CONSTANTS
kpPizDemoVersion := 0.0
;VARIABLES
;None
;-- GLOBALS, PRIVATE ----------------------------------------------------------
;++ FUNCTIONS, PUBLIC ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
pizDemo_version()
{
/*
Return the module version
PARAMETERS
None
*/
GLOBAL
;CONSTANTS
;None
;VARIABLES
;None
;CODE
return kpPizDemoVersion
}
;-- FUNCTIONS, PUBLIC ----------------------------------------------------------
;++ FUNCTIONS, PRIVATE +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;None
;-- FUNCTIONS, PRIVATE ---------------------------------------------------------
;++ TESTING ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/*
To enable/disable test code, toggle a space between the '*' and the '/' in the closing comment delimiter immediately below. Because of this, use only single-line comments in the test code.
* /
;Test the version function:
msgbox % "Version " . pizDemo_version()
/*
*/
;-- TESTING --------------------------------------------------------------------
;++ LEGAL ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/*
Copyright 2008 by Piz.
This code is provided as-is. No warranty or guarantee, express or implied, is given as to its fitness for any purpose whatsoever. In other words, if you use this code, you and you alone are responsible for anything that follows from that use.
*/
;-- LEGAL ---------------------------------------------------------------------- |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|