• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Volume script

Windows
3
4
1.1k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    Russ
    last edited by Russ Sep 4, 2023, 12:37 AM Sep 4, 2023, 12:26 AM

    This is my current Windows batch script to set the volume on my laptop using nircmd.

    I can say, "Alexa, set volume on laptop 90" to set the volume to 90 percent, or Alexa, turn off volume on laptop" to mute it.

    @echo off
    
    if "%1"=="" goto :usage
    if "%1"=="on" goto :on
    if "%1"=="off" goto :off
    goto percent
    
    :on
    echo Unmuting volume
    nircmd mutesysvolume 0
    goto done
    
    :off
    echo Muting volume
    nircmd mutesysvolume 1
    goto done
    
    :percent
    set percent=%1%
    echo Setting volume to %percent% percent
    set /a "num=65535*(percent %% 101)/100"
    nircmd setsysvolume %num%
    goto done
    
    :usage
    echo %0 on, off, or 1-100
    echo For example, these commands will mute the volume:
    echo %0 off
    echo %0 0
    
    :done
    echo Done.
    

    9d96f5d6-58a3-4889-97eb-5fad5c1b71ec-image.png

    Russell VanderMey

    1 Reply Last reply Reply Quote 0
    • R Russ pinned this topic on Sep 4, 2023, 12:37 AM
    • N
      Nate Hales
      last edited by Oct 12, 2023, 7:35 AM

      Actually love this one!

      M 1 Reply Last reply Nov 15, 2023, 11:20 AM Reply Quote 0
      • M
        Meximistas @Nate Hales
        last edited by Nov 15, 2023, 11:20 AM

        @Nate-Hales in spanish?

        R 1 Reply Last reply Nov 15, 2023, 1:08 PM Reply Quote 0
        • R
          Russ @Meximistas
          last edited by Nov 15, 2023, 1:08 PM

          @Meximistas, I think Alexa would accept one of these:

          establecer volumen 90
          subir el volumen a 90
          

          You'd make the Voice field volumen instead of volume.

          Russell VanderMey

          1 Reply Last reply Reply Quote 0
          • First post
            Last post