CURRENT IN DEVELOPMENT
PULL REQUESTS ARE WELCOME!
npm install ahk-js
# OR
yarn add ahk-js
You can import providers like:
import { Keyboard, Mouse, Window } from 'ahk-js';
Mouse.click({
button?: 'left' | 'middle' | 'right' | 'x1' | 'x2';
x?: number;
y?: number;
count?: string;
speed?: string;
downOrUp?: '' | 'D' | 'U';
relative?: string;
})
Mouse.drag({
button?: 'left' | 'middle' | 'right' | 'x1' | 'x2';
x: number;
y: number;
toX: number;
toY: number;
speed?: string;
relative?: string;
})
Mouse.move({
x: number;
y: number;
speed? : string;
relative? : string;
})
Mouse.getPos({
flag?: number
})
Keyboard.type(text: string)
Keyboard.send(keys: string, {
ctrl?: boolean;
shift?: boolean;
alt?: boolean;
win?: boolean;
})
Keyboard.getPos(key: string, mode?: 'P' | 'T')
Window.activate({
title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
text?: string;
excludeTitle?: string;
excludeText?: string;
})
Window.close({
title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
text?: string;
excludeTitle?: string;
excludeText?: string;
secondsToWait?: number;
})
Window.exist({
title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
text?: string;
excludeTitle?: string;
excludeText?: string;
})
Window.hide({
title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
text?: string;
excludeTitle?: string;
excludeText?: string;
})
Window.kill({
title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
text?: string;
excludeTitle?: string;
excludeText?: string;
secondsToWait?: number;
})
Window.maximize({
title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
text?: string;
excludeTitle?: string;
excludeText?: string;
})
Window.minimize({
title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
text?: string;
excludeTitle?: string;
excludeText?: string;
})
Window.restore({
title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
text?: string;
excludeTitle?: string;
excludeText?: string;
})