Jump to content

Retreiving GUI Control's X and Y Position


Recommended Posts

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.

Link to comment
Share on other sites

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=
Link to comment
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

Link to comment
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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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=
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Pass it the handle, like this post from a couple of days ago
Link to comment
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

Link to comment
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."]
Link to comment
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)

Link to comment
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
 Share

  • Recently Browsing   0 members

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