Skip to main content

Overview

The following documentation is an overview of extensions that have been made to the Lua language in order to provide easier programming when creating macros to automate tasks.

Lua Syntax Extensions Documentation

Mouse

Method Info
mouse.LeftClick() Returns void
mouse.LeftDoubleClick() Returns void
mouse.LeftDown() Returns void
mouse.LeftUp() Returns void
mouse.MiddleClick() Returns void
mouse.MiddleDown() Returns void
mouse.MiddleUp() Returns void
mouse.RightClick() Returns void
mouse.RightDown() Returns void
mouse.RightUp() Returns void
mouse.ScrollDown(int clicks) Returns void
mouse.ScrollUp(int clicks) Returns void
mouse.SetPosition(int x, int y) Returns nothing

Mouse

Property Info
mouse.X Gets or sets int
The X coordinate of the mouse's current position.
mouse.Y Gets or sets int
The X coordinate of the mouse's current position.

UI

Method Info
ui.Activate() Returns void
ui.ClearConsole() Returns void
ui.ConsoleGotoLine(int line) Returns void
ui.DebugNamespaces() Returns void
ui.EditorGotoLine(int line) Returns void
ui.Exit() Returns void
ui.GetWindowPosition(string processName) Returns Rect
ui.HideWindow() Returns void
ui.InputBox(string promptText) Returns string
ui.Log(string text) Returns void
ui.Maximize() Returns void
ui.Minimize() Returns void
ui.MsgBox(string text) Returns void
ui.MsgBox(string text, string title) Returns void
ui.Pause(int milliseconds) Returns void
ui.SendKeys(string keys) Returns void
ui.SetWindowFocus(string processName) Returns void
ui.SetWindowFocus(int processId) Returns void
ui.ShowWindow() Returns void
ui.Sleep(int milliseconds) Returns void
ui.Write(string text) Returns void
ui.WriteLine(string text) Returns void
ui.YesNoDialog(string promptText) Returns bool

UI

Property Info
ui.StatusText Gets or sets string
Status text at the bottom of the editor window.
ui.Title Gets or sets string
The window title.

Console

Method Info
console.Clear() Returns void
console.ClearBuffer() Returns void
console.Flush() Returns void
console.GotoLine(int line) Returns void
console.Log(string text) Returns void
console.Read(string filename) Returns void
console.Save(string filename, bool append) Returns void
console.ScrollToEnd() Returns void
console.ScrollToTop() Returns void
console.Write(string text) Returns void
console.WriteLine(string text) Returns void
console.WriteLineToBuffer(string text) Returns void
console.WriteToBuffer(string text) Returns System.Void

File

Method Info
file.Append(string filename, string text) Returns void
file.Contains(string filename, string searchText) Returns bool
file.Contains(string filename, string searchText, bool caseSensitive) Returns bool
file.Copy(string sourceFilename, string destinationFilename) Returns void
file.CreationDate(string filename) Returns DateTime
file.Delete(string filename) Returns void
file.Exists(string filename) Returns bool
file.FileSize(string filename) Returns Int64
file.FileSizeFormatted(string filename) Returns string
file.IsReadOnly(string filename) Returns bool
file.LastAccessTime(string filename) Returns DateTime
file.LastWriteTime(string filename) Returns DateTime
file.Move(string sourceFilename, string destinationFilename) Returns void
file.Read(string filename) Returns string
file.ReadLines(string filename) Returns string[]
file.SearchFor(string filename, string text) Returns .IEnumerable1[string]
file.SearchFor(string filename, string text, bool caseSensitive) Returns .IEnumerable1[string]
file.Write(string filename, string text) Returns System.Void

Directory

Method Info
directory.CreateDirectory(string directoryPath) Returns void
directory.DeleteDirectory(string directoryPath) Returns void
directory.Exists(string directory) Returns bool
directory.FileCount(string directoryPath) Returns int
directory.GetDirectories(string directoryPath) Returns string[]
directory.GetDirectories(string directoryPath, string searchPattern) Returns string[]
directory.GetFiles(string directoryPath) Returns string[]
directory.GetFiles(string directoryPath, string searchPattern) Returns System.String[]

Hash

Method Info
hash.CRC32(string value) Returns int
hash.DecodeBase64(string value) Returns string
hash.EncodeBase64(string value) Returns string
hash.MD5(string value) Returns string
hash.SHA1(string value) Returns string
hash.SHA256(string value) Returns string
hash.SHA384(string value) Returns string
hash.SHA512(string value) Returns string
hash.UrlDecode(string value) Returns string
hash.UrlEncode(string value) Returns System.String

Factory

