| View previous topic :: View next topic |
| Author |
Message |
snakkero Guest
|
Posted: Sat Aug 01, 2009 2:30 pm Post subject: Need really simple script |
|
|
HI!
I`m looking for script for 2 hours, but can`t find. I need script that will click (left mouse button) on exactly point in new window, 1 second after opening. I hope you know what i mean. Could somebody make it? |
|
| Back to top |
|
 |
snakkero Guest
|
Posted: Sat Aug 01, 2009 2:37 pm Post subject: |
|
|
| Coordinates should be defined from left corner for every window, not whole screen (i don`t know, where exaxtly new window will open) |
|
| Back to top |
|
 |
TLM
Joined: 21 Aug 2006 Posts: 2926 Location: The Shell
|
|
| Back to top |
|
 |
Eedis
Joined: 12 Jun 2009 Posts: 1158 Location: Indianapolis IN, USA
|
Posted: Sat Aug 01, 2009 9:46 pm Post subject: |
|
|
| Code: | WinWaitActive, "Window Title" ;Replace the quotes with the window title.
Sleep, 1000 ;Waits for one second, in milliseconds.
CoordMode, Mouse, Relative ;Makes the coordinates of click relative to the active window.
MouseClick, L, "x", "y" ;Replace the quotes with the coordinates you want it to click. |
Untested, but I'm sure that's what you wanted. _________________ www.AutoHotkey.net/~Eedis
I love my wife and daughter so much.
 |
|
| Back to top |
|
 |
JDN
Joined: 24 Mar 2004 Posts: 299
|
Posted: Sun Aug 02, 2009 4:21 am Post subject: |
|
|
You should also read about the AHK Spy utility.
That will help you find the exact location of a specific point on the screen - like the upper left hand corner of a window - or the point on which you wish to click. |
|
| Back to top |
|
 |
snakkero Guest
|
Posted: Sun Aug 02, 2009 8:10 pm Post subject: |
|
|
| The coordinates of the point I can find myself. Script works with one window, but i would like something that will work with every new window that I open (and only one time, after opening, not every time when it`s active). Is it possibie? |
|
| Back to top |
|
 |
Fatal_Error
Joined: 24 Jul 2009 Posts: 13
|
Posted: Mon Aug 03, 2009 7:12 am Post subject: |
|
|
| If you set the script up as a hotkey then yes. As for automation of this, a little more complicated. I might be able to devise a script for it, but I currently do not know how to do it and would have to look through the help file (very useful, go take a look!) |
|
| Back to top |
|
 |
|