Hotkeys & tasks
Diatom/User guide/Hotkeys & tasks

Hotkeys, startup and scheduled tasks

Add a hotkey

ini
[open_notepad]
type=f
key=^!F9
code='''
Run("notepad.exe")
'''

^ means Ctrl, ! Alt, + Shift and # Win. Multiple hotkeys normally use ||. key entries are collected into the running def_hotkey host. Use hotif for an AHK hotkey condition, then restart to register changes.

Startup actions

The command attribute dog=1 starts it on each launch. dog=-1 starts it only when the boot argument is used.

ini
[dog]
my_service=1

[boot]
my_initialization=1

boot adds its items while dog remains active. Duplicate startup entries run separately.

Timers

ini
task=em:15

es:N, em:N and eh:N are second/minute/hour periods. N must be positive. Timing aligns to internal uptime boundaries, so the first run can occur before a full period after launch.

rs:N, rm:N and rh:N schedule a one-time action after the current task runtime reaches the specified duration. h:930 selects local 09:30. Separate combined expressions with |. The process must remain running, and missed work during sleep is not guaranteed to be replayed.

Persistent services

A complete script can keep functions, hotkeys and a receiver available. Startup and readiness are separate events. Its process lifetime depends on the selected execution mode and Job relationship.

User guide

Loading the guide…