Jump to content

Recommended Posts

Hi Guys, 

So with me working in my Virtual Machines in full screen, I often have my Host OS playing music. Now the issue I had was trying to control the Host OS without having to minimise the Guest OS.

So I thought of this small program. I call it the Volume Control. It resides in the bottom right hand corner of your screen just above the system clock. 
I'm still working on getting the volume buttons to increase/decrease when you hold down the button.
Currently, you will need to tap on the volume buttons numerous times to decrease/increase the volume. 

Any other improvements let me know. 

The source code, icon and compiled program are already in the zip. 

 


 

Volume Controlv1.zip

Screenshot.bmp

Kind Regards
Skeletor

"I need coffee to turn me back to a human"

Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen

Link to post
Share on other sites

Hey there Trong, it would, however as mentioned, I work with virtual machines that do not alter the HOST OS's volume if I'm playing music in the HOST OS. That's why I created this little program.

Kind Regards
Skeletor

"I need coffee to turn me back to a human"

Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen

Link to post
Share on other sites
  • 4 years later...

Hello all.
So sorry to dig up an old topic, just want to give a small contribution for those that need a fast way to set volume up/down and do not own a multimedia keyboard.
So... on a modern keyboard we have the [Fn] key, witch is usually used to various multimedia functions... I think that the most important is the volume up and down.

I've recently bought a keyboard with no [Fn] key, so I've searched the net for a small script that would help me find a way to have sound volume settings directly from my keyboard, so I've found this topic, witch is good, but not as simple as I'd like... so I've made my own script.

If some of you are looking for this same feature, no need for further search... just look below

HotKeySet("^{PGUP}", "vup")
HotKeySet("^{PGDN}", "vdwn")
While 1
    Sleep (1000)
WEnd
Func vup()
        Sleep (5)
        Send ("{VOLUME_UP}")
EndFunc
Func vdwn()
        Sleep (5)
        Send ("{VOLUME_DOWN}")
EndFunc

This simple script will remain visible on your taskbar as long as you want

[Ctrl] + [Page Up] => Volume up
[Ctrl] + [Page Down] => Volume down

EXIT => click on icon in task bar

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By nacerbaaziz
      hello guys, please i need your help
      am trying to work with CreateWindowEx api, i created the window with it controls, also i setup the call back function
      i'am using WinMSGLoop to focus with the keyboard.
      here i have a problem, i hope that you can help me.
      on the controls i used the UDF that comme with the autoit, such as _GUIButton_Create, _GUIListBox_Create....
      but i can't find a STATIC control UDF, for that i used this

      local $h_ssrvlbl = _WinAPI_CreateWindowEx(0, "STATIC", "الخادم", BitOr($WS_VISIBLE, $WS_CHILD, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN), 250, 10, 100, 20, $hWnd)
      as you can see here, there is an arabic text, so here is the problem, the arabic text isn't show normally, what is the problem here?
      also i have  an other question about keyboard focus, when i used WinMSGLoop, it worked, but if i press alt+tab to switch windows or focus an other window and return back to my window, the focus of control is kill.
      can any one help me to solve that please?
      my code will be as file here with the include files
      i hope can any one help me here
      thanks in advance
       
      speed Test win.zip
    • By shelly
      Here is the below code for handling pop-up when window is  inactive ..but I don't know how to change sleep and when i run this script it runs sometimes and sometimes it stops .
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{SPACE}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{DOWN}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{ENTER}")
      --- these 3 lines never worked while TAB lines works sometimes but not in accurate way
      I am new too AutoIt .. help me out why this script behaves in strange way
      ControlFocus("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog", "", "Internet Explorer_Server1","1")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog", "", "Internet Explorer_Server1","the request is send")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{SPACE}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{DOWN}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      Sleep(3000)
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{TAB}")
      ControlSend("Policy Decisions -- Webpage Dialog","","Internet Explorer_Server1","{ENTER}")
       
    • By nacerbaaziz
      good morning autoit team
      please i need your help
      am trying to make an program that work with hotkeys
      it function is to change the volume to the current application
      e.g when i select the vlc window by using this hotkey i will be able to change the vlc volume with out changing the system volume.
       am able to get the process handle and the process name of the window
      but when am trying to get or set the volume i does not succeded
      i tried to search in this forums but no result.
      can you please guide me to do that.
      am waiting for your answers
      thanks in advanced
    • By BlueSkyMemory
      Hello guys! I'm a rookie in AutoIt lol.
      I've tried to looking up in MSDN and the UDFs, but it can only get the GUID of a usual partition and with the GUID to control it. Now I have no ways😥.
      Thanks a lot for your help!
    • By PeterVerbeek
      Hi Guys,
      I've noticed that the SoundGetWaveVolume UDF in an older topic isn't working on Windows Vista, 7, 8, 8.1 and 10. It's probably a Windows XP UDF. The UDF below does work. It successfully returns the volume set by SoundSetWaveVolume. It might need checking by the AutoIt community for some synthax finetuning.
      ; #FUNCTION# ==================================================================================================================== ; Name...........: _SoundGetWaveVolume ; Description....: Returns app volume of script, Windows Vista, 7, 8, 10 only ; Syntax.........: _SoundGetWaveVolume([$iValueOnError = -1]) ; Parameters.....: $iValueOnError - Value to return when an error occurs ; Return values..: App volume of script or $iValueOnError at an error ; Error values...: @error = 1 - Unable to create Struct ; @error = 2 - Dll file not found ; @error = 3 - Wrong call so not on Windows Vista, 7, 8 or 10 ; @error = 4 - Internal error, array not returned ; @error = 5 - Volume wasn't received ; @error = 6 - Volume couldn't read ; Author.........: Peter Verbeek ; Modified.......: ; =============================================================================================================================== Func _SoundGetWaveVolume($iValueOnError = -1) Local $LPDWORD,$aMMRESULT,$iVolume $LPDWORD = DllStructCreate("dword") If @error <> 0 Then SetError(1) ; 1 = unable to create Struct Return $iValueOnError EndIf ; get app volume of this script $aMMRESULT = DllCall("winmm.dll","uint","waveOutGetVolume","ptr",0,"long_ptr",DllStructGetPtr($LPDWORD)) Switch @error Case 1 SetError(2) ; 2 = dll file not found Return $iValueOnError Case 2,3,4,5 SetError(3) ; 3 = wrong call so not on Windows Vista, 7, 8 or 10 Return $iValueOnError EndSwitch If not IsArray($aMMRESULT) Then SetError(4) ; 4 = internal error, array not returned Return $iValueOnError EndIf If $aMMRESULT[0] <> 0 Then SetError(5) ; 5 = volume wasn't received Return $iValueOnError EndIf $iVolume = DllStructGetData($LPDWORD,1) If @error <> 0 Then SetError(6) ; 6 = volume couldn't read Return $iValueOnError EndIf Return Round(100*$iVolume/4294967295) ; return in range 0 to 100 as SoundSetWaveVolume() EndFunc  
×
×
  • Create New...