Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello guys i have a problem im trying to make a program.

My program is a image processing program.

its taking a picture from the game and it's reading the current life value and total life value to character after that it subtracts the current life value from the total life value .if the current life value is smaller than 720 the total life value, it must press 1 key.(number 1 key = there is an pot.If the player press the pot, the character life 720 increas anyway im continue)

here is the problem

program is working but not on the game.It is taking picture and it's calculating the difference between total life value and current life valu.It's pressing the key when the difference between life values ​​is 720.If i open notepad it's pressing but if i open the game it's not pressing on the game.

i read a essay about keys in c#.There written "you should know something direct input." but i dont know about that i tried many things.Pls help me and im sorry about my grammer..

What I have tried:

i tried sendkey i tried keydown key up
Posted
Updated 14-May-18 7:04am
v2

1 solution

Maybe this library will do the trick: Global Mouse and Keyboard Library[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900