🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

ahk-js

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ahk-js

Autohotkey automation into NodeJS

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

CURRENT IN DEVELOPMENT

PULL REQUESTS ARE WELCOME!

Install

npm install ahk-js
# OR
yarn add ahk-js

Usage

You can import providers like:

import { Keyboard, Mouse, Window } from 'ahk-js';

Mouse

click

Mouse.click({
  button?: 'left' | 'middle' | 'right' | 'x1' | 'x2';
  x?: number;
  y?: number;
  count?: string;
  speed?: string;
  downOrUp?: '' | 'D' | 'U';
  relative?: string;
})

drag

Mouse.drag({
  button?: 'left' | 'middle' | 'right' | 'x1' | 'x2';
  x: number;
  y: number;
  toX: number;
  toY: number;
  speed?: string;
  relative?: string;
})

move

Mouse.move({
  x: number;
  y: number;
  speed? : string;
  relative? : string;
})

getPos

Mouse.getPos({
  flag?: number
})

Keyboard

type

Keyboard.type(text: string)

send

Keyboard.send(keys: string, {
  ctrl?: boolean;
  shift?: boolean;
  alt?: boolean;
  win?: boolean;
})

getKeyState

Keyboard.getPos(key: string, mode?: 'P' | 'T')

Window

activate

Window.activate({
  title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
  text?: string;
  excludeTitle?: string;
  excludeText?: string;
})

close

Window.close({
  title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
  text?: string;
  excludeTitle?: string;
  excludeText?: string;
  secondsToWait?: number;
})

exist

Window.exist({
  title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
  text?: string;
  excludeTitle?: string;
  excludeText?: string;
})

hide

Window.hide({
  title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
  text?: string;
  excludeTitle?: string;
  excludeText?: string;
})

kill

Window.kill({
  title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
  text?: string;
  excludeTitle?: string;
  excludeText?: string;
  secondsToWait?: number;
})

maximize

Window.maximize({
  title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
  text?: string;
  excludeTitle?: string;
  excludeText?: string;
})

minimize

Window.minimize({
  title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
  text?: string;
  excludeTitle?: string;
  excludeText?: string;
})

restore

Window.restore({
  title?: ahk_class | ahk_id | ahk_pid | ahk_exe | string;
  text?: string;
  excludeTitle?: string;
  excludeText?: string;
})

Keywords

ahk

FAQs

Package last updated on 10 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts