Klovis Posted June 28, 2011 Share Posted June 28, 2011 Well few questions here: How would I grab the data of the current % of the master volume? I know you can change the volume of this SoundPlay(@ScripDir & "/Song.mp3") But how do you change the master volume in all on going programs? Link to comment Share on other sites More sharing options...
TomDuDolan Posted June 28, 2011 Share Posted June 28, 2011 (edited) Well few questions here: How would I grab the data of the current % of the master volume? I know you can change the volume of this SoundPlay(@ScripDir & "/Song.mp3") But how do you change the master volume in all on going programs? on Windows XP it's SetSound, on Vista it's a dll call job, and on WIndows 7, it fails. I have a radio app, works fine on all but 7 even with DLLCall. EDIT: Adding link. Edited June 28, 2011 by TomDuDolan My ickle pieces of software :3Radio Scriptr //Almost completeSimple IP/URL pinger, my first program. //CompletedSimple Downloader // Working - basic stateOn-GoingRadio Scriptr - Radio Server. Link to comment Share on other sites More sharing options...
Klovis Posted June 28, 2011 Author Share Posted June 28, 2011 on Windows XP it's SetSound, on Vista it's a dll call job, and on WIndows 7, it fails.I have a radio app, works fine on all but 7 even with DLLCall.EDIT: Adding link.you cant be serious... all the systems I have are 7well the Send("{Volume_UP}") works so it's just a matter of getting the value right? Link to comment Share on other sites More sharing options...
TomDuDolan Posted June 28, 2011 Share Posted June 28, 2011 you cant be serious... all the systems I have are 7well the Send("{Volume_UP}") works so it's just a matter of getting the value right?Yeah I guess so, but are your volumes actually changing?If so, could you try my radio app and report back? 5 people on windows 7 is having issues.-T My ickle pieces of software :3Radio Scriptr //Almost completeSimple IP/URL pinger, my first program. //CompletedSimple Downloader // Working - basic stateOn-GoingRadio Scriptr - Radio Server. Link to comment Share on other sites More sharing options...
Klovis Posted June 28, 2011 Author Share Posted June 28, 2011 Yeah I guess so, but are your volumes actually changing?If so, could you try my radio app and report back? 5 people on windows 7 is having issues.-T sure let me try it Link to comment Share on other sites More sharing options...
TomDuDolan Posted June 28, 2011 Share Posted June 28, 2011 sure let me try itAlright thanks,here's the link, Cheers. My ickle pieces of software :3Radio Scriptr //Almost completeSimple IP/URL pinger, my first program. //CompletedSimple Downloader // Working - basic stateOn-GoingRadio Scriptr - Radio Server. Link to comment Share on other sites More sharing options...
Klovis Posted June 28, 2011 Author Share Posted June 28, 2011 nope... did't work Link to comment Share on other sites More sharing options...
TomDuDolan Posted June 28, 2011 Share Posted June 28, 2011 Hmm, what's the line you're using for your volume? Is it based on Hotkeys? If you could be kind enough, could you PM me your volume code, if it's working on 7? Credits will be given. -T My ickle pieces of software :3Radio Scriptr //Almost completeSimple IP/URL pinger, my first program. //CompletedSimple Downloader // Working - basic stateOn-GoingRadio Scriptr - Radio Server. Link to comment Share on other sites More sharing options...
Klovis Posted June 28, 2011 Author Share Posted June 28, 2011 (edited) Hmm, what's the line you're using for your volume? Is it based on Hotkeys? If you could be kind enough, could you PM me your volume code, if it's working on 7? Credits will be given. -T Sure, anything to help the community! expandcollapse popup#include <GUIConstantsEx.au3> #include <SliderConstants.au3> #include <WindowsConstants.au3> $s = 0 Do Send("{Volume_down}") $s += 1 Until $s = 99 ;as you can see since I couldn't grab the volume variable I made it something I would know. $s2 = 0 ;I don't use this idk why I have it $v = 0 #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Volume Kon", 152, 48, 192, 114) $Slider1 = GUICtrlCreateSlider(0, 0, 150, 45) GUICtrlSetLimit($Slider1, 100, 0) GUICtrlSetData($Slider1, 0) $hSlider = GUICtrlGetHandle($Slider1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUIRegisterMsg($WM_HSCROLL,"hscroll") ;for instant volume control While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func hscroll($hWnd, $iMsg, $iwParam, $ilParam) If $ilParam = $hSlider Then $sr = GUICtrlRead($Slider1) If $sr > $v Then ;and now I play the matching game... Do $v += 1 Send("{Volume_up}") Until $v = $sr ElseIf $sr < $v Then Do $v -= 1 Send("{Volume_down}") Until $v = $sr EndIf EndIf Return "GUI_RUNDEFMSG" EndFunc Edited June 28, 2011 by Klovis Link to comment Share on other sites More sharing options...
TomDuDolan Posted June 28, 2011 Share Posted June 28, 2011 (edited) Sure, anything to help the community! expandcollapse popup#include <GUIConstantsEx.au3> #include <SliderConstants.au3> #include <WindowsConstants.au3> $s = 0 Do Send("{Volume_down}") $s += 1 Until $s = 99 ;as you can see since I couldn't grab the volume variable I made it something I would know. $s2 = 0 ;I don't use this idk why I have it $v = 0 #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Volume Kon", 152, 48, 192, 114) $Slider1 = GUICtrlCreateSlider(0, 0, 150, 45) GUICtrlSetLimit($Slider1, 100, 0) GUICtrlSetData($Slider1, 0) $hSlider = GUICtrlGetHandle($Slider1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUIRegisterMsg($WM_HSCROLL,"hscroll") ;for instant volume control While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func hscroll($hWnd, $iMsg, $iwParam, $ilParam) If $ilParam = $hSlider Then $sr = GUICtrlRead($Slider1) If $sr > $v Then ;and now I play the matching game... Do $v += 1 Send("{Volume_up}") Until $v = $sr ElseIf $sr < $v Then Do $v -= 1 Send("{Volume_down}") Until $v = $sr EndIf EndIf Return "GUI_RUNDEFMSG" EndFunc Thanks, will have it integrated soon, will give you credits in the source and in the 'about' box. Cheers. -T EDIT: Working like a charm on Win XP, Vista and 7 now! Thanks! Edited June 28, 2011 by TomDuDolan My ickle pieces of software :3Radio Scriptr //Almost completeSimple IP/URL pinger, my first program. //CompletedSimple Downloader // Working - basic stateOn-GoingRadio Scriptr - Radio Server. Link to comment Share on other sites More sharing options...
Klovis Posted June 28, 2011 Author Share Posted June 28, 2011 Thanks, will have it integrated soon, will give you credits in the source and in the 'about' box. Cheers.-TEDIT:Working like a charm on Win XP, Vista and 7 now! Thanks!You're welcome. I can't believe I answered my own question in the forum... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now