I found a code which work for me to change properties on different windows.
var value: AnyObject?
let result = AXUIElementCopyAttributeValue(appRef, kAXWindowsAttribute as CFString, &value)
if result != .success {
printAXError(error: result)
}
if let windowList = value as? [AXUIElement] {
print ("windowList #\(windowList)")
if windowList.first != nil {
var position : CFTypeRef
var size : CFTypeRef
var newPoint = CGPoint(x: 0, y: 0)
var newSize = CGSize(width: 300, height: 800)
position = AXValueCreate(AXValueType(rawValue: kAXValueCGPointType)!,&newPoint)!;
AXUIElementSetAttributeValue(windowList.first!, kAXPositionAttribute as CFString, position);
size = AXValueCreate(AXValueType(rawValue: kAXValueCGSizeType)!,&newSize)!;
AXUIElementSetAttributeValue(windowList.first!, kAXSizeAttribute as CFString, size);
}
}
Bit I didn't find an kAXsomethingn for changing the alpha value.
I'd like to be able to change the transparency of alle windows. Tools like Yabai and AFloat(X) can do, but they require SIP to be disabled.
It it possible using Accessible Elements?
Kind regards, Micha