Introduction

Next

Mini-Framework, version 0.4.0.5

Library of Mini-Framework
Copyright (c) 2013, - 2017 Paul Moss
Licensed under the GNU General Public License GPL-2.0

Requires AutoHotkey [v1.1.21+]

Introduction

Mini-Framework is as collection of classes built for AutoHotkey that help give functionality similar to a strongly typed language. The MfType class can be used to get information from an object. All objects have a GetType() method that returns an instance of the MfType class. All object inherit from MfObject and therefore inherit all the methods of MfObject.

Mini-Framework attempts to bridge the gap between the powerful scripting language of AutoHotkey and a more strongly typed language. The classes are built in a Mono/.Net style.

The Mini-Framework classes are built with the power of strongly type object while maintaining flexibility with AutoHotkey variables. Many of the classes accept variables in their methods, constructors and overloads methods to make using this framework flexible.

All the Classes in System root Namespace are prefixed with Mf to help avoid any conflicts with naming conventions and variables in existing projects.

There is also a package available for Sublime Text to give intellisense and syntax highlighting to Mini-Framework.

All objects derived from MfObject use a Zero-Based index.

Namespaces

This framework loosely uses name-spaces. AutoHotkey does on support Namespace at this time and this framework mimics name-spaces by using includes organizes in specific groups. See Namespace for more information.

Primitives

Mini-Framework has what might be considered primitives in other languages. These are objects that are used to represent string and numbers in a more object oriented way.
See core numeric related classes here.

List/Array/Dictionary/HashTable

Mini-Framework has several classes to help with List, Arrays and Dictionaries such as MfCollection, MfDictionary, MfGenericList, MfList, MfQueue, MfHashTable and MfStack.

Classes such as MfCollectionBase, MfDictionaryBase and MfListBase can be used in your project to create custom list and dictionary classes. See core list related classes here.

Exceptions

Exceptions are used extensively throughout Mini-Framework to gather and display error information. All exceptions are derived from the MfException class. Exceptions are used in place of AutoHotkey Exception and ErrorLevel unless otherwise noted. See core exceptions classes here.

Method Overloads

Mini-Framework uses method overloading extensively. Overloading allows a method to have different variations of parameters based upon the type that is passed in. For an example of Overloads see the MfTimeSpan Constructor method.

The MfParams is a class designed for working with method overloads.

Enumerations

Mini-Framework uses enumerations such as MfDigitShapes, MfEqualsOptions, MfNumberFormatInfo, MfNumberStyles, MfSetFormatNumberType, MfStringSplitOptions, MfStringComparison. All enumerations inherit from the MfEnum class. All Enumeration classes enumeration values are instances of MfEnum.EnumItem. See Core Enumeration classes here.

To create custom enumerations for you project inherit your class from the MfEnum class.

Null Values

Mini-Framework has several different options for working with nulls. The Primary way is the MfNull class using the MfNull.IsNull() method.

There is also a global variable named Null with a value of "" for convenience. For another option you can use global variable Undefined.

Also see MfString.IsNullOrEmpty() method.

Environment

Mini-Framework uses The MfEnvironment class to access various environment variables. See MfEnvironment Properties for a list of Environment variables.

Command Wrappers

Mini-Framework uses the Mfunc create a wrapper for many of the built in AutoHotkey command functions and adds a few other functions for common use. See the Mfunc Methods.

How to Include in my project?

See Distribution

Will adding Mini-Framework cause cause performance issues due to the number of objects?

AutoHotkey Documentation states "There is no limit to how many variables a script may create. The program is designed to support at least several million variables without a significant drop in performance.".