DONE: Volume Mixer instead of Master Volume Control - DonationCoder.com
Welcome Guest.   Make a donation to an author on the site May 23, 2015, 06:58:04 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Read the Practical Guide to DonationCoder.com Forum Search Features
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: Volume Mixer instead of Master Volume Control  (Read 2193 times)
guerillablood
Participant
*
Posts: 12

View Profile Give some DonationCredits to this forum member
« on: July 03, 2014, 10:20:50 AM »

I'm looking for a better way to get to my volume mixer in one click, preferably without having to run another volume control program.

I was wondering if it's possible a AutoHotKey script could change this behavior to where I can click the volume icon in the tray and instead of getting the master volume control, it'd display the mixer, but in a window that functions like the master volume control in that, it is undecorated (no title bar/window borders) and hides/closes when it loses focus. If not a script perhaps a safe registry hack? Wink

I already have a simple AHK script that allows me to hold control and click the middle mouse button on the taskbar to get mixer to pop up in a new window (as it normally functions when you click the master volume control and click "Mixer") but I'm wondering if someone could put together a better way to accomplish this.

I'm willing to bet there is another 3rd party mixer that will do this for me, but I'd rather not install another program since the Windows 7 volume mixer does the job just fine and portability in something like an AHK script is preferred. Though I am open to suggestions of programs (with a focus on being as lightweight and portable as possible) if this request is simply too picky.
Logged
MilesAhead
Supporting Member
**
Posts: 5,691



View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: July 03, 2014, 04:15:42 PM »

See if this works as expected.

[copy or print]
~LButton  Up::
Sleep 250
If  (WinActive("ahk_exe SndVol.exe") )
    Send,!x
return

The 250 is a quarter second delay to allow the window to open.  I've found 250 ms to be a good value for this purpose generally.

If you notice any delay or strange behavior in left button mouse click then it may need to be modified.  But the tilde prefix on the hotkey should allow the system to process mouse clicks normally... I hope.   smiley

Edit:  I put a shortcut on my desktop because it can be difficult to click on a tray icon when the system is loading.  I forget where I got the Target line from.  But it opens the mixer:

%windir%\System32\SndVol.exe -T 49490633

« Last Edit: July 03, 2014, 05:28:42 PM by MilesAhead » Logged

guerillablood
Participant
*
Posts: 12

View Profile Give some DonationCredits to this forum member
« Reply #2 on: July 04, 2014, 08:39:38 AM »

Thanks Miles, the script works fine, but it didn't quite achieve what I was going for.

I already have a hotkey to open the mixer, I was just looking for something that changed the behavior of the mixer window slightly so that it would auto close when it lost focus.
Logged
MilesAhead
Supporting Member
**
Posts: 5,691



View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: July 04, 2014, 09:21:40 AM »

Thanks Miles, the script works fine, but it didn't quite achieve what I was going for.

I already have a hotkey to open the mixer, I was just looking for something that changed the behavior of the mixer window slightly so that it would auto close when it lost focus.

OK.  Let me see if I can add that.
Logged

MilesAhead
Supporting Member
**
Posts: 5,691



View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: July 04, 2014, 10:36:45 AM »

Please try this one

[copy or print]
#SingleInstance force
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

GotFocus := false

~LButton  Up::
Sleep 250
If  (WinActive("ahk_exe SndVol.exe") )
{
    Send,!x
    GotFocus := true
    Settimer, CheckFocus
}
return

CheckFocus:
If  (WinActive("ahk_exe SndVol.exe") )
    return
    SetTimer,,Off
   ; If GotFocus is false window is likely not open anyway
    if (GotFocus)
    {
      WinClose, ahk_exe SndVol.exe
     GotFocus := false
    }
return
« Last Edit: May 20, 2015, 07:20:29 AM by MilesAhead » Logged

guerillablood
Participant
*
Posts: 12

View Profile Give some DonationCredits to this forum member
« Reply #5 on: July 04, 2014, 01:59:39 PM »

Outstanding, works magnificently. Thank you!

The wonderful people over here at DonationCoder never cease to surprise me. Any suggestion for getting a borderless/undecorated/no title bar appearance?
Logged
skwire
Global Moderator
*****
Posts: 4,357



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: July 04, 2014, 03:01:58 PM »

Nice work, MilesAhead.  I'll move this to the finished section.
Logged

MilesAhead
Supporting Member
**
Posts: 5,691



View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: July 04, 2014, 03:21:40 PM »

Outstanding, works magnificently. Thank you!

The wonderful people over here at DonationCoder never cease to surprise me. Any suggestion for getting a borderless/undecorated/no title bar appearance?

