AlpacaLibary  1.63
A closed source C++ bot for OSRS
Interact.hpp
Go to the documentation of this file.
1 #ifndef INTERACT_HPP_INCLUDED
2 #define INTERACT_HPP_INCLUDED
3 
4 #include "../../Core/Input.hpp"
5 #include "../../Core/Internal.hpp"
6 #include <functional>
7 #include <string>
8 #include <cstdint>
9 
10 namespace Interact
11 {
12  bool MoveMouse(const Point& P);
13  bool MoveMouse(const Box& B);
14 
15  bool Click(const Button& B = BUTTON_LEFT);
16 
17  bool Click(const Point& P, const Button& B = BUTTON_LEFT);
18  bool Click(const Point& P, const std::string& Option, const std::string& Target = "");
19  bool Click(const Point& P, const std::vector<std::string>& Options, const std::string& Target = "");
20 
21  bool Click(const Box& B, const Button& Button = BUTTON_LEFT);
22  bool Click(const Box& B, const std::string& Option, const std::string& Target = "");
23  bool Click(const Box& B, const std::vector<std::string>& Options, const std::string& Target = "");
24 
25  bool Click(const Convex& C, const Button& B = BUTTON_LEFT);
26  bool Click(const Convex& C, const std::string& Option, const std::string& Target = "");
27  bool Click(const Convex& C, const std::vector<std::string>& Options, const std::string& Target = "");
28 
29  bool Scroll(const ScrollDirection& Direction);
30  bool ScrollUntil(const ScrollDirection& Direction, std::int32_t Duration, const std::function<bool()>& Func);
31 
32  bool UpKey(std::int32_t Key);
33  bool DownKey(std::int32_t Key);
34  bool ReleaseKey(std::int32_t Key);
35  bool HoldKey(std::int32_t Key, std::uint32_t Duration);
36  bool TypeKey(std::int32_t Key);
37  bool TypeString(const std::string& String, bool PressEnter = false);
38 }
39 
40 #endif // INTERACT_HPP_INCLUDED
Button
Definition: Input.hpp:16
@ BUTTON_LEFT
Definition: Input.hpp:18
Key
Definition: Input.hpp:24
ScrollDirection
Definition: Input.hpp:9
Definition: Box.hpp:11
Definition: Convex.hpp:9
Definition: Point.hpp:10
bool MoveMouse(const Point &P)
bool Click(const Button &B=BUTTON_LEFT)
bool TypeKey(std::int32_t Key)
bool Scroll(const ScrollDirection &Direction)
bool ScrollUntil(const ScrollDirection &Direction, std::int32_t Duration, const std::function< bool()> &Func)
bool UpKey(std::int32_t Key)
bool ReleaseKey(std::int32_t Key)
bool HoldKey(std::int32_t Key, std::uint32_t Duration)
bool DownKey(std::int32_t Key)
bool TypeString(const std::string &String, bool PressEnter=false)