jaenster Posted February 8, 2006 Share Posted February 8, 2006 Before you read this tut you must have the skills of ai tut #1Note : your pc must run on 32-bits and have a firefox window open PixelSearch(0,0,@DesktopHeight,@DesktopWidth,0xEF7D10)With this you you look on your full screen to find a firefox window , i only search , if i found or not , i dont do anything .. How do you know the color ?Open your autoIt map where it is installed.. Start up AU3Info.exe if you click anywhere on the screen ( not in window of progam) then he start .. you will see mutch info of the window that get the focus ... if you press ctrl + alt + F he go to pause .. if you hate the highlight you goto the window and choose menu , options , highlight controls .. you can set here always on top off too , always on top means that he dont go away if you set the focus on an other progam.. if you move the mouse on the window of firefox , on the icon in the start barif you there with the mouse you a color in AU3Info .. i has do the same and i found the color "0xEF7D10"... Where you found it in AU3Info.exe?>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: >> HERE << Dec: $found = PixelSearch(0,0,@DesktopHeight,@DesktopWidth,0xEF7D10)I set the x and y in $found , but in a array , You must work with arrays$found = PixelSearch(0,0,@DesktopHeight,@DesktopWidth,0xEF7D10) if not @error then endifWhat stands here ? if not @error then wtf means that ? its easy .. for the progam stands here "If there is not a error then".. You shall think now , Then What? Then he does all statments that he find before the next endif..$found = PixelSearch(0,0,@DesktopHeight,@DesktopWidth,0xEF7D10) if not @error then mousemove($found[0],$found[1]) endifThe mouse will be move now to $found[0] .. function PixelSearch will be write the x of 0xEF7D10 in $found[0] .. the y can be found in $found[1]$found = PixelSearch(0,0,@DesktopHeight,@DesktopWidth,0xEF7D10) if not @error then mousemove($found[0],$found[1]) mouseclick("left") endifYeah we has faked a mouseclick , Windows thinks that you has pressed a mousebutton , "left" now he thinks .. its mouseclick("left") not right , if you do mouseclick("right") then he press the right button.. you got "middle" to , if has found on this site that some mouse's got mousebutton 4 .. and 5 .. i dont know how , i have never tryed it..With us progam we got a little problem .. What to do if there is no firefox , he must do nothing ? No that not normal , you start your progam and he Search for 0xEF7D10 and he stops .. thats not nice , is it? no it isn't..$found = PixelSearch(0,0,@DesktopHeight,@DesktopWidth,0xEF7D10) if not @error then mousemove($found[0],$found[1]) mouseclick("left") else msgbox(0,"Error","We didn't found firefox") endifNow we has made a message if firefox dont exits , how i know that firefox not exits ? First i do "If not @error then" , It mean "If no errors then" , now we got , There is a error , What error ? He dont found firefox .. Why not ? Window isn't open.. 3 Statments later you get "else" .. "if there is no error then" ,Else means here "if there is a error" .. Then i show a msgbox with in it "We didn't found Firefox" , And as title "Error" .. In Next tut you can find how we edit the site bar -jaenster Link to comment Share on other sites More sharing options...
Nuffilein805 Posted February 8, 2006 Share Posted February 8, 2006 @jaenster: your looking for just 1 color, but you cannot be sure only firefox uses it maybe you should do if not winexists ("firefox") then instead of $found = PixelSearch(0,0,@DesktopHeight,@DesktopWidth,0xEF7D10) if not @error then the rest is fine as i said i like your tuts my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
jaenster Posted February 8, 2006 Author Share Posted February 8, 2006 Oke .. but something , This is for noobs , win is to hard to start -jaenster Link to comment Share on other sites More sharing options...
Nuffilein805 Posted February 8, 2006 Share Posted February 8, 2006 thats depending on the person using it 1. some people think that window-managment is way easier (like me) than pixel-management, especially in this case as you don't know if firefox is the only application visible using this color 2. the way you're looking for the color is quite slow maybe you should use pixelchecksum - maybe too hard for newbies don't get me wrong this is no criticism, these are just some suggestions for your future scripts my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
jaenster Posted February 8, 2006 Author Share Posted February 8, 2006 Yes , pixel is easy for starters .. Not to open a window , but to make bots -jaenster Link to comment Share on other sites More sharing options...
Nuffilein805 Posted February 8, 2006 Share Posted February 8, 2006 ahhh, ok so you're doing bot-tuturials now i got the point, ok than it's fine continue doing your tuts i'm awaiting some more soon my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
jaenster Posted February 8, 2006 Author Share Posted February 8, 2006 i got #3 and #5 .. #4 write some one other -jaenster Link to comment Share on other sites More sharing options...
jaenster Posted February 8, 2006 Author Share Posted February 8, 2006 Shall i post them ? -jaenster Link to comment Share on other sites More sharing options...
Oxin8 Posted February 8, 2006 Share Posted February 8, 2006 no ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Valuater Posted February 8, 2006 Share Posted February 8, 2006 @jaensterhave you seen this???http://www.autoitscript.com/forum/index.php?showtopic=21048#8) Link to comment Share on other sites More sharing options...
jaenster Posted February 9, 2006 Author Share Posted February 9, 2006 yes that is nice -jaenster Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 9, 2006 Moderators Share Posted February 9, 2006 I'm thinking you should stay away from doing a tutorial jaenster in english. I'm a bit experienced with AutoIt, but I must say, your tutorial(s) confuses the hell out of me.Why don't you try to write one in your native tongue, for those that speak your language could surely understand and it would have a greater affect then what your doing here.There are better tutorials out there that the english speaking users can 'Easily' understand, by coders/scripters that have much more experience with AutoIt.http://www.autoitscript.com/forum/index.ph...topic=19434&hl=http://www.autoitscript.com/forum/index.php?showtopic=21048#This is not meant in any way to be hurtful, in fact... I applaud your efforts, but if your truly not helping them to understand your broken english explinations, your only hurting them in the long run. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
jaenster Posted February 9, 2006 Author Share Posted February 9, 2006 Hmm i must say , i am not bad with autoIT ... i am BAD in english .. Anyhy my tuts where only a test if pll like it -jaenster 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