AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pls check this - im new
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Guest
Guest





PostPosted: Fri Mar 11, 2005 7:53 pm    Post subject: pls check this - im new Reply with quote

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

PostPosted: Fri Mar 11, 2005 8:21 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
guest
Guest





PostPosted: Fri Mar 11, 2005 8:25 pm    Post subject: Reply with quote

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





PostPosted: Fri Mar 11, 2005 8:26 pm    Post subject: Reply with quote

ermm yes thats wot i want, wot u said
Back to top
Guest






PostPosted: Fri Mar 11, 2005 8:28 pm    Post subject: Reply with quote

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





PostPosted: Fri Mar 11, 2005 8:33 pm    Post subject: Reply with quote

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





PostPosted: Fri Mar 11, 2005 8:35 pm    Post subject: Reply with quote

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

PostPosted: Fri Mar 11, 2005 8:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
guest
Guest





PostPosted: Fri Mar 11, 2005 8:51 pm    Post subject: Reply with quote

i tried it it doesnt work Sad
Back to top
Guest






PostPosted: Fri Mar 11, 2005 9:15 pm    Post subject: Reply with quote

ok now... (By the way u might wanna register to the forum... its free! Wink 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






PostPosted: Fri Mar 11, 2005 9:16 pm    Post subject: Reply with quote

ok now... (By the way u might wanna register to the forum... its free! Wink 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

PostPosted: Fri Mar 11, 2005 9:17 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
guest
Guest





PostPosted: Fri Mar 11, 2005 9:36 pm    Post subject: Reply with quote

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

PostPosted: Fri Mar 11, 2005 9:39 pm    Post subject: Reply with quote

i made an account
_________________
Previous experience: PBasic for Picaxe 08 chip Sad
Back to top
View user's profile Send private message
sosaited



Joined: 24 Feb 2005
Posts: 233

PostPosted: Fri Mar 11, 2005 9:40 pm    Post subject: Reply with quote

Add :

Code:
#Persistent


in the first line of the script..
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group