Documentation
¶
Index ¶
- Variables
- type App
- type Clicker
- type Config
- type Finder
- type HighlightRequest
- type Highlighter
- type Image
- type Match
- type Point
- type PollInterval
- type Region
- func (r *Region) Click()
- func (r *Region) Find(i *Image) *Match
- func (r *Region) FindAll(i *Image) []*Match
- func (r *Region) GetHeight() int
- func (r *Region) GetTopLeft() *Point
- func (r *Region) GetWidth() int
- func (r *Region) Highlight(t time.Duration)
- func (r *Region) MoveMouse()
- func (r *Region) Offset(x, y, width, height int) *Region
- func (r *Region) Wait(i *Image, t time.Duration) *Match
- type Screen
Constants ¶
This section is empty.
Variables ¶
View Source
var ImageNotFoundError = errors.New("file not found")
View Source
var ImageUnknownError = errors.New("unknown error")
View Source
var ImageUnsupportedFormatError = errors.New("unsupported format")
View Source
var InvalidConfigurationError = errors.New("invalid configuration provided")
Functions ¶
This section is empty.
Types ¶
type Clicker ¶
type Clicker struct {
}
func (*Clicker) Click ¶
Click clicks at a random X and Y coordinate within the given location. This doesn't use the standard Click() function of any library which is easy to detect as an automated click - rather it adds entropy throughout the mouse events.
func (*Clicker) MoveMouseInRegion ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) GetPollInterval ¶
func (c *Config) GetPollInterval() *PollInterval
type Finder ¶
type Finder struct {
// contains filtered or unexported fields
}
func NewFinder ¶
func NewFinder(screen *Screen, pollInterval *PollInterval) *Finder
type HighlightRequest ¶
type HighlightRequest struct {
ScreenWidth int `arg:"--screen-width"`
ScreenHeight int `arg:"--screen-height"`
X float64 `arg:"--x"`
Y float64 `arg:"--y"`
Width float64 `arg:"--w"`
Height float64 `arg:"--h"`
Duration float64 `arg:"--d"`
}
func (HighlightRequest) AsArgsArray ¶
func (r HighlightRequest) AsArgsArray() []string
type Highlighter ¶
type Highlighter struct {
// contains filtered or unexported fields
}
func NewHighlighter ¶
func NewHighlighter(highlighterBinary []byte) *Highlighter
func (*Highlighter) Highlight ¶
func (h *Highlighter) Highlight(r *HighlightRequest)
type Match ¶
type Match struct {
Region
// contains filtered or unexported fields
}
func (*Match) GetConfidence ¶
type PollInterval ¶
type Region ¶
type Region struct {
// contains filtered or unexported fields
}
func (*Region) GetTopLeft ¶
type Screen ¶
type Screen struct {
Region
// contains filtered or unexported fields
}
func NewScreen ¶
func NewScreen(highlighter *Highlighter, interval *PollInterval) *Screen
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
