Jump to content

Recommended Posts

Posted

I have many childs so I used arrays to identify which is which because there are many childs that are exactly the same. How do I get the position of these child windows, because I can't do their gui name because there may be like 10 of them so I have to use an array.

  • Moderators
Posted

I have many childs so I used arrays to identify which is which because there are many childs that are exactly the same. How do I get the position of these child windows, because I can't do their gui name because there may be like 10 of them so I have to use an array.

The array holds the childs handle, just use WinGetPos($aChild[n])

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted (edited)

$Pos = WinGetPos($Child[4])

Msgbox(0, "", $Pos[0]&@CRLF&$Pos[1]&@CRLF&$Pos[2]&@CRLF&$Pos[3])

;)

EDIT: Smoke_N! Why you beating me to everything :)

Edited by Swift
  • Moderators
Posted

Ok, and is there a way to get the position of the child window before it's parent is moved?

How would you expect to know "when" someone is going to move a window?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Well I'm not sure. Don't think there is a way but there has to be a workaround. I can get it's position after the parent is moved but I need to get its previous position so after the parents moved (since the child automatically goes with it) I can move the child back so it's like the parent moved but the child never did.

I hope I'm getting across to everyone, if I'm not please don't ridicule me.

Ask if you need more information..

  • Moderators
Posted

Well I'm not sure. Don't think there is a way but there has to be a workaround. I can get it's position after the parent is moved but I need to get its previous position so after the parents moved (since the child automatically goes with it) I can move the child back so it's like the parent moved but the child never did.

I hope I'm getting across to everyone, if I'm not please don't ridicule me.

Ask if you need more information..

The beauty of this, is you've got me on my toes a bit more than usual Firelord...

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...