Remember, when getting information from a screen shot, or a saved picture, that AutoInfo will only get proper information from a Bitmap file as of now. Check the Coords, and what the Colour is under the mouse at the time. You didn't change the colour (0x000000), which is pure black, seldom will you find this colour. If Not WinActive("The 'Title' that AutoInfo Tool Gives you for the game window") Then WinActivate("The 'Title' that AutoInfo Tool Gives you for the game window"), this is to make sure that your pixel search is done on the actual game window itself. Look in your AutoInfo tool, under Modes and Coords to see what you coords your actually getting, it will have a check mark next to it, then set the numbers accordingly. Just because your getting pixels from a "full screen" doesn't mean you are getting "screen coords". Well, I set it up like I did on purpose, because when the program sends "space" it was to reset the $Reset back to "0". Sleep(10) if it takes a long time, you might consider a sleep If PixelGetColor(134, 702) = 0x000000 Then replace 0x000000 with the actual colour using AutoInfo Tool It has got to be a different mistake on my part. So the script has 8 chances to detect the pixel change. Because of the width of the moving bar, it has 8 black pixels along its top. Remember, this is the pixel I am trying to detect:Īt first I thought that perhaps the bar is moving too fast for AutoIt to detect.
#Pangya golf. full#
Here is a full screenshot of the game if someone could double check my coordinates for the black pixel. and if I move the window to the far right and hit F1 I will get no such space. I will open an all black command prompt and hit F1 and I will get a single space. It doesnt seem to work while in game and I am at a loss for why. then hit f1 for it to start searching for the black pixel. The only other thing I changed was I made the hotkey F1, so I would hit space myself in the game, then again to set power. After checking the pixel color in a screenshot I took, I confirmed it was 0x000000. I then added a $Reset = 0 to the If statement so if it did detect the black color it would hit Space only once rather than over and over.
I also got my coords for the pixel I am detecting by taking a screenshot while in the program and opening it up in photoshop. I think this was the right decision because the program runs in full screen at 1024x768. I changed the PixelCoordMode and MouseCoordMode to "1".
After looking at what you had written I simply tweaked it as you suggested in your comments. this community is terrific! Edited Novemby Simucalįirst off, thank you VERY much ron for your help.
#Pangya golf. free#
I've tried to make everything as clear as possible but if there are any questions feel free to ask me. If ANYONE more skilled than I could help me out with this, it would be GREATLY appreciated. This will ensure I get "Pangya" hits (100% accuracy) each time. Once the value equals black the script would simply hit SPACE bar for me and then the script will exit. I would like to hit a hotkey to activate a AutoItv3 script which will be checking the coordinates 134, 702 in a loop to see if its value is black.Ĥ. Then the bar will being moving back down to the left. I will then manually hit SPACE again to stop the bar at the correct power level that I desire.ģ. I'll manually hit SPACE to start the shot.Ģ. So, as a quick recap of what I was looking to be able to do is:ġ. The coordinates for the pixel that I wish to detect when it turns black are: 134, 702 I would be checking for Pixel #1 to turn black, since it is the left-most pixel of the moving bar, it will be the first to get into the correct position for me to hit the space bar. The black pixel will be the top part of the bar that moves across. it would constantly check as fast as it could for a pixel on the screen to turn black. What I was thinking I could have a script do is once I hit, say the F1 key.
The shot cannot be timed with a conventional macro because different clubs/terrain result in the bar moving at different speeds. The exact point I would like the bar to stop at is as follows:
Here is the bar that moves across the meter: This way, I will hit my distance perfectly each time. What I am interested in doing with AutoItv3 is detecting when the bar that moves on the meter gets to the perfect stop point, and then have it hit space bar for me. This exact spot I am trying to reach is called the "Pangya" spot. The tricky part, is you want it to stop at the exact spot coming back down, otherwise your accuracy is shot all to hell. Once it reaches your desired distance you hit space bar again, and it will start coming back to the left. You hit the space bar to start the bar on the meter moving to the right. In a golf swing you have a power meter like this: and new courses, items, etc are being added every day it is worth checking out. That may sound strange, but considering it is free. I am currently playing a game called, Albatross18.