Announcement

Collapse
No announcement yet.

SCRIPTING NOVICE: Mute/Unmute (Take 2)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sparkman
    replied
    Originally posted by JimSpy View Post

    Well, that certainly makes it easier. The online Help file makes it look like it has to be in .vb format.

    Thank you, I'll give it a try.
    You're welcome. It is still in vb format, however, the help file shows how the function is defined within the HS vb libraries/code, not how it is intended to be used.

    Cheers
    Al

    Leave a comment:


  • JimSpy
    replied
    Originally posted by sparkman View Post

    Yes, launch will work if you are using a script or you can trigger it direct in an event as well.

    The syntax should be:

    Code:
    Dim x as Integer
    x = hs.Launch("C:\Users\Speiser's\Desktop\soundvolumeview\SoundVolumeView", "/mute", "" , 0)
    Well, that certainly makes it easier. The online Help file makes it look like it has to be in .vb format.

    Thank you, I'll give it a try.

    Leave a comment:


  • sparkman
    replied
    Originally posted by JimSpy View Post

    OK, I finally got back around to this. That's going to work. Now, I just have to learn how to call it in a script. Do I use the "Launch" function? And if so, how do I set the parameters? I have it as...

    Function Launch(byVal "C:\Users\Speiser's\Desktop\soundvolumeview\SoundVolumeV iew" As String, byVal "/mute" As String, byVal "" As String, byVal 0 As Integer) As Integer

    ...but of course that doesn't work.
    Yes, launch will work if you are using a script or you can trigger it direct in an event as well.

    The syntax should be:

    Code:
    Dim x as Integer
    x = hs.Launch("C:\Users\Speiser's\Desktop\soundvolumeview\SoundVolumeView", "/mute", "" , 0)

    Leave a comment:


  • JimSpy
    replied
    Originally posted by sparkman View Post
    There's also this one: https://www.nirsoft.net/utils/sound_volume_view.html. It has a GUI, but also a command line interface.
    OK, I finally got back around to this. That's going to work. Now, I just have to learn how to call it in a script. Do I use the "Launch" function? And if so, how do I set the parameters? I have it as...

    Function Launch(byVal "C:\Users\Speiser's\Desktop\soundvolumeview\SoundVolumeV iew" As String, byVal "/mute" As String, byVal "" As String, byVal 0 As Integer) As Integer

    ...but of course that doesn't work.

    Leave a comment:


  • sparkman
    replied
    There's also this one: https://www.nirsoft.net/utils/sound_volume_view.html. It has a GUI, but also a command line interface.

    Leave a comment:


  • sparkman
    replied
    Originally posted by JimSpy View Post
    (Sigh) I guess nothing can be easy.


    I had posted a much longer message under a similar title, but got no responses. I figure it was too complicated, so I tried simplifying, and got you! (No inferences to be drawn!)
    LOL, must have missed your first message.

    The other option (and likely much simpler) is to use this utility: https://www.nirsoft.net/utils/nircmd.html. You can run external programs through events or scripts. Run it manually first to see if it works on your system.

    Leave a comment:


  • JimSpy
    replied
    (Sigh) I guess nothing can be easy.


    Try what again?
    I had posted a much longer message under a similar title, but got no responses. I figure it was too complicated, so I tried simplifying, and got you! (No inferences to be drawn!)

    Leave a comment:


  • sparkman
    replied
    Try what again? There are no built-in HS scripting commands to do so, but those functions should be accessible by .NET. A Google search found a few ways, but seems to be hit and miss. One option may be the NAudio library: https://github.com/naudio/NAudio. It has way more functionality, than just muting/unmuting but I believe it does have functions for that.

    Leave a comment:


  • JimSpy
    started a topic SCRIPTING NOVICE: Mute/Unmute (Take 2)

    SCRIPTING NOVICE: Mute/Unmute (Take 2)

    OK, let's try this again: Is there a way to mute or unmute a computer's sound card through scripting?
Working...
X