def gatherWindows(off = 25):
    tlc = [0,0]
    for win in pm.lsUI(type="window"): # loops thru all windows other than
"main"
        if pm.window(win, ex =1):
            if pm.window(win, q=1,mw=1):
                tlc = pm.window(win, q=1,tlc=1)

    for x,win in enumerate(pm.lsUI(type="window")):
        if not re.match("MayaWindow",str(win)):
            pm.window(win, e=1, tlc=[tlc[0] + off, tlc[1] + off]) # tlc =
topLeftCorner
            off = off + 25


that's a small util I wrote to deal with windows appearing off screen.

you can easily query by using pm.windows(winName, q=1, tlc=1)
that will return in a list or tupple (not sure which) the top edge and the
left side positions.



On Mon, Jan 12, 2015 at 3:27 AM, miarmy <[email protected]> wrote:

> hi....
> how quary position of a window?
> #example:
> mc.window('test')
> mc.showWindow()
> now how quary position of test window in screen?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/bfbf2eb1-ea97-49d4-8bff-bbfc5652d255%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/bfbf2eb1-ea97-49d4-8bff-bbfc5652d255%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Todd Widup
Creature TD / Technical Artist
[email protected]
[email protected]
www.toddwidup.com

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CABBPk36K18S4xrKyauNnhNWqAS50V5NSs5rJy5woG5Ej1%2B2WPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to