Git Product home page Git Product logo

autohotkey-oofs's Introduction

A list of borderline sketchy things you can do in AutoHotkey

Call multiple functions without spaces.

f1() {
    msgbox % A_ThisFunc
}
f2() {
    msgbox % A_ThisFunc
}

f1()f2()

Writing code inside continuation sections.

msgb
( LTrim Join
o
x % A
_UserN
ame
)

Using multiple continuation sections for one string

MsgBox,
(
Hello
) World
(
!
)

Using expression continuation in plain text mode

MsgBox, When writing in plain text
, you can continue your line onto the next
. Just make sure to punctuate at the start
! For some reason commas, when used in this manner
, don't cause leading whitespace
, but all other punctuation does
. Isn't that great
? This feature was designed for use with expressions
, but it works fine without them too!

Converting a pure JSON string to an ahk object.

Okay, this one is actually kind of cool. Obviously doesn't handle JSON types like null.

obj :=
( LTrim Join
{
    "key": "value",
    "list": [
        "item1",
        "item2"
    ]
}
)

for k, v in obj {
    msgbox % k " " v
}

Single-equals sometimes does expression assignment

In some situations, the dual purpose single-equals operator (normally plain-text assignment or case-insensitive equality) can take on a third purpose: expression assignment.

MsgBox, % "Test: "
. (a = 1      ; Comparison
,  b = 2      ; Expression assignment
,  c = b + 1) ; Expression assignment
. "," a "," b "," c

AutoHotkey can click its own Hotkeys

Just why?

#MaxHotkeysPerInterval, 9140
#MaxThreadsPerHotkey 255
#MaxThreads 255
SetBatchLines, -1
SetKeyDelay -1, -1
SendInput, a
~a::SendInput bb
~b::SendInput cc
~c::SendInput dd
~d::SendInput ee
~e::SendInput aa

autohotkey-oofs's People

Contributors

g33kdude avatar nnnik avatar run1e avatar

Watchers

 avatar

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.