cp.tools.camelCase(str) -> string
cp.tools.centre(frame) -> hs.geometry point
hs.geometry
rectcp.tools.cleanupButtonText(value) -> string
cp.tools.contentsInsideBrackets(value) -> string | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Gets the contents of any text inside the first bracket set. | | Parameters |nil
cp.tools.convertSingleHexStringToDecimalString(hex) -> string
cp.tools.dirFiles(path) -> table
nil
followed by the error message if an error occurs.cp.tools.doesDirectoryExist(path) -> boolean
true
if the directory exists otherwise false
cp.tools.doesFileExist(path) -> boolean
true
if the file exists otherwise false
cp.tools.doubleLeftClick(point[, delay]) -> none
cp.tools.endsWith(str, ending) -> boolean
str
has the same ending as ending
.cp.tools.ensureDirectoryExists(rootPath, ...) -> string | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Ensures all steps on a provided path exist. If not, attempts to create them. | | Parameters |rootPath
- The root path...
- The list of path steps to createnil
if unable to create the directory for some reason.cp.tools.exactMatch(value, pattern, plain) -> boolean
false
.true
if there's an exact match, otherwise false
.cp.tools.executeWithAdministratorPrivileges(input[, stopOnError]) -> boolean or string
true
if successful, false
if cancelled and a string if there's an error.cp.tools.findCommonWordWithinTwoStrings(a, b) -> string
nil
if something goes wrong.cp.tools.firstToUpper(str) -> string
cp.tools.getEmail() -> string
cp.tools.getExternalDevices() -> string
cp.tools.getFileExtensionFromPath(input) -> string
cp.tools.getFilenameFromPath(input[, removeExtension]) -> string
true
if the file extension should be removedcp.tools.getFullname() -> string
cp.tools.getKeysSortedByValue(tbl, sortFunction) -> table
cp.tools.getmacOSVersion() -> string
cp.tools.getModelName() -> string
cp.tools.getRAMSize() -> string
cp.tools.getScreenshotsAsBase64() -> table
cp.tools.getThunderboltDevices() -> string
cp.tools.getUSBDevices() -> string
cp.tools.getVRAMSize() -> string
cp.tools.hexStringToString(value) -> string
cp.tools.iconFallback(paths) -> string
cp.tools.incrementFilename(value) -> string
cp.tools.incrementFilenameInPath(path) -> string
cp.tools.isNumberString(value) -> boolean
true
if value is a number string, otherwise false
.cp.tools.isOffScreen(rect) -> boolean
true
if offscreen otherwise false
cp.tools.leftClick(point[, delay, clickNumber]) -> none
cp.tools.lines(string) -> table | nil
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Splits a string containing multiple lines of text into a table. | | Parameters |nil
if the parameter is not a string.cp.tools.lower(str) -> string
cp.tools.macOSVersion() -> string
cp.tools.mergeTable(target, ...) -> table
cp.tools.ninjaDoubleClick(point[, delay]) -> none
cp.tools.ninjaMouseAction(point, fn) -> none
cp.tools.ninjaMouseClick(point[, delay]) -> none
cp.tools.ninjaRightMouseClick(point[, delay]) -> none
cp.tools.numberToWord(number) -> string
cp.tools.optionPressed() -> boolean