AITEE Posted November 30, 2006 Posted November 30, 2006 Hi! I'm new to AutoIt, but I have experience in programming with VB6. I was wondering if like say you could get the RGB value from the coordinates of the mouse. Also forgive me, I just started using this compiler today and am still learning syntax. so please bear with me. (I'm sure I'll catch on quickly) Thanks any help is appreciated. AITEE
Richard Robertson Posted November 30, 2006 Posted November 30, 2006 Look into PixelGetColor and MouseGetPos in the help file.
herewasplato Posted November 30, 2006 Posted November 30, 2006 take a look at this link:http://www.autoitscript.com/forum/index.ph...showtopic=33232 [size="1"][font="Arial"].[u].[/u][/font][/size]
AITEE Posted November 30, 2006 Author Posted November 30, 2006 Okay, Thanks guys. I have a question. What language closest resembles AutoIt's syntax. Is there something simliar? Well I guess any scripter is similar. So is the best way to learn the syntax and different functions just to look through the help files? And looking at them assembled together with examples in the forum? anyway thanks for the patience. Also thanks for the quick replies. AITEE
herewasplato Posted November 30, 2006 Posted November 30, 2006 ...So is the best way to learn the syntax and different functions just to look through the help files?...I can only address this part right now...start here:http://www.autoitscript.com/forum/index.ph...showtopic=34630but be sure to read thru to post #7:http://www.autoitscript.com/forum/index.ph...st&p=266108 [size="1"][font="Arial"].[u].[/u][/font][/size]
AITEE Posted November 30, 2006 Author Posted November 30, 2006 I have a question about MouseMove if you guys don't mind if I just keep it here in this thread. MouseMove takes the arguments (x, y, speed) How would I use this to check to see if the mouse is moving. like for instance basically this If (mouse is moving) Then Blah Blah Blah I'm not sure I understand what MouseMove returns. WAIT would I just constantly check the return value of MouseGetPos Okay I think I got it now. but say if I used a loop to keep checking if the mouse is moving, I know in VB6 you have to use Do Events so the other routines will keep running. is there some sort of equivelant to this? or what would I need to do to accomplish this. Or would I not even use a loop for this kind of thing if I want to keep checking if the mouse has moved and if it has then base my actions upon it. Thank you so much guys.. AITEE
FreeFry Posted November 30, 2006 Posted November 30, 2006 (edited) Something like this? While 1 If _IsMouseMoving() Then MsgBox(0, "Warning!", "Don't move the mouse, it might bite you!") EndIf Wend Func _IsMouseMoving() Local $mPosition1 Local $mPosition2 $mPosition1 = MouseGetPos() Sleep(1) $mPosition2 = MouseGetPos() If $mPosition1[0] <> $mPosition2[0] Or $mPosition1[1] <> $mPosition2[1] Then Return 1 Else Return 0 EndIf EndFunc Edited November 30, 2006 by FreeFry
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now