Env

Environment Variables

Static Methods
macroX
static number macroX()

Return the horizontal value in macro dimension

Return
number The horizontal value in macro dimension
setMacroX
static void setMacroX(value: number)

Set the horizontal value in macro dimension

Parameters
value The horizontal value in macro dimension
macroY
static number macroY()

Return the vertical value in macro dimension

Return
number The vertical value in macro dimension
setMacroY
static void setMacroY(value: number)

Set the vertical value in macro dimension

Parameters
value The vertical value in macro dimension
deviceX
static number deviceX()

Return the horizontal value in device dimension

Return
number The horizontal value in device dimension
deviceY
static number deviceY()

Return the vertical value in device dimension

Return
number The vertical value in device dimension
deviceW
static number deviceW()

Return the width of the device

Return
number The width of the device
deviceH
static number deviceH()

Return the height of the device

Return
number The height of the device
scale
static void scale()

Get the current scaling factor that the app is using. Change to macroX or macroY will cause this value to be recalculated

setScale
static void setScale(value: number)

Set the scaling factor

Parameters
value The scaling factor
setCompareWidth
static void setCompareWidth(value: number)

Set the compare width for image detection

Parameters
value The compare width
isDebug
static bool isDebug()

Check if debug is enabled

Return
bool true in Edit Mode and if the user enabled "debug" in Play Mode. false otherwise
setDebug
static void setDebug(value: bool)

Set whether debug should be on or off

Parameters
value true to turn on debug
setMessageDone
static void setMessageDone(message: string)

Set additional message to show when the macro is done (end naturally when reached the last statement)

Parameters
message message to show
setMessageStop
static void setMessageStop(message: string)

Set additional message to show when the macro is stopped (user presses stop or Sys.stop())

Parameters
message message to show
setMessageError
static void setMessageError(message: string)

Set additional message to show when the macro is errored (any error including Sys.err())

Parameters
message message to show
setMacroCutouts
static void setMacroCutouts(left: number | [number, number, number, number], top: number, right: number, bottom: number)

Set the cutouts in macro dimension. Usually this is your device cutouts

Parameters
left The left cutout or array of all cutouts
top The top cutout
right The right cutout
bottom The bottom cutout
setDeviceCutouts
static void setDeviceCutouts(left: number | [number, number, number, number], top: number, right: number, bottom: number)

Set the cutouts in device dimension. This is the cutouts of currently running device. You can use Sys.info("screen.cutouts") or provide your own values

Parameters
left The left cutout or array of all cutouts
top The top cutout
right The right cutout
bottom The bottom cutout
cutouts (Deprecated)
static array cutouts()

Return the cut out size of the current device (status bar, navigation buttons, etc...)

(Deprecated) Please use Sys.info("screen.cutouts") instead

Return
array Array with 4 elements: left, top, right, bottom

© 2024 - Macrorify by KoK-CODE