2016-05-31 03:58:58 +00:00
|
|
|
#pragma once
|
2016-05-19 14:41:06 +00:00
|
|
|
|
|
|
|
#include "modules/base.hpp"
|
|
|
|
#include "services/command.hpp"
|
|
|
|
|
|
|
|
namespace modules
|
|
|
|
{
|
|
|
|
DefineModule(ScriptModule, TimerModule)
|
|
|
|
{
|
2016-05-31 03:58:58 +00:00
|
|
|
static constexpr auto TAG_OUTPUT = "<output>";
|
2016-05-19 14:41:06 +00:00
|
|
|
|
|
|
|
std::unique_ptr<Builder> builder;
|
|
|
|
|
|
|
|
std::string exec;
|
|
|
|
std::string click_left;
|
|
|
|
std::string click_middle;
|
|
|
|
std::string click_right;
|
|
|
|
std::string scroll_up;
|
|
|
|
std::string scroll_down;
|
|
|
|
|
|
|
|
std::string output;
|
|
|
|
std::atomic<int> counter;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
public:
|
2016-05-31 03:58:58 +00:00
|
|
|
explicit ScriptModule(const std::string& name);
|
2016-05-19 14:41:06 +00:00
|
|
|
|
|
|
|
bool update();
|
|
|
|
bool build(Builder *builder, const std::string& tag);
|
|
|
|
std::string get_output();
|
|
|
|
};
|
|
|
|
}
|