Glad you like it.  You could play around with WinGet and WinSet changing the window style and exstyle attributes.  TopMost Toggle does it for Topmost style.  It has source and you can download here:
milesaheadsoftware.tk

The ahk help has a chart with the styles.  What you describe sounds like Toolbar but I'm not sure.

Logged

MilesAhead
Supporting Member
**
Posts: 5,691



View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: July 04, 2014, 03:22:41 PM »

Nice work, MilesAhead.  I'll move this to the finished section.

Logged

horroq
Participant
*
Posts: 1


View Profile Give some DonationCredits to this forum member
« Reply #9 on: May 19, 2015, 07:52:39 PM »

Please help me . I want to have volume mixer instead of master volume but I didn't understood What I have to do . Coul you place help me ?
Logged
tomos
Charter Member
***
Posts: 9,165



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #10 on: May 20, 2015, 06:04:11 AM »

Please help me . I want to have volume mixer instead of master volume but I didn't understood What I have to do . Coul you place help me ?

hi horroq,
download AutoHotKey (AHK) from this page:
http://ahkscript.org/
(there's portable and installable versions there)

Now save the script below (click the copy or print link and save with a .ahk file-ending e.g. VolumeMixer.ahk

Please try this one

[copy or print]
#SingleInstance force
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

GotFocus := false

~LButton  Up::
Sleep 250
If  (WinActive("ahk_exe SndVol.exe") )
{
    Send,!x
    GotFocus := true
    Settimer, CheckFocus
}
return

CheckFocus:
If  (WinActive("ahk_exe SndVol.exe") )
    return
    SetTimer,,Off
    WinClose, ahk_exe SndVol.exe
return

Open the script with AutoHotKey.
I havent used this script so not sure what it does.
It will show in the system tray - you can right-click the icon there for options
Logged

Tom
MilesAhead
Supporting Member
**
Posts: 5,691



View Profile WWW Give some DonationCredits to this forum member
« Reply #11 on: May 20, 2015, 07:14:37 AM »

Quote from: tomos
I havent used this script so not sure what it does.

I forgot what it did myself.  After trying it I remembered.  If it is running and you click the mouse on the speaker in the task tray, as soon as the volume control comes up it sends alt x to make the mixer come up.  Then if you click somewhere else, like on the desktop, it closes the mixer window.  Hmmm, I think I should add that to my general purpose hotkey file and use it myself.  smiley


Edit: I see where I didn't use the variable GotFocus for anything.  I guess I should check it before bothering to close SndVol.exe.  I'll edit the script.  smiley
Logged

MilesAhead
Supporting Member
**
Posts: 5,691



View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: May 20, 2015, 08:47:12 AM »

Here is the script with a few enhancements and a custom icon, compiled to exe.
The source and icon are included.  I added a global hotkey, control shift v
to open the volume mixer.  Also single clicking on the SoundMixer.exe tray icon
will do it.

See about command in tray menu and/or Readme.txt file included in the .zip

You may download SoundMixer.zip from my page:
http://milesaheadsoftware.org

Edit: seems the upload is corrupt.  The connection died in the middle.  I'll add another edit when I get the file to the page and check the MD5 to make sure it's OK.

Edit2:  Been trying since 8:47 AM to upload a 365 kb zip file.  Goes all the way until I click Upload Button.  T"hen it's time for the spinning circle.  I'll let you know if it ever gets there.  smiley

Edit3:  I finally got through.  I downloaded and the MD5Sum is a match.  I'm running the program from the download now.  It should be OK.   Thmbsup

Edit4: I am back in the same boat.  I tried to upload a revised zip file and it connects just long enough to corrupt the file on the server.  As soon as I try to upload then I cannot upload or download anything.  All I get is the dreaded spinning circle.  If I get the file on I'll post Edit #5.  smiley


Edit5:  OK. Uploaded new zip.  Download it and checked MD5Sum.  Seems we are good now.  smiley

« Last Edit: May 21, 2015, 08:54:30 AM by MilesAhead » Logged

MilesAhead
Supporting Member
**
Posts: 5,691



View Profile WWW Give some DonationCredits to this forum member
« Reply #13 on: May 22, 2015, 12:22:28 PM »

Updated to version 1.1.0.0.  I redesigned it to be a bit more automatic.  You should notice after opening the Volume Mixer using it, when you click someplace else, it closes the window more consistently.  Also I removed the test for the Volume Mixer Window after every Left Mouse Button release.  It uses polling at1/4 second intervals.  Much smoother.  Less chance of side effects.

Also it ignores commands while the About Box is open.  See Readme.txt file included in the zip for the gory details.  smiley
Logged

Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.062s | Server load: 0.04 ]


Share on Facebook
submit to reddit