Home Forums Breakaway Professional Products – [discontinued] Volume API Breakaway Live

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3188
    Dj Buik
    Member

    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

    #14265
    JesseG
    Member

    does your code have logging so you know where it's failing?  ::)

    #14266
    Dj Buik
    Member

    Ok 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:&nbsp; &nbsp; &nbsp; &nbsp; myName<br /><br /> Script Function:<br /> Template AutoIt script.<br /><br />#ce ----------------------------------------------------------------------------<br /><br />Opt(&quot;WinTitleMatchMode&quot;, 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase<br />Opt(&quot;SendKeyDelay&quot;, 50) ;5 milliseconds<br />Opt(&quot;SendKeyDownDelay&quot;, 5) ;1 millisecond<br /><br />#include &lt;MsgBoxConstants.au3&gt;<br />#include &lt;SendMessage.au3&gt;<br />#include &lt;WinAPI.au3&gt;<br /><br />$hWndBa = _WinAPI_FindWindow( NULL, &quot;BreakawayLiveUtilityWindow_0xBA31337&quot; )<br />;_WinAPI_FindWindow ( $sClassName, $sWindowName )<br />MsgBox($MB_SYSTEMMODAL, &quot;$hWndBa: &quot;, $hWndBa)<br /><br />$msgGetVolume = _WinAPI_RegisterWindowMessage(&quot;BaGetVolume&quot;)<br />MsgBox($MB_SYSTEMMODAL, &quot;&quot;, $msgGetVolume)<br />$msgSetVolume = _WinAPI_RegisterWindowMessage(&quot;BaSetVolume&quot;)<br />MsgBox($MB_SYSTEMMODAL, &quot;&quot;, $msgSetVolume)<br />;_WinAPI_RegisterWindowMessage ( $sMessage )<br /><br />$vol_Step = 1<br /><br />HotKeySet(&quot;{VOLUME_MUTE}&quot;, &quot;HotKeyPressed&quot;)<br />HotKeySet(&quot;{VOLUME_DOWN}&quot;, &quot;HotKeyPressed&quot;)<br />HotKeySet(&quot;{VOLUME_UP}&quot;, &quot;HotKeyPressed&quot;)<br />HotKeySet(&quot;{ESC}&quot;, &quot;HotKeyPressed&quot;)<br /><br />While 1<br />&nbsp; &nbsp; Sleep(100)<br />WEnd<br /><br />Func HotKeyPressed()<br />&nbsp; Switch @HotKeyPressed ; The last hotkey pressed.<br /> &nbsp; Case &quot;{VOLUME_MUTE}&quot; ;<br /> MsgBox($MB_SYSTEMMODAL, &quot;&quot;, &quot;Volume Mute&quot;)<br /> &nbsp; Case &quot;{VOLUME_DOWN}&quot;<br /> ;MsgBox($MB_SYSTEMMODAL, &quot;&quot;, &quot;Volume Down&quot;)<br /> VolumeDown()<br /> &nbsp; Case &quot;{VOLUME_UP}&quot;<br /> ;MsgBox($MB_SYSTEMMODAL, &quot;&quot;, &quot;Volume Up&quot;)<br /> VolumeUp()<br /><br /> &nbsp; Case &quot;{ESC}&quot; ; String is the {ESC} hotkey.<br /> MsgBox($MB_SYSTEMMODAL, &quot;&quot;, &quot;Escape&quot;)<br /> Exit<br />&nbsp; &nbsp; EndSwitch<br />EndFunc&nbsp; ;==&gt;HotKeyPressed<br /><br />Func VolumeUp()<br />&nbsp; $volume = _SendMessage(hWndBa, $msgGetVolume, 0, 0)<br />&nbsp; $volume = $volume + $vol_Step<br />&nbsp; _SendMessage(hWndBa, $msgSetVolume, 0, $volume )<br />&nbsp; ;_SendMessage ( $hWnd, $iMsg [, $wParam = 0 [, $lParam = 0 [, $iReturn = 0 [, $wParamType = &quot;wparam&quot; [, $lParamType = &quot;lparam&quot; [, $sReturnType = &quot;lresult&quot;]]]]]] )<br />EndFunc<br /><br />func VolumeDown()<br />&nbsp; $volume = _SendMessage(hWndBa, $msgGetVolume, 0, 0)<br />&nbsp; $volume = $volume - $vol_Step<br />&nbsp; _SendMessage(hWndBa, $msgSetVolume, 0, $volume )<br />EndFunc<br />
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Breakaway Professional Products – [discontinued]’ is closed to new topics and replies.