Jump to content
Sign in to follow this  
dog08

Getting the position of child

Recommended Posts

dog08

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.

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
Share on other sites
Swift

$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

Share this post


Link to post
Share on other sites
dog08

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

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
Share on other sites
dog08

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..

Share this post


Link to post
Share on other sites
SmOke_N

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.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×