Added new Bang "!SetClip"

Usage - !SetClip "Text to set, #Variable#, [Measure]"

Dynamic Variables is only needed if a dynamic #Variable# is used, it is not needed for a [Measure] to appear dynamically.
This commit is contained in:
JamesAC 2012-01-29 18:59:22 +00:00
parent d302561618
commit 55fe503636
3 changed files with 12 additions and 0 deletions

View File

@ -949,6 +949,12 @@ void CMeterWindow::RunBang(BANGCOMMAND bang, const WCHAR* arg)
}
break;
case BANG_SETCLIP:
{
CSystem::SetClipboardText(arg);
}
break;
case BANG_PLUGIN:
{
std::wstring args = arg;

View File

@ -148,6 +148,8 @@ enum BANGCOMMAND
BANG_DISABLEMEASUREGROUP,
BANG_UPDATEMEASUREGROUP,
BANG_SETCLIP,
BANG_PLUGIN,
BANG_SETVARIABLE,
BANG_SETOPTION,

View File

@ -1653,6 +1653,10 @@ BOOL CRainmeter::ExecuteBang(const std::wstring& bang, const std::wstring& arg,
{
BangWithArgs(BANG_SETTRANSPARENCY, args, 1);
}
else if (_wcsicmp(name, L"SetClip") == 0)
{
BangWithArgs(BANG_SETCLIP, args, 1);
}
else if (_wcsicmp(name, L"SetVariable") == 0)
{
BangWithArgs(BANG_SETVARIABLE, args, 2);