'how to read data from the screen through a transparent window

Hi iam making a bot to game, and i have a little problem

this is my transparency class

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class CzytnikHeal extends JFrame {
private static final int width = 45;
private static final int height = 15;

    public CzytnikHeal(){
        setSize(new Dimension(width,height));
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        setLocationRelativeTo(null);
        setAlwaysOnTop(true);
        setResizable(true);
        setLayout(null);
        setUndecorated(true);
        setBackground(new Color(230, 255, 0, 32));     

        setVisible(true);
    }
}

i want to read from monitor any details by using this transparency window. Any suggestions how to do it?

specifying i want move this transparency window to e.g hp in game and read this by my program to working bot and i dont know how to read this information from screen :d



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source