Sign in to follow this  
Followers 0
Duran

Getting Positions of a Window

6 posts in this topic

I was wondering how would you get a dimension of a window like window is 800x600 but i am running 1024x768 and want to get the dimensions of that program instead of where its located on the screen but to get what the dimensions of the program is and being able to hook it so that everything the Autoit program is doing is doing in the program. Is this possible with Autoit? I have looked around the functions page and have read most of the functions but to start something that does this get me confused <_<

Share this post


Link to post
Share on other sites



I was wondering how would you get a dimension of a window like window is 800x600 but i am running 1024x768 and want to get the dimensions of that program instead of where its located on the screen but to get what the dimensions of the program is and being able to hook it so that everything the Autoit program is doing is doing in the program. Is this possible with Autoit? I have looked around the functions page and have read most of the functions but to start something that does this get me confused <_<

this get me confused :)

Ditto...

Slow down, take a deep breath, think of some punctuation, and try to elaborate exactly what it is you are trying to do, and what you would like the ultimate outcome to be.


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

Ditto...

Slow down, take a deep breath, think of some punctuation, and try to elaborate exactly what it is you are trying to do, and what you would like the ultimate outcome to be.

Lol sorry, that was even with me looking over it again :)

Ok So what I am trying to do is get the width and height of a window anywhere on the screen of 1024x768.

After that to allow the script I am running to stay in those width and height of the window so that it does not go off the program.

I am setting up some programs to run automaticly with pixelsearch and WinActive functions to make a job easier <_<

Share this post


Link to post
Share on other sites

Lol sorry, that was even with me looking over it again :)

Ok So what I am trying to do is get the width and height of a window anywhere on the screen of 1024x768.

After that to allow the script I am running to stay in those width and height of the window so that it does not go off the program.

I am setting up some programs to run automaticly with pixelsearch and WinActive functions to make a job easier <_<

Use the windows client coords.

Opt("PixelCoordMode", 2)

Opt("MouseCoordMode", 2)

In AutoInfo.exe, you'll go to options, coord mode, and select client.

Just keep the window on top, and you'll never have to worry about it.

On the other hand, if you are just sending text or clicking buttons that have classnamenn's or controlid's, you could use the Control* functions, and the window most often will not have to have focus.


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

Look in the Help file under Windows Management for

WinGetClientSize()

and

WinGetPos()


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Look in the Help file under Windows Management for

WinGetClientSize()

and

WinGetPos()

Thanks for the help guys! I will use this and test it for a bit and if i get into anymore troubles I will post my results thanks ^^

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