MikahS Posted December 18, 2014 Share Posted December 18, 2014 True, got it. My apologies mods. Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
mrtgtr Posted December 18, 2014 Author Share Posted December 18, 2014 (edited) thanx I will try now, 5 is color tolerance at pixelsearch 7 is color tolerance at pixelgetcolor, same thing it did not do good again press c contuniusly,likewise. but I fixed my problem like this Func OTUR() PixelSearch(976, 140, 990, 147, 0x000000,5) PixelSearch(976, 193, 990, 199, 0x000000,5) PixelSearch(976, 245, 990, 252, 0x000000,5) PixelSearch(976, 296, 990, 303, 0x000000,5) PixelSearch(976, 349, 990, 356, 0x000000,5) PixelSearch(976, 402, 990, 409, 0x000000,5) PixelSearch(976, 453, 990, 460, 0x000000,5) PixelSearch(976, 505, 990, 512, 0x000000,5) If @error Then Sleep(50) Send("{c down}") Sleep(50) Send("{c up}") Do Sleep(100) PixelSearch(976, 140, 990, 147, 0x000000,5) PixelSearch(976, 193, 990, 199, 0x000000,5) PixelSearch(976, 245, 990, 252, 0x000000,5) PixelSearch(976, 296, 990, 303, 0x000000,5) PixelSearch(976, 349, 990, 356, 0x000000,5) PixelSearch(976, 402, 990, 409, 0x000000,5) PixelSearch(976, 453, 990, 460, 0x000000,5) PixelSearch(976, 505, 990, 512, 0x000000,5) Until Not @error EndIf EndFunc ;==>OTUR Thanx all forum. Edited December 18, 2014 by mrtgtr Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 18, 2014 Moderators Share Posted December 18, 2014 it did not do good again press c contuniusly,likewise. but I fixed my problem like this Func OTUR() PixelSearch(976, 140, 990, 147, 0x000000,5) PixelSearch(976, 193, 990, 199, 0x000000,5) PixelSearch(976, 245, 990, 252, 0x000000,5) PixelSearch(976, 296, 990, 303, 0x000000,5) PixelSearch(976, 349, 990, 356, 0x000000,5) PixelSearch(976, 402, 990, 409, 0x000000,5) PixelSearch(976, 453, 990, 460, 0x000000,5) PixelSearch(976, 505, 990, 512, 0x000000,5) If @error Then Sleep(50) Send("{c down}") Sleep(50) Send("{c up}") Do Sleep(100) PixelSearch(976, 140, 990, 147, 0x000000,5) PixelSearch(976, 193, 990, 199, 0x000000,5) PixelSearch(976, 245, 990, 252, 0x000000,5) PixelSearch(976, 296, 990, 303, 0x000000,5) PixelSearch(976, 349, 990, 356, 0x000000,5) PixelSearch(976, 402, 990, 409, 0x000000,5) PixelSearch(976, 453, 990, 460, 0x000000,5) PixelSearch(976, 505, 990, 512, 0x000000,5) Until Not @error EndIf EndFunc ;==>OTUR Thanx all forum. Your function setup is not correct. I'll try to explain as simply as I can. You are ONLY checking the @error of the function call before the check. So the 7 pixelsearch functions you have done before the last one, are pointless. You literally don't check anything more than this: Func OTUR() PixelSearch(976, 505, 990, 512, 0x000000,5) If @error Then Sleep(50) Send("{c down}") Sleep(50) Send("{c up}") Do Sleep(100) PixelSearch(976, 505, 990, 512, 0x000000,5) Until Not @error EndIf EndFunc ;==>OTUR The way you have your code setup. 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...
mrtgtr Posted December 19, 2014 Author Share Posted December 19, 2014 (edited) Your function setup is not correct. I'll try to explain as simply as I can. You are ONLY checking the @error of the function call before the check. So the 7 pixelsearch functions you have done before the last one, are pointless. You literally don't check anything more than this: Func OTUR() PixelSearch(976, 505, 990, 512, 0x000000,5) If @error Then Sleep(50) Send("{c down}") Sleep(50) Send("{c up}") Do Sleep(100) PixelSearch(976, 505, 990, 512, 0x000000,5) Until Not @error EndIf EndFunc ;==>OTUR The way you have your code setup. does not solve because there are black and red pixels at between my pixelsearch cordinates, they make me wrong process Edited December 19, 2014 by mrtgtr Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 20, 2014 Moderators Share Posted December 20, 2014 I didn't try to solve anything, I was pointing out your mistake. You've exhausted my interest in helping by ignoring previous points. Good luck to you. 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...
JohnOne Posted December 20, 2014 Share Posted December 20, 2014 I use pixelsearch however I am more fond of pixelgetcolor. PixelSearch starts on the top left corner of the x1,y1 coords and checks the color then it goes to x1, y1+1 and checks and then x1,y1+2 etc until it gets to the end of the search x axis then it goes to x2,y1 and so on. The 52 was approximately what he was doing in his first post. I am skipping 52 pixels and it is looping on the x axis which is 1 pixel high. If I say step 52 pixels it will process as search x1,y1 then look for the color then look at x1,y53 (maybe y52 but I dont think so). You are aware PixelSearch can go in whatever direction you choose? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
TrickyDeath Posted December 20, 2014 Share Posted December 20, 2014 Why did not you used variables for each pixel search methode? I am kinda beginer on AutoIT but, for me your code is a bit sily. I did take a look on it, and i also end up with the same answare as SmOke_N. You checking the pixel color on a small area several times, but if you thinking logic, the program always rewrite the previous value with the new. I say, it is better to give different wariable for all search line, then you can easily identify and separate them from each other. Your code will be accured. ;-) Also will be a lots of help for us, if you give is more info where you wana use your code, cause there are several other methode what we can "make" help to you to make your code much more effective. If you useing on window, as you do, you can use window handle, then you can fix some problem with it, insted of, just writeing short code, what will have some serious problem, or work only on specific situation. Do not get me wrong, just try to help. Sry for my bad English, and double sry, but I am learning AutoIT language by myself. :) [u]Tricky[/u] You can't teach a man anything, you can only help him, find it within himself. (Galileo Galilei) Link to comment Share on other sites More sharing options...
computergroove Posted December 20, 2014 Share Posted December 20, 2014 You are aware PixelSearch can go in whatever direction you choose? I didnt see how to do this in the online reference but I see it in the remarks section. I still don't understand how to do it though. Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
JohnOne Posted December 20, 2014 Share Posted December 20, 2014 PixelSearch(@desktopwidth, @desktopheight, 0, 0, 0) Will search screen for a black pixel, it will search from bottom right to top left. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
computergroove Posted December 20, 2014 Share Posted December 20, 2014 PixelSearch(@desktopwidth, @desktopheight, 0, 0, 0) Will search screen for a black pixel, it will search from bottom right to top left. I still don't understand why. What part of this controls the direction of the pixelsearch? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
JohnOne Posted December 21, 2014 Share Posted December 21, 2014 (edited) Yes, if the left parameter is greater than the right, then the search will go from right to left. If the top parameter is greater than the bottom parameter the search will go from bottom to top. Edited December 21, 2014 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Blue_Drache Posted December 21, 2014 Share Posted December 21, 2014 (edited) does not solve because there are black and red pixels at between my pixelsearch cordinates, they make me wrong process Searching to exclude black and red pixels because they make his program go to a wrong function? Poker bot anyone? Also will be a lots of help for us, if you give is more info where you wana use your code, cause there are several other methode what we can "make" help to you to make your code much more effective. His prior posts were locked because he was interacting with a game. Which is why he will be as vague as possible. Which is also why no one should help him. Edited December 21, 2014 by Blue_Drache Bert 1 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