Command files
Diatom/User guide/Command files

Command files and attributes

Command lists

ini
[my_command]
type=f
tip=Example command
code='''
MsgBox("Hello")
'''

Diatom parses its own section/key-value format. Use one simple attribute per line, triple single quotes for multiline code, UTF-8 and a final newline. List comments use ;' followed by text.

Independent script headers

File Header
.ahk ;? type=e,read=1
.py #? type=jp
.js //? type=js
.ps1 #? type=jw
.lua --? type=ju

Place the comma-separated header at the first meaningful content. Empty header attributes are ignored. The filename supplies the command name. /* toml … */ remains a planned format.

Reload behavior

Restart after changing names, aliases, hotkeys, metadata, list code or the file inventory. A supported independent script with read reloads its body at the next new instance. Read is intended for independent-thread debugging. Compiled functions and labels in reused interpreters retain their cache behavior. Lua currently follows a different loading path.

Useful attributes

Attribute Purpose
type, fn, ps, code Execution form and action
alias Additional names separated by a vertical bar
key AHK hotkey, hosted by def_hotkey
ban Presence skips loading
pc / pc_bl Machine allow / deny filters
dog / task / ev Startup, schedule and event bindings
lib Include matching AHK library code

Remove ban to re-enable a command. ban=0 still creates the attribute. Directories ending in .skip are skipped.

Duplicate names

Later list definitions replace earlier ones. Independent scripts and aliases skip names already registered. Sources are sorted by full path, so the written order of src_dir roots does not determine override priority.

User guide

Loading the guide…