Current glyph window size and position
bahman last edited by gferreira
I want to make my script window appear in the center of the current active window. I searched in the docs but didn't found anything useful. Is there any way to do this?
I don't fully understand why but here is a script that is changing the size and position of the current window to the previous current window
from AppKit import NSApp # get all ordered windows windows = NSApp().orderedWindows() # get the size of the window (x, y), (w, h) = windows.frame() # set the size of the window windows.setFrame_display_animate_(((x, y), (w, h)), True, False)