Author Topic: Mute State Token  (Read 4060 times)

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Mute State Token
« on: April 17, 2017, 10:55:47 AM »
Would it be possible to add a token that returns the current mute state of the PC? Maybe something like "{STATE_MUTE}" that returns 1 or 0 or maybe "true" or "false?" Mute state for apps would also be neat to have.

Thanks!


EDIT by Pfeil: The tokens described by Gary have been implemented
« Last Edit: April 18, 2020, 08:49:43 AM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Mute State Token
« Reply #1 on: April 17, 2017, 11:13:31 AM »
Have you tried the tokens, '{STATE_APPVOL}' and '{STATE_SYSVOL}'?

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: Mute State Token
« Reply #2 on: April 17, 2017, 11:29:04 AM »
True, those could be used to identify when the volume is zero (functionally equivalent to mute) or non-zero (unmutted).

However since Windows uses different taskbar icons to indicate zero volume and "mute" and VoiceAttack can execute commands that change the mute state, I figured that the final progressive step would be to have a mute state token to report the mute state. I don't know much about the inner workings of VoiceAttack, but wouldn't VoiceAttack need to track the mute state behind the scenes in order to make the "Toggle Mute" action work correctly?

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Mute State Token
« Reply #3 on: April 17, 2017, 12:05:22 PM »
I can see what can be done...  I'll probably be working with tokens later today so I'll find out if that's easy to just pop in.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2827
Re: Mute State Token
« Reply #4 on: April 17, 2017, 06:19:48 PM »
This was easy enough to throw in.  Three new tokens will be in the next release:  '{STATE_SYSMUTE}', '{STATE_APPMUTE}' and '{STATE_MICMUTE}'.  They all work just like their volume counterparts, except they return '1' or '0'.  No ETA, as I've got the guts out on the code, atm.


Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: Mute State Token
« Reply #5 on: April 18, 2017, 07:52:23 AM »
Wicked cool. I was hoping it would be a relatively easy addition. Your (and the community's) responsiveness continues to impress  ;D