Syntax
Recipes are written in a lightweight version JavaScript with Magnetron specific functions. The following functions are available.
Allowed Folders
App interaction
Array
- concatArray
- contains
- copywithinArray
- fillArray
- indexOf
- join
- lastindexofArray
- push
- remove
- reverseArray
- sortArray
- splice
Called functions
Command
Custom Dialog
File operations
- appendFile
- chmod
- copyFile
- deleteFile
- fileExists
- fileWritable
- findFile
- getFileBytes
- getFileSHA256
- getPathInfo
- readFile
- readFileBase64
- renameFile
- revealPath
- writeFile
- writeFileBase64
File Dialogs
File List
- getFileIcon
- getFileIconColor
- getFileProperty
- getFiles
- getFileStatus
- getFileTooltip
- removeFileIcon
- removeFileIconColor
- removeFileProperty
- removeFileStatus
- removeFileTooltip
- setFileIcon
- setFileIconColor
- setFileProperty
- setFiles
- setFileStatus
- setFileTooltip
Folder operations
Global
- clone
- dump
- getObjectKey
- getObjectKeyIndex
- getObjectSize
- getObjectValue
- mergeObject
- parseFloat
- parseInt
- removeProperty
- setObjectKey
- setObjectValue
- sleepMs
- stringify
Global Variables
Level file operations (Loudness)
Math
- abs
- acos
- acosh
- asin
- asinh
- atan
- atanh
- ceil
- cos
- cosh
- E
- exp
- floor
- LN2
- LN10
- log
- log10
- LOG10E
- LOG2E
- max
- min
- PI
- pow
- randInt
- random
- range
- round
- sign
- sin
- sinh
- sqr
- sqrt
- SQRT1_2
- SQRT2
- tan
- tanh
- toDegrees
- toRadians
Memory cache items
Methods and Operators
Online
RegEx
String Manipulation
- addUnicodeEscapeChars
- bytesToDescription
- charAt
- charCodeAt
- compareIgnoreCaseString
- containsString
- dropLastCharsString
- endsWithIgnoreCaseString
- endsWithString
- equalsIgnoreCaseString
- findSubString
- findSubStringBTF
- fromCharCode
- getLastCharFromString
- getStringTokens
- hashCodeOfString
- isQuotedString
- objectToString
- paddedLeftString
- paddedRightString
- quotedString
- replaceInString
- split
- startsWithIgnoreCaseString
- startsWithString
- stringContainsNonWhitespaceChars
- stringToObject
- substring
- toFixed
- toHexString
- toLowerCase
- toUpperCase
- trimEndString
- trimStartString
- trimString
- unquotedString
Time
- epochToFormatted
- epochToISO8601
- getApproximateTimeDescription
- getCurrentEpoch
- getTimeComponents
- getTimeDescription
- ISO8601ToEpoch