crazywino wrote:
I don't understand how to use this code or and where this
begin
if Image.Can not be located on screen("{Enemy's HP Picture Here}", "20")
begin
Keyboard.Press key("{<tab>}")
end
end
would go for the fix can you guys upload a file that I can import into BE or explain for a noob?
This is a short explanation of the command itself:
viewtopic.php?f=164&t=338As for a descriptive detail, this is how the Image command works:
The parameters needed in order for the Image command to work are:
Code:
Image.Can not be located on screen("{Directory of the Picture That Needs to be Read}", "{Percentage of Pixels Detected that Matches the Picture[up to 100%]}")
As for the {Directory of the Picture That Needs to be Read}, you will need to take a snapshot in-game and crop it to the section that you do need. I will have to refer to an example of one of my macros here so excuse me on that. In my Digimon Bot example [and what you're about to do will be the exact same thing] (
viewtopic.php?f=304&t=2251), I basically let it keep track of the enemy's HP bar. You can take a screenshot and paste it on Paint. If you want something a bit easier, I recommend using SnagIt as it takes pictures of regions on the spot, regardless of what you're doing. When you're done cropping your picture and saved it, now you need to locate it's directory. Simply right click your picture and see it's properties, copy and paste the path directory.
(Sorry about the yen symbols, I have a MS Japanese text thing enabled. They're really supposed to be backslashes '\')
I saved it under 'C:\Digimon'. However you need to add something extra. You will also need to add: 'C:\Digimon\<Picture's Name>.<jpg/png>'. So in this case, I made my enemy's HP picture a .png type. Therefore we need to fill this part of the code with:
Code:
Image.Can not be located on screen("C:\Digimon\digimonenemyHP.png", "{Percentage of Pixels Detected that Matches the Picture[up to 100%]}")
Protip: I recommend creating a file in your C-drive just for convenience and name it to your liking.
The second part is easy enough. It compares the image with the entire in-game screen and tries to find it. With the addition of the 'if' statement, the macro states that if it finds a comparison that's at a certain percentage OR higher, it will execute the 'next set' of commands underneath it (from that begin to end). My rule of thumb on the numbers is keep it at 30% or lower (Yes, even 5% sometimes does the trick, but that's all part of the trial and error in creating a macro).
By the way, you can simply copy the previous code I have up there, just delete the curly brackets '{}' and what's inside them. You should end up having somewhere along these lines. The directory on my code is an example, you can change it at anytime:
Code:
begin
if Image.Can not be located on screen("C:\BEM Images\troyenemyHP.png", "30")
begin
Keyboard.Press key("{<tab>}")
end
end
Now that you're more knowledgeable with it, you can make good macros. Image and Color commands are powerful and the basis of great gaming macros.
If you want more information on how to use the color commands, just read the previous pages of this thread, I've thoroughly explained it to others and they seem to like it.
Protip 2: If at anytime you get stuck with the commands on what to exactly type (this applies to everything you do in Blue Eye Macro), click anywhere inside the blank as so and it will give you a detailed description on what you need to do:
Oh, and enjoy your stay at Blue Eye Macro: The Gigus Edition.
_________________
Code:
> Meanwhile at Blue Eye Macro...
> BEM Video Games Department - Moderator, Coder, Debugger, Math/Physics & Algorithm Enthusiast - USA
Current Project: Mod Duty