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.
    • RussR
      Russ
      last edited by Russ

      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
      • RussR Russ pinned this topic on
      • N
        Nate Hales
        last edited by

        Actually love this one!

        MeximistasM 1 Reply Last reply Reply Quote 0
        • MeximistasM
          Meximistas @Nate Hales
          last edited by

          @Nate-Hales in spanish?

          RussR 1 Reply Last reply Reply Quote 0
          • RussR
            Russ @Meximistas
            last edited by

            @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