Method Info
factory.Bitmap(int height, int width) Returns LuaBitmap
factory.Bitmap(string filename) Returns LuaBitmap
factory.List() Returns list
factory.ListNumber() Returns list
factory.ListString() Returns list
factory.Stopwatch() Returns Stopwatch
factory.StringBuilder() Returns LuaAutomation.Lua.LuaStringBuilder

HTTP

Method Info
http.Delete(string url) Returns string
http.Delete(string url, string data) Returns stringDownloads a string from a URL using the DELETE method. Post form values in the format: LastName=Smith
http.Delete(string url, string data, string headerKey, string headerValue) Returns stringDownloads a string from a URL using the DELETE method. Post form values in the format: LastName=Smith
http.Get(string url) Returns string
http.Get(string url, string headerKey, string headerValue) Returns string
http.Post(string url) Returns string
http.Post(string url, string data) Returns stringDownloads a string from a URL using the POST method. Post form values in the format: LastName=Smith
http.Post(string url, string data, string headerKey, string headerValue) Returns stringDownloads a string from a URL using the POST method. Post form values in the format: LastName=Smith
http.Put(string url) Returns string
http.Put(string url, string data) Returns stringDownloads a string from a URL using the PUT method. Post form values in the format: LastName=Smith
http.Put(string url, string data, string headerKey, string headerValue) Returns System.StringDownloads a string from a URL using the PUT method. Post form values in the format: LastName=Smith

Process Extensions

Method Info
process extensions.GetPosition(int id) Returns Rect
process extensions.GetPosition(string processName) Returns Rect
process extensions.GetProcesses() Returns Process[]
process extensions.GetProcessIdByName(string name, bool exactMatch) Returns int
process extensions.GetProcessIds() Returns int[]
process extensions.GetProcessNames() Returns string[]
process extensions.IsProcessRunning(string processName, bool exactMatch) Returns bool
process extensions.SetFocus(int processId) Returns void
process extensions.SetFocus(string processName) Returns void
process extensions.SetPosition(int processId, int x, int y, int width, int height) Returns void
process extensions.Start(string fileName) Returns void
process extensions.Start(string fileName, string arguments) Returns void
process extensions.Start(string fileName, string[] arguments) Returns void
process extensions.WindowTitle(bool returnParent) Returns System.String

StringBuilder

Method Info
stringbuilder.Append(string text) Returns void
stringbuilder.AppendLine(string text) Returns void
stringbuilder.Clear() Returns void
stringbuilder.Insert(int index, string value) Returns void
stringbuilder.Length() Returns int
stringbuilder.Remove(int startIndex, int length) Returns void
stringbuilder.Replace(string oldValue, string newValue) Returns void
stringbuilder.ToString() Returns System.String

Clipboard

Method Info
clipboard.ContainsText() Returns bool
clipboard.Flush() Returns void
clipboard.GetText() Returns string
clipboard.SetHtml(string text) Returns void
clipboard.SetText(string text) Returns void
clipboard.SetUnicodeText(string text) Returns System.Void

Audio

Method Info
audio.AtTime() Returns Double
audio.IsPaused() Returns bool
audio.IsPlaying() Returns bool
audio.Pause() Returns void
audio.Play(string fileName) Returns void
audio.Play(string fileName, int startAt, int endAt) Returns void
audio.Stop() Returns void
audio.TotalTime() Returns System.Double

Bitmap

Method Info
bitmap.Dispose() Returns void
bitmap.GetPixel(int x, int y) Returns string
bitmap.Load(string filename) Returns void
bitmap.Save(string filename, Drawing.Imaging.ImageFormat format) Returns void
bitmap.SaveJpeg(string filename) Returns void
bitmap.SavePng(string filename) Returns void
bitmap.SaveTiff(string filename) Returns void
bitmap.SetPixel(int x, int y, string htmlColor) Returns System.Void

Database

Method Info
database.ClearCache() Returns void
database.ClearQueue() Returns void
database.Close() Returns void
database.Dispose() Returns void
database.Execute(string sql) Returns void
database.Execute(string sql, string[] parameters) Returns void
database.ExecuteBuffered(string sql) Returns void
database.ExecuteBuffered(string sql, string[] parameters) Returns void
database.ExecuteNonQueryAsync(string sql, string[] parameters) Returns Threading.Tasks.Task
database.Flush() Returns void
database.GetInterval() Returns int
database.Open(string connectionString) Returns void
database.OpenAsync() Returns Threading.Tasks.Task
database.OpenAsync(string connectionString) Returns Threading.Tasks.Task
database.Select(string sql, string[] parameters) Returns dictionary<string, object>
database.SelectValue(string sql, string[] parameters) Returns object
database.SetInterval(int seconds) Returns nothing

Database

Property Info
database.CommandsRun Gets or sets int
database.IsWriting Gets or sets bool