Neuridion API Reference
Complete reference for all 37 standard library modules.
Core
Data & Storage
Files & Network
User Interface
Text & Language
Date, Time & Security
AI, Media & Hardware
Core
Global functions available without a module prefix.
| Function | Parameters | Returns | Description |
Print() | values... | — | Output text to the console |
TypeOf() | value | String | Get the type name of a value |
Array() | items... | Array | Create an array from arguments |
IsNil() | value | Boolean | Check if a value is Nil |
Core.UUID() | — | String | Generate a random UUID string |
Math
Mathematical functions, constants, and random number generation.
Properties
| Property | Type | Description |
Math.PI | Double | Pi (3.14159...) |
Math.E | Double | Euler's number (2.71828...) |
Math.Infinity | Double | Positive infinity |
Math.NaN | Double | Not a Number |
Methods
| Method | Parameters | Returns | Description |
Sqrt(x) | number | Double | Square root |
Sin(x) | radians | Double | Sine |
Cos(x) | radians | Double | Cosine |
Tan(x) | radians | Double | Tangent |
Asin(x) | value | Double | Arc sine |
Acos(x) | value | Double | Arc cosine |
Atan(x) | value | Double | Arc tangent |
Atan2(y, x) | y, x | Double | Two-argument arc tangent |
Log(x) | number | Double | Natural logarithm |
Log10(x) | number | Double | Base-10 logarithm |
Exp(x) | number | Double | e raised to x |
Pow(base, exp) | base, exponent | Double | Power |
Floor(x) | number | Double | Round down |
Ceil(x) | number | Double | Round up |
Round(x [, decimals]) | number [, places] | Double | Round to nearest (optional decimal places) |
Abs(x) | number | Number | Absolute value |
Min(a, b) | a, b | Number | Smaller of two |
Max(a, b) | a, b | Number | Larger of two |
Sign(x) | number | Integer | Sign: -1, 0, or 1 |
Random() | — | Double | Random 0.0–1.0 |
RandomInt(min, max) | min, max | Integer | Random integer in range |
System
System information and process control.
Properties
| Property | Type | Description |
System.Platform | String | Always "macOS" |
System.OSVersion | String | macOS version string |
System.UserName | String | Current user name |
Methods
| Method | Parameters | Returns | Description |
Sleep(ms) | milliseconds | — | Pause execution |
Exit([code]) | [exit code] | — | Terminate the program |
Environment(name) | variable name | String | Read environment variable |
CurrentTimeMillis() | — | Integer | Milliseconds since epoch |
Console
Console I/O for reading input and writing formatted output.
| Method | Parameters | Returns | Description |
Write(values...) | values | — | Print without newline |
WriteLine(values...) | values | — | Print with newline |
Error(msg) | message | — | Print [ERROR] message (red) |
Warn(msg) | message | — | Print [WARN] message (orange) |
Info(msg) | message | — | Print [INFO] message (blue) |
Debug(msg) | message | — | Print [DEBUG] message (gray) |
Table(data) | 2D array | — | Print formatted table |
ReadLine([prompt]) | [prompt text] | String | Read user input |
Clear() | — | — | Clear console output |
JSON
Parse, create, and manipulate JSON data.
| Method | Parameters | Returns | Description |
Parse(text) | JSON string | Object/Array | Parse JSON string to value |
Stringify(value [, pretty]) | value [, Boolean] | String | Convert value to JSON string |
IsValid(text) | string | Boolean | Check if string is valid JSON |
Format(text) | JSON string | String | Pretty-print JSON |
ReadFile(path) | file path | Object/Array | Load and parse a JSON file |
WriteFile(path, value [, pretty]) | path, value [, Bool] | — | Write value as JSON to file |
CSV
Read and write CSV (Comma-Separated Values) data.
| Method | Parameters | Returns | Description |
Parse(text [, delimiter]) | CSV string [, separator] | Array | Parse CSV string to 2D array |
Read(path [, delimiter]) | file path [, separator] | Array | Read CSV file to 2D array |
Write(path, data [, delimiter]) | path, 2D array [, separator] | — | Write 2D array to CSV file |
ToString(data [, delimiter]) | 2D array [, separator] | String | Convert 2D array to CSV string |
XML
Parse, create, and manipulate XML documents.
| Method | Parameters | Returns | Description |
ParseString(text) | XML string | XmlDocument | Parse XML string |
LoadFromFile(path) | file path | XmlDocument | Load XML from file |
Create(rootName) | root element name | XmlDocument | Create new XML document |
XmlDocument Object
| Method | Returns | Description |
.GetRootElement() | XmlElement | Get the root element |
.ToString() | String | Serialize to XML string |
.SaveToFile(path) | — | Save to file |
XmlElement Object
| Method/Property | Returns | Description |
.Name | String | Element tag name |
.TextContent | String | Text content |
.GetChildren() | Array | Get child elements |
.GetChildByName(name) | XmlElement | Find child by tag name |
.GetAttribute(name) | String | Get attribute value |
.SetAttribute(name, value) | — | Set attribute |
.SetTextContent(text) | — | Set text content |
.AddChild(element) | — | Append child element |
.RemoveChild(element) | — | Remove child element |
Database
SQLite database access.
| Method | Parameters | Returns | Description |
Open(path) | file path | Connection | Open or create a SQLite database |
InMemory() | — | Connection | Create in-memory database |
Connection Object
| Method | Parameters | Returns | Description |
.Execute(sql, params...) | SQL [, values] | Integer | Execute SQL, return affected rows |
.Query(sql, params...) | SQL [, values] | Array | Query and return rows as array of objects |
.Scalar(sql, params...) | SQL [, values] | Value | Return first column of first row |
.Close() | — | — | Close the connection |
.TableExists(name) | table name | Boolean | Check if table exists |
.LastInsertId() | — | Integer | Last inserted row ID |
.Changes() | — | Integer | Rows changed by last statement |
Storage
Persistent key-value storage (per project).
| Method | Parameters | Returns | Description |
Set(key, value) | key, value | — | Store a value |
Get(key) | key | Value | Retrieve a stored value |
Has(key) | key | Boolean | Check if key exists |
Remove(key) | key | — | Delete a stored value |
GetAll() | — | Object | Get all key-value pairs |
Clear() | — | — | Delete all stored values |
RegEx
Regular expression matching and manipulation.
| Method | Parameters | Returns | Description |
IsMatch(pattern, text) | pattern, text | Boolean | Test if text matches pattern |
Match(pattern, text) | pattern, text | Array | Return all matches |
Replace(pattern, text, replacement) | pattern, text, replacement | String | Replace matches |
Split(pattern, text) | pattern, text | Array | Split text by pattern |
Escape(text) | text | String | Escape special regex characters |
FileAndFolder
File system operations: read, write, copy, move, and browse files and folders.
Properties
| Property | Description |
HomeDirectory | User home directory |
TempDirectory | Temporary directory |
DesktopDirectory | Desktop path |
DocumentsDirectory | Documents path |
DownloadsDirectory | Downloads path |
CurrentDirectory | Current working directory |
Methods
| Method | Parameters | Returns | Description |
ReadFile(path) | path | String | Read entire file as text |
WriteFile(path, text) | path, content | — | Write text to file |
AppendLine(path, text) | path, line | — | Append a line to file |
FileExists(path) | path | Boolean | Check if file exists |
DeleteFile(path) | path | — | Delete a file |
CopyFile(src, dst) | source, destination | — | Copy a file |
MoveFile(src, dst) | source, destination | — | Move a file |
RenameFile(path, newName) | path, new name | — | Rename a file |
GetFileSize(path) | path | Integer | File size in bytes |
Open(path) | path | FileHandle | Open file for read/write |
CreateFolder(path) | path | — | Create directory |
DeleteFolder(path) | path | — | Delete directory |
FolderExists(path) | path | Boolean | Check if folder exists |
ListFiles(path) | directory path | Array | List files in directory |
ListFolders(path) | directory path | Array | List subdirectories |
ListAll(path) | directory path | Array | List all items |
GetFileName(path) | path | String | Extract file name |
GetExtension(path) | path | String | Extract file extension |
GetDirectory(path) | path | String | Extract parent directory |
Combine(path1, path2) | base, relative | String | Join paths |
ChooseFile([filter]) | [extension filter] | String | Show file picker dialog |
ChooseFolder() | — | String | Show folder picker dialog |
FileHandle Object
| Method/Property | Returns | Description |
.Path | String | File path |
.IsOpen | Boolean | Whether file is open |
.ReadAll() | String | Read entire file |
.ReadLine() | String | Read next line |
.Write(text) | — | Write text (overwrite) |
.Append(text) | — | Append text |
.Close() | — | Close the file |
Network
HTTP requests, TCP connections, and sessions.
| Method | Parameters | Returns | Description |
Get(url [, headers]) | URL [, Object] | Response | HTTP GET request |
Post(url, body [, headers]) | URL, body [, Object] | Response | HTTP POST request |
Put(url, body [, headers]) | URL, body [, Object] | Response | HTTP PUT request |
Delete(url [, headers]) | URL [, Object] | Response | HTTP DELETE request |
Download(url, path) | URL, file path | Boolean | Download file to disk |
Session() | — | Session | Create persistent session |
TCP.Connect(host, port [, timeout]) | host, port [, seconds] | TCPConnection | Open TCP connection |
Response Object
| Property | Type | Description |
.StatusCode | Integer | HTTP status code |
.Body | String | Response body |
.OK | Boolean | True if 200-299 |
.Headers | Object | Response headers |
Compression
Zip/unzip files and folders.
| Method | Parameters | Returns | Description |
ZipFolder(folder, zipPath) | source folder, output zip | Boolean | Compress a folder |
ZipFile(file, zipPath) | source file, output zip | Boolean | Compress a single file |
Unzip(zipPath, folder) | zip file, output folder | Boolean | Extract entire archive |
UnzipFile(zipPath, fileName, outPath) | zip, file name, output | Boolean | Extract single file |
ListArchiveContent(zipPath) | zip file | Array | List files in archive |
CompressBytes(data [, algo]) | string [, algorithm] | String | Compress data in memory |
DecompressBytes(data [, algo]) | string [, algorithm] | String | Decompress data in memory |
Email
Send and receive email via SMTP and IMAP.
| Method | Parameters | Returns | Description |
Send(to, subject, body [, from, html]) | to, subject, body [, from, html] | Boolean | Send email via SMTP |
Create() | — | Mail | Create composable email |
SMTP(host, port, user, pass) | credentials | SMTP | Create SMTP connection |
IMAP(host, port, user, pass) | credentials | IMAP | Create IMAP connection |
Mail Object
| Property/Method | Description |
.From, .To, .CC, .BCC | Address fields |
.Subject, .Body, .HTML | Content fields |
.AddAttachment(path) | Attach a file |
.Send() | Send the email |
Create native macOS windows and dialogs with controls.
| Method | Parameters | Returns | Description |
Window(title, width, height [, options]) | title, w, h [, Object] | FormWindow | Create a form window |
FormWindow Controls
All controls use unified signature: Add*(name, content, x, y, width [, options])
| Method | Content Type | Description |
.AddLabel() | String | Static text label |
.AddButton() | String | Clickable button |
.AddTextField() | String | Single-line text input |
.AddTextArea() | String | Multi-line text input |
.AddCheckBox() | String | Checkbox toggle |
.AddRadioButton() | String | Radio button |
.AddComboBox() | Array | Dropdown selection |
.AddListBox() | Array | Scrollable list |
.AddProgressBar() | Number | Progress indicator |
.AddSlider() | Number | Slider control |
.AddImageView() | String (path) | Image display |
.AddGroupBox() | String | Group container |
.AddSeparator(name, x, y, w) | — | Horizontal separator |
.AddTable() | 2D Array | Data table |
Window Methods
| Method | Returns | Description |
.Show() | Object | Show modal dialog, return all values |
.Open() | — | Open for event loop mode |
.WaitForEvent() | Object | Wait for next event |
.Close() | — | Close the window |
.GetControl(name) | Control | Get live control reference |
Chart
Create bar, line, pie, and scatter charts.
| Method | Parameters | Returns | Description |
Bar(labels, values) | Array, Array | ChartObject | Create bar chart |
Line(labels, values) | Array, Array | ChartObject | Create line chart |
Pie(labels, values) | Array, Array | ChartObject | Create pie chart |
Scatter(labels, values) | Array, Array | ChartObject | Create scatter chart |
ChartObject
| Property/Method | Description |
.Title | Chart title (read/write) |
.SetSize(w, h) | Set chart dimensions |
.SetColor(r, g, b) | Set chart color (RGB integers 0–255) |
.Show() | Display in a window |
.SaveToFile(path) | Save chart as PNG |
.ToPicture() | Convert to Picture object |
Graphics
Create and manipulate images with drawing operations.
| Method | Parameters | Returns | Description |
CreatePicture(width, height) | width, height | Picture | Create a blank image |
Picture Object
| Method | Parameters | Description |
.DrawRectangle(x, y, w, h) | x, y, width, height | Draw rectangle outline |
.FillRectangle(x, y, w, h) | x, y, width, height | Fill rectangle |
.DrawEllipse(x, y, w, h) | x, y, width, height | Draw ellipse outline |
.FillEllipse(x, y, w, h) | x, y, width, height | Fill ellipse |
.DrawLine(x1, y1, x2, y2) | start x/y, end x/y | Draw a line |
.DrawText(text, x, y) | text, x, y | Draw text |
.DrawPicture(pic, x, y) | picture, x, y | Overlay another picture |
.SetColor(color) | Color or r,g,b | Set stroke color |
.SetFillColor(color) | Color or r,g,b | Set fill color |
.SetLineWidth(w) | width | Set line thickness |
.SetFont(name, size) | font name, size | Set text font |
.SaveToFile(path) | file path | Save as PNG |
.ToPicture() | — | Get as Picture value |
.DetectText([lang]) | [language] | Detect text via Vision (AI) |
.DetectObjects() | — | Detect objects via Vision (AI) |
.DetectFaces() | — | Detect faces via Vision (AI) |
Screen
Screen information, mouse position, and screenshots.
| Method | Parameters | Returns | Description |
Width() | — | Integer | Main screen width |
Height() | — | Integer | Main screen height |
ScaleFactor() | — | Double | Retina scale factor |
DarkMode() | — | Boolean | Is dark mode active |
Displays() | — | Array | All connected displays |
MouseX() | — | Integer | Mouse X position |
MouseY() | — | Integer | Mouse Y position |
Screenshot() | — | Picture | Capture entire screen |
ScreenshotRegion(x, y, w, h) | x, y, w, h | Picture | Capture screen region |
ScreenshotToFile(path) | file path | Boolean | Save screenshot to file |
PixelColor(x, y) | x, y | Color | Get pixel color |
PDF
Create and manipulate PDF documents.
| Method | Parameters | Returns | Description |
Create([width, height]) | [w, h] | PDF | Create new PDF |
Open(path) | file path | PDF | Open existing PDF |
PDF Object
| Method | Parameters | Description |
.AddPage([w, h]) | [width, height] | Add a new page |
.SetFont(name, size) | font, size | Set text font |
.DrawText(x, y, text) | x, y, text | Draw text on page |
.SaveToFile(path) | path | Save PDF to file |
.AddPageNumbers([format]) | [format] | Add page numbers |
QRCode
Generate and read QR codes.
| Method | Parameters | Returns | Description |
Generate(text [, size]) | content [, pixel size] | Picture | Generate QR code image |
Read(picture) | picture | String | Read QR code from Picture object |
Translate
Text translation using Apple Translation or MyMemory API.
| Method | Parameters | Returns | Description |
Text(text, targetLang [, sourceLang]) | text, target lang [, source lang] | String | Translate text (source language is optional) |
DetectLanguage(text) | text | String | Detect language of text |
DetectLanguages(text [, count]) | text [, max results] | Array | Detect multiple possible languages |
Encoding
Base64, hex, URL encoding, and number base conversions.
| Method | Parameters | Returns | Description |
Base64Encode(text) | text | String | Encode to Base64 |
Base64Decode(text) | Base64 string | String | Decode from Base64 |
HexEncode(text) | text | String | Encode to hex |
HexDecode(text) | hex string | String | Decode from hex |
URLEncode(text) | text | String | URL-encode text |
URLDecode(text) | encoded text | String | URL-decode text |
HTMLEscape(text) | text | String | Escape HTML entities |
HTMLUnescape(text) | text | String | Unescape HTML entities |
ToBinary(n) | integer | String | Convert to binary string |
FromBinary(text) | binary string | Integer | Parse binary string |
ToOctal(n) | integer | String | Convert to octal |
FromOctal(text) | octal string | Integer | Parse octal string |
ToHex(n) | integer | String | Convert to hex |
FromHex(text) | hex string | Integer | Parse hex string |
ToBase(n, base) | number, base | String | Convert to arbitrary base |
FromBase(text, base) | string, base | Integer | Parse from arbitrary base |
Char(code) | ASCII code | String | Character from code point |
ASCII(char) | character | Integer | Code point of character |
Speech
Text-to-speech using the system voice.
| Method | Parameters | Returns | Description |
Say(text [, voice]) | text [, voice name] | — | Speak text aloud |
GetVoices() | — | Array | List available voices |
SetVoice(name) | voice name | — | Set default voice |
SetRate(rate) | speed (0–300) | — | Set speech rate |
Stop() | — | — | Stop speaking |
Clipboard
System clipboard access.
| Method | Parameters | Returns | Description |
GetText() | — | String | Read clipboard text |
SetText(text) | text | — | Copy text to clipboard |
HasText() | — | Boolean | Check if clipboard has text |
Clear() | — | — | Clear clipboard |
DateAndTime
Date and time creation, formatting, and arithmetic.
| Method | Parameters | Returns | Description |
Now() | — | Date | Current date and time |
Today() | — | Date | Today at midnight |
Timestamp() | — | Integer | Unix timestamp (seconds) |
TimestampMillis() | — | Integer | Unix timestamp (milliseconds) |
Create(y, m, d [, h, min, s]) | year, month, day [, ...] | Date | Create specific date |
Parse(text, format) | string, format | Date | Parse date from string |
DaysBetween(d1, d2) | date, date | Integer | Days between two dates |
SecondsBetween(d1, d2) | date, date | Integer | Seconds between two dates |
IsLeapYear(year) | year | Boolean | Check if leap year |
DaysInMonth(year, month) | year, month | Integer | Days in given month |
Date Object
| Property/Method | Type | Description |
.Year, .Month, .Day | Integer | Date components |
.Hour, .Minute, .Second | Integer | Time components |
.DayOfWeek | Integer | Day of week (1=Sun) |
.DayOfWeekName | String | Day name (e.g. "Monday") |
.MonthName | String | Month name (e.g. "January") |
.AddDays(n) | Date | Add days |
.AddHours(n) | Date | Add hours |
.AddMinutes(n) | Date | Add minutes |
.AddMonths(n) | Date | Add months |
.AddYears(n) | Date | Add years |
.Format(fmt) | String | Format as string (e.g. "yyyy-MM-dd") |
.ToString() | String | Default string representation |
Calendar
Access macOS Calendar events and Reminders.
| Method | Parameters | Returns | Description |
Today() | — | Array | Today's events |
Events(from, to) | start date, end date | Array | Events in date range |
NextEvent() | — | Event | Next upcoming event |
Busy(date) | date | Boolean | Check if date has events |
CreateEvent(options) | Object | Event | Create a calendar event |
DeleteEvent(event) | event | Boolean | Delete an event |
List() | — | Array | List all calendars |
Reminders() | — | Array | Get all reminders |
CreateReminder(options) | Object | Reminder | Create a reminder |
Crypto
Cryptographic hashing, HMAC, and encryption.
| Method | Parameters | Returns | Description |
SHA256(text) | text | String | SHA-256 hash |
SHA384(text) | text | String | SHA-384 hash |
SHA512(text) | text | String | SHA-512 hash |
HMAC_SHA256(text, key) | text, key | String | HMAC-SHA256 |
HMAC_SHA512(text, key) | text, key | String | HMAC-SHA512 |
VerifyHMAC(text, key, hash) | text, key, expected | Boolean | Verify HMAC |
GenerateKey() | — | String | Generate AES-GCM key |
Encrypt(text, key) | plaintext, key | String | AES-GCM encrypt |
Decrypt(text, key) | ciphertext, key | String | AES-GCM decrypt |
EncryptChaCha(text, key) | plaintext, key | String | ChaCha20-Poly1305 encrypt |
DecryptChaCha(text, key) | ciphertext, key | String | ChaCha20-Poly1305 decrypt |
RandomToken(length) | byte length | String | Random hex token |
HashFile(path) | file path | String | SHA-256 hash of file |
AI
AI text generation via Apple Intelligence, Claude, Google, or OpenAI.
| Method | Parameters | Returns | Description |
Apple() | — | AppleAI | Apple Intelligence (on-device) |
Claude([apiKey [, model]]) | [key, model] | ClaudeAI | Anthropic Claude |
Google([apiKey [, model]]) | [key, model] | GoogleAI | Google Gemini |
OpenAI([apiKey [, model]]) | [key, model] | OpenAI | OpenAI GPT |
AI Provider Object
| Method | Parameters | Returns | Description |
.Generate(prompt) | prompt text | String | Generate text |
.GenerateWith(system, prompt) | system prompt, user prompt | String | Generate with system instruction |
.Summarize(text) | text | String | Summarize text |
.Translate(text, lang) | text, target language | String | Translate text |
.IsAvailable() | — | Boolean | Check availability (Apple only) |
Audio
Audio playback and recording.
| Method | Parameters | Returns | Description |
LoadSound(path) | file path | AudioPlayer | Load audio file |
StartRecording(path) | output path | AudioRecorder | Start recording audio |
AudioPlayer Object
| Method/Property | Description |
.Play() | Start playback |
.Pause() | Pause playback |
.Resume() | Resume playback |
.Stop() | Stop playback |
.Seek(seconds) | Seek to position |
.SetVolume(level) | Set volume (0.0–1.0) |
.SetLooping(bool) | Enable/disable looping |
.GetDuration() | Get total duration |
.GetPosition() | Get current position |
.Release() | Release resources |
.IsPlaying | Whether currently playing |
.Duration | Total duration in seconds |
Synth
Synthesizer for generating tones and sounds.
| Method | Parameters | Returns | Description |
PlayNote(freq [, duration]) | frequency [, seconds] | — | Play a single note |
PlaySequence(notes, duration) | freq array, seconds | — | Play a sequence of notes |
SweepUp(startHz, endHz, duration) | start freq, end freq, seconds | — | Play ascending frequency sweep |
SweepDown(startHz, endHz, duration) | start freq, end freq, seconds | — | Play descending frequency sweep |
Noise(duration) | seconds | — | Play white noise |
Stop() | — | — | Stop all playback |
SetVolume(level) | volume (0.0–1.0) | — | Set output volume |
SetAttack(seconds) | seconds | — | Set attack time |
SetDecay(seconds) | seconds | — | Set decay time |
SetSustain(level) | level (0.0–1.0) | — | Set sustain level |
SetRelease(seconds) | seconds | — | Set release time |
Notification
macOS system notifications.
| Method | Parameters | Returns | Description |
Send(title, message [, sound]) | title, body [, sound name] | — | Show system notification |
SendWithSubtitle(title, subtitle, msg) | title, subtitle, body | — | Notification with subtitle |
Hardware
System hardware information.
| Method | Parameters | Returns | Description |
CPU() | — | Object | CPU info (Model, Cores, PhysicalCores) |
Memory() | — | Object | RAM info (Total, Available, Used, Pressure) |
Battery() | — | Object | Battery (Level, IsCharging, PowerSource, CycleCount) |
Disk() | — | Object | Boot disk (Total, Free, Used) |
DiskFor(path) | path | Object | Disk info for path |
Uptime() | — | Integer | System uptime in seconds |
ThermalState() | — | String | Thermal state (Nominal/Fair/Serious/Critical) |
MacModel() | — | String | Mac model identifier |
Displays() | — | Array | Connected displays |
Bluetooth
Bluetooth Low Energy (BLE) device scanning and communication.
| Method | Parameters | Returns | Description |
IsAvailable() | — | Boolean | Check if Bluetooth is on |
Scan(seconds) | duration | Array | Scan for BLE devices |
Connect(device) | device object | Connection | Connect to device |
Disconnect(connection) | connection | Boolean | Disconnect from device |
Connection Object
| Method | Parameters | Description |
.Discover() | — | Discover services & characteristics |
.Read(serviceUUID, charUUID) | UUIDs | Read characteristic value (hex) |
.Write(serviceUUID, charUUID, hex) | UUIDs, hex data | Write to characteristic |
.Disconnect() | — | Disconnect |
Location
GPS location and geocoding.
| Method | Parameters | Returns | Description |
Current() | — | Location | Get current GPS location |
SearchAddress(address) | address string | Location | Geocode address to coordinates |
SearchCoordinates(lat, lon) | lat, lon | Location | Reverse geocode |
DistanceBetween(lat1, lon1, lat2, lon2) | coords | Double | Distance in meters |
BearingBetween(lat1, lon1, lat2, lon2) | coords | Double | Bearing in degrees |
Access macOS Contacts.
| Method | Parameters | Returns | Description |
Search(query) | search text | Array | Search contacts by name |
SearchByEmail(email) | email | Array | Find by email |
SearchByPhone(phone) | phone | Array | Find by phone |
All() | — | Array | Get all contacts |
Count() | — | Integer | Total number of contacts |
Create(firstName, lastName) | first, last | Contact | Create a new contact |
Groups() | — | Array | List contact groups |
VCard(contact) | contact | String | Export as vCard |
Color
Color creation and manipulation.
Preset Colors
Color.Red, Color.Green, Color.Blue, Color.White, Color.Black, Color.Yellow, Color.Orange, Color.Purple, Color.Cyan, Color.Magenta, Color.Gray, Color.Pink, Color.Brown, Color.Gold, Color.Silver, Color.Navy, Color.Teal, Color.Coral
Methods
| Method | Parameters | Returns | Description |
RGB(r, g, b) | 0–255 each | Color | Create from RGB |
RGBA(r, g, b, a) | 0–255, alpha 0–1 | Color | Create from RGBA |
Hex(hex) | hex string | Color | Create from hex (e.g. "#FF0000") |
HSL(h, s, l) | hue, saturation, lightness | Color | Create from HSL |
Mix(c1, c2) | color, color | Color | Mix two colors |
Lighten(color, amount) | color, 0–1 | Color | Lighten a color |
Darken(color, amount) | color, 0–1 | Color | Darken a color |
Shell
Execute system commands.
| Method | Parameters | Returns | Description |
Execute(command) | command string | Object | Run shell command; returns {Output, ErrorOutput, ExitCode} |