Jump to content

How To...


Recommended Posts

Sorry if its already posted but i didnt find it... I'm wondering how do i get it to run scripts in a certain window, not on the desktop, for instance i want it to be that even if i move it to a different part of the desktop the script will still work since it's within the window, i tried the "winactivate" and "controlfocus" things but they dont seem to work, winactivate just brings the window up but still runs the scripts as if the locations were on the desktop itself!

Thanks in advance, Abdul

Link to comment
Share on other sites

I don't exaclty understand what you want... and what is "it" as you mentioned above. Can you provide and example?


ok i want the script to be run in a certain window, such as a game... the game isn't fullscreen so i cant just put the locations of it on desktop or w/e like i've done in the past, instead i have the locations of the places on the actual window, but when i run the script with those locations, it goes to those locations on the desktop instead of the game window... is there a way i could make the script run in the game window instead of the desktop?
Link to comment
Share on other sites

I think you might have some terminology mixed up. AutoIt run's... It doesn't run 'on the desktop' as you put it. I think what you mean is you want the co-ordinates relative to the window and not to the desktop.

Opt("MouseCoordMode", 1)

Put this at the top of your script and it will change the way co-ordinates are read.

Change the bold number here, "MouseCoordMode",1, to get different settings

0 = relative to the active window

1 = absolute screen coordinates

2 = relative coords to the client area of the active window

Edited by Burrup


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

  • Recently Browsing   0 members

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