You'd have to figure out what value the game is assigning to the flashlight, and then freeze the value so it stays constant.
Good luck finding the address where the battery value is being held though. Seems highly unlikely considering it's a bar and not a 100/100 type of deal like ammo