Sign in to follow this  
Followers 0
=sinister=

Retreiving GUI Control's X and Y Position

18 posts in this topic

I'm dealing with over 70 GUI Picture Controls and I need a way to retrieve their X and Y position without typing it all out again, is this possible? I know in C# you can do the object's name and then .x or .y (I think). Like if the object was contorl1 you could do contorl1.x or control1.y.

Share this post


Link to post
Share on other sites



You have really been here for almost 4 years and never heard of WinGetPos()? Thats amazing.... :P

He means x and y of a specific control, not the window.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Maybe you should just be quiet when you don't know what you are talking about.

I'm dealing with over 70 GUI Picture Controls and I need a way to retrieve their X and Y position without typing it all out again, is this possible? I know in C# you can do the object's name and then .x or .y (I think). Like if the object was contorl1 you could do contorl1.x or control1.y.

You've been here for almost 2 years and don't know the difference between a control and a window?

...

Edited by =sinister=

Share this post


Link to post
Share on other sites

Well I specifically stated a GUI'S CONTROL. Meaning a WINDOWS control NOT the window itself. Not only is this in the title, but I stated which specific control of the GUI I needed the position of.

Share this post


Link to post
Share on other sites

Maybe you should just be quiet when you don't know what you are talking about.

@ AdmiralAlkex

someone posts for help and all you can do is make fun of him? tisk tisk

@ =sinister=

you need to explain it better

so do you want to get the position of the ctrls?


0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Share this post


Link to post
Share on other sites

corgano,

Thanks for the reply. I'm not sure how to explain it more, I need the position of the controls, yes. Similar to WinGetPos(), only for a GUI control.

Share this post


Link to post
Share on other sites

corgano,

Thanks for the reply. I'm not sure how to explain it more, I need the position of the controls, yes. Similar to WinGetPos(), only for a GUI control.

i will look into it


0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

I only have 2 things to say.

  • You all three need to check the definition for a control. Read HERE.

    A control is a child window

  • What's so wrong with ControlGetPos() then? Too long word for you ******** to write?

You have all been real asses here, I have given you what you requested and you all treat me like dirt :P you should all be ashamed!

Edit: removed a bad word :unsure:

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Listen bro, I wasn't accusing you of not knowing the definition of a control, you accused me of not knowing what WinGetPos() was, which had nothing to do with what I requested, and i simply stated that I wasn't asking for a window. Sorry if it sounded a little harsh, I appologize. And yes ControlGetPos() is exactly what I was looking for, thanks.

Edited by =sinister=

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Listen bro, I wasn't accusing you of not knowing the definition of a control, you accused me of not knowing what WinGetPos() was, which had nothing to do with what I requested, and i simply stated that I wasn't asking for a window. Sorry if it sounded a little harsh, I appologize. And yes ControlGetPos() is exactly what I was looking for, thanks.

But is has to do with what you requested since WinGetPos() WILL WORK for for getting controls positions!! The only real difference is that WinGetPos() will get screen coordinated and ControlGetPos() will get client coordinates, but you never said which one of them you wanted!

Edit: Besides, I accused you of not knowing WinGetPos() existed, not that you didn't know what it did. My purpose with that wasn't to attack you but to ask a simple question, and give you a hint at a possible solution.

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

Hmm i'm interested now, how does WinGetPos() work with controls when it accepts parameters of a title and text?

Share this post


Link to post
Share on other sites

Pass it the handle, like this post from a couple of days ago

ControlGetPos ( "title", "text", controlID )

look for it in the help file


0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Share this post


Link to post
Share on other sites

Maybe you should just be quiet when you don't know what you are talking about.

Geez, sorry! I didn't know you could get control coordinates by using WinGetPos(), and I'm pretty sure many of us here didn't either, since the function was written to get window coordinates [Hence the "Win."]

Share this post


Link to post
Share on other sites

ControlGetPos ( "title", "text", controlID )

look for it in the help file

You are 5 posts to late :unsure: besides, and yes I will say this again, WinGetPos() will work. What should be used is depend on what sort of coordinates you need and how the rest of the script looks like (and the op never told us any of them)

Geez, sorry! I didn't know you could get control coordinates by using WinGetPos(), and I'm pretty sure many of us here didn't either, since the function was written to get window coordinates [Hence the "Win."]

How many times do I need to repeat myself? Controls are windows and hence you should have taken it for granted that WinGetPos() works.

My suggestion to you both is to stay out of this discussion, it is obvious neither of you has a good understanding of how controls and windows work in Windows. Or maybe I should have said, it is obvious you don't know how windows and windows work in Windows :P

(and congano, repeating what someone else said 20 minutes ago is really lame)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0