MacroMat 1.0.0

dotnet add package MacroMat --version 1.0.0
                    
NuGet\Install-Package MacroMat -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MacroMat" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MacroMat" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MacroMat" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MacroMat --version 1.0.0
                    
#r "nuget: MacroMat, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MacroMat@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MacroMat&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MacroMat&version=1.0.0
                    
Install as a Cake Tool

MacroMat

MacroMat is a modern macro and hotkey creation library built with BakedEnv to expand upon AutoHotKey's syntax and features.

Features.

  • Easy to use, intuitive syntax.
  • Built-in support for a variety of common operations such as mouse and keyboard input, window manipulation, and more.
  • Flexible and extensible design allows for easy integration with other languages and libraries.
  • [Planned] Cross-platform compatibility (Windows, macOS, and Linux).
    • I do not have access to a macOS or Linux device. Contributions form those who do would be appreciated.

Getting Started & Documentation

C# Library

Installation

The C# library is be available on nuget.

Usage

The library's functionality is primarily exposed via the Macro class, which is necessary in order to, well, macro (as a verb).

using MacroMat;

Macro macro = new Macro();
macro.EnqueueInstruction(...);

bool success = macro.ExecuteNext();

// [...]

Instructions are the building blocks of a macro. By default, several cross-platform instructions are available in the MacroMat.Instructions namespace; SimulateKeyboardInstruction, SimulateMouseInstruction, SendUnicodeInstruction, KeyCallbackInstruction, and more.

// [...]

var pressA = new SimulateKeyboardInstruction(KeyInputData.FromKey(InputKey.A, KeyInputType.KeyDown));
var releaseA = new SimulateKeyboardInstruction(KeyInputData.FromKey(InputKey.A, KeyInputType.KeyUp));

macro.EnqueueInstruction(pressA)
     .EnqueueInstruction(releaseA);

macro.ExecuteAll();

For convenience, several extension methods are available for common operations.

using MacroMat.Extensions;

// [...]

macro.SimulateUnicode("Unicode, UTF-8, or is it UTF-16?")
     .Wait(1000)
     .Action(() => Console.WriteLine("Checkpoint."))
     .Wait(500)
     .SimulateInput(KeyInputData.FromKey(InputKey.Backspace, KeyInputType.KeyDown))
     .Wait(5000); // Hold down backspace for 5 seocnds
     .SimulateInput(KeyInputData.FromKey(InputKey.Backspace, KeyInputType.KeyUp))

See the documentation for in-depth information.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 263 8/5/2024