Table of Contents

Constructor MaaMacOSController

Namespace
MaaFramework.Binding
Assembly
MaaFramework.Binding.Native.dll

MaaMacOSController(uint, MacOSScreencapMethod, MacOSInputMethod, LinkOption, CheckStatusOption)

Creates a MaaFramework.Binding.MaaMacOSController instance.

public MaaMacOSController(uint windowId, MacOSScreencapMethod screencapMethod, MacOSInputMethod inputMethod, LinkOption link = LinkOption.Start, CheckStatusOption check = CheckStatusOption.ThrowIfNotSucceeded)

Parameters

windowId uint

The CGWindowID of the target window (0 for desktop).

screencapMethod MacOSScreencapMethod

The macOS screencap method.

inputMethod MacOSInputMethod

The macOS input method.

link LinkOption

Executes MaaFramework.Binding.IMaaController.LinkStart if MaaFramework.Binding.LinkOption.Start; otherwise, not link.

check CheckStatusOption

Checks LinkStart().Wait() status if MaaFramework.Binding.CheckStatusOption.ThrowIfNotSucceeded; otherwise, not check.

Remarks

Wrapper of MaaFramework.Binding.Interop.Native.MaaController.MaaMacOSControllerCreate(System.UInt32,System.UInt64,System.UInt64).

This controller is designed for native macOS applications.

Requires Screen Recording permission for screencap.

Input simulation requires Accessibility permission.

Some features are not supported: start_app, stop_app, scroll.

Only single touch is supported (contact must be 0).

Exceptions

MaaJobStatusException