17 lines
489 B
Lua
17 lines
489 B
Lua
|
|
local helper = jarvis.context.command_path .. "\\_volume_helper.ps1"
|
||
|
|
local cmd = string.format(
|
||
|
|
'powershell -NoProfile -ExecutionPolicy Bypass -File "%s" -Action up -Times 5',
|
||
|
|
helper
|
||
|
|
)
|
||
|
|
|
||
|
|
local res = jarvis.system.exec(cmd)
|
||
|
|
if res.success then
|
||
|
|
jarvis.log("info", "volume up")
|
||
|
|
jarvis.audio.play_ok()
|
||
|
|
else
|
||
|
|
jarvis.log("error", "volume up failed: code=" .. tostring(res.code) .. " stderr=" .. tostring(res.stderr))
|
||
|
|
jarvis.audio.play_error()
|
||
|
|
end
|
||
|
|
|
||
|
|
return { chain = false }
|