Home › Forums › Breakaway Professional Products – [discontinued] › Volume API Breakaway Live
- This topic has 2 replies, 2 voices, and was last updated 8 years, 5 months ago by Dj Buik.
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
June 7, 2016 at 3:20 pm #3188Dj BuikMember
In Windows 7 i used the Volume API in Breakaway Live to control the volume with a remote control.
This does not seem to work anymore in Windows 10.
Anybody has a clue?http://www.forumclaessonedwards.com/forum/index.php/topic,916.msg6401.html#msg6401
June 7, 2016 at 5:17 pm #14265JesseGMemberdoes your code have logging so you know where it's failing? ::)
June 8, 2016 at 8:04 pm #14266Dj BuikMemberOk here is the (stripped) code. It is coded in AutoIt script language.
(https://www.autoitscript.com)It does not find the BreakawayLiveUtilityWindow_0xBA31337 window.
It returns a zero (0) handle.code :<br />#cs ----------------------------------------------------------------------------<br /><br /> AutoIt Version: 3.3.14.2<br /> Author: myName<br /><br /> Script Function:<br /> Template AutoIt script.<br /><br />#ce ----------------------------------------------------------------------------<br /><br />Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase<br />Opt("SendKeyDelay", 50) ;5 milliseconds<br />Opt("SendKeyDownDelay", 5) ;1 millisecond<br /><br />#include <MsgBoxConstants.au3><br />#include <SendMessage.au3><br />#include <WinAPI.au3><br /><br />$hWndBa = _WinAPI_FindWindow( NULL, "BreakawayLiveUtilityWindow_0xBA31337" )<br />;_WinAPI_FindWindow ( $sClassName, $sWindowName )<br />MsgBox($MB_SYSTEMMODAL, "$hWndBa: ", $hWndBa)<br /><br />$msgGetVolume = _WinAPI_RegisterWindowMessage("BaGetVolume")<br />MsgBox($MB_SYSTEMMODAL, "", $msgGetVolume)<br />$msgSetVolume = _WinAPI_RegisterWindowMessage("BaSetVolume")<br />MsgBox($MB_SYSTEMMODAL, "", $msgSetVolume)<br />;_WinAPI_RegisterWindowMessage ( $sMessage )<br /><br />$vol_Step = 1<br /><br />HotKeySet("{VOLUME_MUTE}", "HotKeyPressed")<br />HotKeySet("{VOLUME_DOWN}", "HotKeyPressed")<br />HotKeySet("{VOLUME_UP}", "HotKeyPressed")<br />HotKeySet("{ESC}", "HotKeyPressed")<br /><br />While 1<br /> Sleep(100)<br />WEnd<br /><br />Func HotKeyPressed()<br /> Switch @HotKeyPressed ; The last hotkey pressed.<br /> Case "{VOLUME_MUTE}" ;<br /> MsgBox($MB_SYSTEMMODAL, "", "Volume Mute")<br /> Case "{VOLUME_DOWN}"<br /> ;MsgBox($MB_SYSTEMMODAL, "", "Volume Down")<br /> VolumeDown()<br /> Case "{VOLUME_UP}"<br /> ;MsgBox($MB_SYSTEMMODAL, "", "Volume Up")<br /> VolumeUp()<br /><br /> Case "{ESC}" ; String is the {ESC} hotkey.<br /> MsgBox($MB_SYSTEMMODAL, "", "Escape")<br /> Exit<br /> EndSwitch<br />EndFunc ;==>HotKeyPressed<br /><br />Func VolumeUp()<br /> $volume = _SendMessage(hWndBa, $msgGetVolume, 0, 0)<br /> $volume = $volume + $vol_Step<br /> _SendMessage(hWndBa, $msgSetVolume, 0, $volume )<br /> ;_SendMessage ( $hWnd, $iMsg [, $wParam = 0 [, $lParam = 0 [, $iReturn = 0 [, $wParamType = "wparam" [, $lParamType = "lparam" [, $sReturnType = "lresult"]]]]]] )<br />EndFunc<br /><br />func VolumeDown()<br /> $volume = _SendMessage(hWndBa, $msgGetVolume, 0, 0)<br /> $volume = $volume - $vol_Step<br /> _SendMessage(hWndBa, $msgSetVolume, 0, $volume )<br />EndFunc<br />
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘Breakaway Professional Products – [discontinued]’ is closed to new topics and replies.