Skip to main content

Region:setAutoScale()

Scale this region's coordinates to the current screen, or stop scaling them.

Signature​

setAutoScale(enabled: boolean): Region

Parameters​

ParameterTypeDescription
enabledbooleantrue scales coordinates; false uses them as-is

Returns

Region, so calls can chain.

Description​

Overrides the macro-wide Settings:setAutoScale() for this region only. Useful when one region was recorded on a different resolution but the rest of the macro should keep the global setting. The change applies to later calls on this object.

Example​

local area = Region(0, 0, 1920, 1080):setAutoScale(true)
area:click("button.png")

Compatible Version: 1.0.0.37 and up