G’day scripters
I’ve spent all day on this, without luck.
My app has three windows in the MainMenu.xib, and I’m trying to activate the smallest third window on startup, which contains a single field , which offers advice when setting the Security & Privacy Accessibility.
Everything I’ve tried won’t open the window, which briefly flickers on startup. I’ve stripped my apps Properties to the bare essentials, commented out unnecessary code, and tried to open the window at the start, after on applicationWillFinishLaunching:aNotification, instead of in a handler, but it just refuses to open.
It’s visible is bound to a property, my displayAssistiveDevicesAdviceWindow, and the window itself is bound to a property, windowAssistiveAccess, but even trying ’set visible of windowAssistiveAccess to true’ doesn’t work.
The actual setting of the Accessibility is done in another script, OAS. I’ve tried opening the window in the AppDelegate and OAS.
Am I overlooking something obvious? Is my procedure correct, please?
Regards
Santa
property windowMainMM : missing value property windowSetUpMM : missing value property windowAssistiveAccess : missing value property displayMainMailManagerWindow : true property displaySetupMailManagerWindow : false property displayAssistiveDevicesAdviceWindow : false on turnOnAssistiveDevices:(theFlag) try set p to 1 set temp1 to my displayMainMailManagerWindow set p to 2 set temp2 to my displaySetupMailManagerWindow set p to 3 set my displayMainMailManagerWindow to false # turns OFF window 1 set p to 4 set my displaySetupMailManagerWindow to false # turns OFF window 2 set p to 5 set my displayAssistiveDevicesAdviceWindow to true # flag to set visible of advice window to ON set p to 6 set p to 9 windowAssistiveAccess's makeKeyAndOrderFront:me set p to 10 windowAssistiveAccess's display() tell current application to delay 10 OAS's turnOnAssistiveDevices:{windowMainMM, windowSetUpMM, theFlag, displayMainMailManagerwindow, displaySetupMailManagerWindow, windowAssistiveAccess, fieldAssistiveAccessAdvice, displayAssistiveDevicesAdviceWindow, voiceSetter} set p to 11 set {displayAssistiveDevicesAdviceWindow, displayMainMailManagerwindow, displaySetupMailManagerWindow} to OAS's returnAssistiveFlags set p to 12 set my displayAssistiveDevicesAdviceWindow to false set p to 13 windowAssistiveAccess's orderOut:me set p to 14 set my displayMainMailManagerWindow to temp1 set p to 15 set my displaySetupMailManagerWindow to temp2 on error errmsg display dialog "turnOnAssistiveDevices AppDelegate error " & errmsg & return & "p = " & p end try end turnOnAssistiveDevices:
|