This project is a tool that translates AutoIt3 code into JavaScript.
Beyond ordinary translation, the project aims to become a superset of AutoIt3 by leveraging the capabilities of Node.js and JavaScript. This allows for extended functionality while maintaining a high level of support for AutoIt3 syntax and features.
- Converts AutoIt3 scripts to JavaScript in real-time
- Built with TypeScript for type safety
- Uses Vite for rapid development
- Provides an AST and a lexer output preview
- Node.js version: 20.x or later
- TypeScript version: 5.7.x or later
To set up the project locally, follow these steps:
# Clone the repository
git clone https://github.com/jakubmaniak/au2js
# Navigate to the project directory
cd au2js/webapp
# Install dependencies
npm installTo start the development server, run:
npm run devThen, open your browser and go to http://localhost:5173 to use the converter.
Below is a simple example demonstrating how AutoIt3 code is converted into JavaScript using this tool:
Const $PI = 3.14159265359
Local $angle = $PI/6, _
$radius = 2
Local $point = Polar($angle, $radius)
ConsoleWrite("Angle = " & $angle & @CRLF);
ConsoleWrite("Radius = " & $angle & @CRLF);
ConsoleWrite("Point = (" & $point[0] & ", " & $point[1] & ")")
Func Polar($phi, $r)
Local $aPoint = [$r * Cos($phi), $r * Sin($phi)]
Return $aPoint
EndFuncconst au3 = require("au3");
const $pi = 3.14159265359;
let $angle = $pi / 6, $radius = 2;
let $point = polar_fn($angle, $radius);
au3.ConsoleWrite("Angle = " + $angle +''+ au3.CRLF);
au3.ConsoleWrite("Radius = " + $angle +''+ au3.CRLF);
au3.ConsoleWrite("Point = (" + $point[0] +''+ ", " + $point[1] + ")");
function polar_fn($phi, $r) {
let $apoint = [$r * au3.Cos($phi), $r * au3.Sin($phi)];
return $apoint;
}