fix(script): Do not process empty script output

This commit is contained in:
Michael Carlberg 2016-05-24 23:37:16 +02:00
parent 8535f5a83d
commit 40524979d0
1 changed files with 4 additions and 1 deletions

View File

@ -50,11 +50,14 @@ bool ScriptModule::update()
log_error(e.what());
}
return true;
return !this->output.empty();
}
std::string ScriptModule::get_output()
{
if (this->output.empty())
return "";
if (!this->click_left.empty())
this->builder->cmd(Cmd::LEFT_CLICK, string::replace_all(this->click_left, "%counter%", std::to_string(this->counter)));
if (!this->click_middle.empty())