 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Guest Guest
|
Posted: Fri Mar 11, 2005 7:53 pm Post subject: pls check this - im new |
|
|
hey could u check this (its my first one) just wanna make summat to click a button over and over
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template AutoHotkey script.
;
WinWaitActive, Dark Throne (beta) Recruitloop - Microsoft Internet Explorer
MouseGetPos, Mouse 401, Mouse 464
PixelGetColor, color, %Mouse401%, %Mouse464%
If color is 144164
MouseClick, left, 401, 464
If color is not 144164
Return |
|
| Back to top |
|
 |
sosaited
Joined: 24 Feb 2005 Posts: 233
|
Posted: Fri Mar 11, 2005 8:21 pm Post subject: |
|
|
| it'll be better if u r more specific on what u wanna do ... you want to CHECK if a specific (X, Y) position has got the colour u want ... and then u want to click on that position?? |
|
| Back to top |
|
 |
guest Guest
|
Posted: Fri Mar 11, 2005 8:25 pm Post subject: |
|
|
| yea kinda i found out the colour of a specific part of the button, the button goes lighter when the whole page has loaded. Then i want to make it click on the position that it has checked if it is the right colour and if not i want it to check again |
|
| Back to top |
|
 |
guest Guest
|
Posted: Fri Mar 11, 2005 8:26 pm Post subject: |
|
|
| ermm yes thats wot i want, wot u said |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Mar 11, 2005 8:28 pm Post subject: |
|
|
| i just realised something, how do i make it wait a few seconds b4 it checks again cos other wise it will keep clicking the link and the page will neveer get chance to load the next page |
|
| Back to top |
|
 |
Guest Guest
|
Posted: Fri Mar 11, 2005 8:33 pm Post subject: |
|
|
ok i added another line
| Quote: | WinWaitActive, Dark Throne (beta) Recruitloop - Microsoft Internet Explorer
Sleep, 5000
MouseGetPos, Mouse 401, Mouse 464
PixelGetColor, color, %Mouse401%, %Mouse464%
If color is 144164
MouseClick, left, 401, 464
If color is not 144164
Return |
will this work?
the coordinates i have recorded (using window spy) are 'in window', is this the coordinates i need or should i use 'on screen' |
|
| Back to top |
|
 |
guest Guest
|
Posted: Fri Mar 11, 2005 8:35 pm Post subject: |
|
|
| sosaited wrote: | | it'll be better if u r more specific on what u wanna do ... you want to CHECK if a specific (X, Y) position has got the colour u want ... and then u want to click on that position?? |
yes |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Fri Mar 11, 2005 8:42 pm Post subject: |
|
|
Use the sleep command to pause a script for a period of time. It only has one parameter, which is the amount of milliseconds to wait.
| Code: | | Sleep,2000 ;Wait for two seconds. |
|
|
| Back to top |
|
 |
guest Guest
|
Posted: Fri Mar 11, 2005 8:51 pm Post subject: |
|
|
i tried it it doesnt work  |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Mar 11, 2005 9:15 pm Post subject: |
|
|
ok now... (By the way u might wanna register to the forum... its free! so i could contact u instantly)(.. anyways...
heres the script that might do the trick:
| Code: | SetTimer, main, 5000 ;wait 5 seconds and load label repeatedly
main:
WinWaitActive, Dark Throne (beta) Recruitloop - Microsoft Internet Explorer
MouseGetPos, X, Y ; THE NAME OF THE VARIABLES TO STORE THE
PixelGetColor, color, 401, 464
If color = 144164
MouseClick, left, 401, 464
If color <> 144164
Return |
|
|
| Back to top |
|
 |
Guest
|
Posted: Fri Mar 11, 2005 9:16 pm Post subject: |
|
|
ok now... (By the way u might wanna register to the forum... its free! so i could contact u instantly)(.. anyways...
heres the script that might do the trick:
| Code: | SetTimer, main, 5000 ;wait 5 seconds and load label repeatedly
main:
WinWaitActive, Dark Throne (beta) Recruitloop - Microsoft Internet Explorer
PixelGetColor, color, 401, 464
If color = 144164
MouseClick, left, 401, 464
If color <> 144164
Return |
|
|
| Back to top |
|
 |
sosaited
Joined: 24 Feb 2005 Posts: 233
|
Posted: Fri Mar 11, 2005 9:17 pm Post subject: |
|
|
my bad... i forgot to login before sending reply .. heheh.. so the second one script is right one.. i'll send it again:
| Code: | SetTimer, main, 5000 ;wait 5 seconds and load label repeatedly
main:
WinWaitActive, Dark Throne (beta) Recruitloop - Microsoft Internet Explorer
PixelGetColor, color, 401, 464
If color = 144164
MouseClick, left, 401, 464
If color <> 144164
Return |
UNTESTED.. so let me know if it works or not |
|
| Back to top |
|
 |
guest Guest
|
Posted: Fri Mar 11, 2005 9:36 pm Post subject: |
|
|
| thanks for that but unfortunately it doesnt work, as soon as i activate the window the program ends |
|
| Back to top |
|
 |
Shoty
Joined: 11 Mar 2005 Posts: 3
|
Posted: Fri Mar 11, 2005 9:39 pm Post subject: |
|
|
i made an account _________________ Previous experience: PBasic for Picaxe 08 chip  |
|
| Back to top |
|
 |
sosaited
Joined: 24 Feb 2005 Posts: 233
|
Posted: Fri Mar 11, 2005 9:40 pm Post subject: |
|
|
Add :
in the first line of the script.. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|