zhuyuan-ice-gl-zy001/.tmp_axprobe/axon.swift

6 lines
271 B
Swift
Raw Permalink Normal View History

2026-08-20 00:01:53 +08:00
import Cocoa
let pid = pid_t(CommandLine.arguments[1])!
let app = AXUIElementCreateApplication(pid)
let t: CFTypeRef = kCFBooleanTrue!
let r = AXUIElementSetAttributeValue(app, "AXEnhancedUserInterface" as CFString, t)
print("set AXEnhancedUserInterface: \(r.rawValue)")