Git Product home page Git Product logo

ahkmisc's Introduction

AHKMisc

Libraries, tools, and other fun stuff I made with AutoHotkey v2.

Why

When I started using AHK, I felt like I was missing some functions that I was used to from other languages like Python and Javascript.

These libraries are not the most efficient way to do things in AHK, and there are many other libraries that perform the same tasks but more effectively. I made this to get a grasp of the language and see what I can do with it.

Requirements and Usage

  • You need to have AutoHotkey v2.0 (or later) installed. You can download it from here.
  1. Clone the repository or download from releases.

    git clone https://github.com/verdaderoken/AHKMisc.git
    
  2. Include the library you want to use.

    #Include <LibFileName>
  3. Refer to the documentation in the source code.

Libraries

Some libraries depend on other libraries. Please check the source code for more information.

Library Description Has Dependencies
7Zip A wrapper for 7z archives Yes
Arrays Extended array functions like ArrayMatch() and ArrayFilter()
Basic More basic functions like Print() and Len() Yes
Dir Directory functions
File File functions
Format Format functions Yes
Hotkeys Hotkey functions
JSON JSON serializer and deserializer
Keys List of keys and key groups Yes
Maps Extended map functions
Math Additional math functions
Path Path functions Yes
Run Run functions
Strings Extended string functions Yes
Timer Class-based AHK Timer
URI URI functions
Window Window functions

Tools

Some tools use the libraries above. Please check the source code for more information.

Library Description
AdobePremierePro A very simple wrapper for Adobe Premiere Pro
AntiGhostKey A pseudo-ghost key prevention script
MediaInfo Get media file information (similar to FFprobe)
NumpadBind Bind numpad keys to number row for TKL keyboards
Piano Play piano with your keyboard

Development

I won't be actively maintaining this repository, but I will continue to welcome pull requests and issues. This repository is here for anyone who wants to learn from it or use it as a reference.

Resources

Other repositories worth checking out:


AHKMisc © 2024 Ken Verdadero. MIT License

ahkmisc's People

Contributors

verdaderoken avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ahkmisc's Issues

Deprecate `Set.ahk`

Reason:

This is because the only function, Set(), can be achieved with the built-in StrSplit()

Optimize `ArrayFind` loop

Problem

The caseSensitive is inside the loop.

  for i, e in haystack {
      if caseSensitive {
          if e == needle {
              return i
          }
      } else {
          if e = needle {
              return i
          }
      }
  }

Solution

Rearrange the loop

if caseSensitive {
        for i, e in haystack {
            if e == needle {
                return i
            }
        }
    } else {
        for i, e in haystack {
            if e = needle {
                return i
            }
        }
    }
    ```

Refactor string to enumerable functions

Functions like Arr() and ArrayFromStr() are just StrSplit() under the hood.

Redefine the function ArrayFromStr() to be an alias of StrSplit()

Notes:

From @G33kDude
You can cast string to array with splat, e.g.

String.prototype.__Enum := (str,n) => StrSplit(str).__Enum(n)
MsgBox Array(("Hello")*).Length

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.