If the script reaches the end without a return it will exit. Once this script executes, it doesn't have a return unless you just omitted that in your example code. Make sure you use a return at the end of a hotkey if you plan on using it over again. As discussed in the Zang-Fu chapter, the color white is related to the Lungs. Your ErrorLevel = 0 will work, however You could just write if !ErrorLevel (which directly translates to if not ErrorLevel). White colored herbs and the Lungs As a cough medicine pinellia, white atractylodes, morus bark, apricot seed, lily, ophiopogon, platycodon, glehnia, fritillary and coix are most important. It's an easy replacement and makes your script a bit more adaptable, not to mention someone else helping you will get more of an idea of what those coordinates mean. I really encourage you to use those built in variables rather than a number for the coordinates. Why do you have a bracket, else statement, sleep command all on one line and then go into a new section of brackets? Exactly what are you trying to do there? Are you only trying to execute the next pixel search if the other one is not found or are you trying to execute the pixel search, if the pixel is not found then sleep 2000 and continue? If you test your script you will find it misses brackets.įor readability and keeping your brackets in order you should: Use indentation on same level brackets, Put each new command on a new line, and only use brackets when they are needed (except in certain cases when they make it more readable). You saved my eyes and made both of our lives easier. To detect if a color was found look into the 'ErrorLevel' setting on the command. PixelSearch, Px, Py, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, 0x9d6346, 3, Fast Or if you used the variables like mentioned in the last note Your PixelSearch should more resemble this if you are searching the entire screen: color printing or colour printing is the reproduction of an image or text in color (as opposed to simpler black and white or monochrome printing ). #Colol color herb fullIf you wanted to search your entire screen you would start at 0, 0 right? For the lower right corner it would be the full width/height of your screen. The first x/y coordinates are the top-left corner and the next set are the bottom-right corner. Think of PixelSearch as using 2 coordinates to form a rectangle. The built in variables A_ScreenWidth and A_ScreenHeight can be used to automatically detect your screen dimensions, so to make things more reliable if your screen ever changed, I would suggest just using those variables. If you are working with the whole screen and not just the active window you want to screen coordination mode, rather than relevant, which relates to the window.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |