loki1982 Posted March 3, 2005 Share Posted March 3, 2005 (edited) I just started using autoit last night. I caught on pretty quick and have already made a script using do's, if, pixelgetcolor,send and more. My questions are first I know that a certain area of my screen will always turn a shade of red and I need that to be the trigger. I know I need to pixelsearch(x,y,shade,shade difference) etc but how do I go about finding out the hex value of the color im looking for. Can I copy the color and put it into aprogram to see what the hex value is? Or could I do somthing like $var= pixelgetcolor(x,y) then send($var) just to get the exact hex I need? And second question. I know send("x") will send an individual key stroke but what fuction or how do I go about holding the key down? And third I need to be able to shift and right click mouse at the same time how do I go about doing this? would this work> send("shift"+mouseclick("right")) or mouseclick("shift+right") or send("shift+mouseclick("right")") Thanks I really appreciate anyone who can give me some help. Edited March 3, 2005 by loki1982 Link to comment Share on other sites More sharing options...
Jammer Posted March 3, 2005 Share Posted March 3, 2005 (edited) send("{lshift down}") mouseclick(<put stuff here>) send("{lshift up}") this will hold the left shiift (lshift if u want right shift change to rshift) ten click somewhere and then release the shift... Edited March 3, 2005 by Jammer Link to comment Share on other sites More sharing options...
loki1982 Posted March 3, 2005 Author Share Posted March 3, 2005 Thanks...I knew it had to be somthing easy I was just missing it. Link to comment Share on other sites More sharing options...
Blue_Drache Posted March 3, 2005 Share Posted March 3, 2005 (edited) I just started using autoit last night. I caught on pretty quick and have already made a script using do's, if, pixelgetcolor,send and more. first I know that a certain area of my screen will always turn a shade of red and I need that to be the trigger. I know I need to pixelsearch(x,y,shade,shade difference) etc but how do I go about finding out the hex value of the color im looking for. Can I copy the color and put it into aprogram to see what the hex value is? Or could I do somthing like $var= pixelgetcolor(x,y) then send($var) just to get the exact hex I need?And second question. I know send("x") will send an individual key stroke but what fuction or how do I go about holding the key down?<{POST_SNAPBACK}>Third's been answered....so's the second. but I'll use your "x" key as an example too.We'll take the easiest one first, and that's the second question.To hold a key down, try this.Send("{x down}") Sleep(3000) Send("{x up}")That will hold the lowercase "x" key down for 3 seconds and then release it.Now to tackle your questions on pixelgetcolor.Converting to hex is defined in the helpfile with this script:$var = PixelGetColor( 10 , 100 ) MsgBox(0,"The decmial color is", $var) MsgBox(0,"The hex color is", Hex($var, 6))Note the function Hex($var,6). It converts decimals to hexidecimal numbers, and the number tells how many places after the 0x to hold.If your decimal color was 255, it would return 0x0000FF.Hope that helps. Edited March 3, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
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