Author Topic: just a couple of little things  (Read 2418 times)

Astral_Nomad

  • Newbie
  • *
  • Posts: 14
just a couple of little things
« on: December 17, 2020, 01:13:13 PM »
Gary -
1) can you please add a mod math function (ie. finding remainder from a division)
  if its already been added, i apologize and couldnt find anything about it in the manual.
  if it hasnt been, heres the expression needed to calculate it.
     remainder = value - (((int)(value / modFactor)) * modFactor)
  For example.. where value is 146, and the mod is 12 -
    remainder = 146-(int(146/12)*12) = 2

  I personally would just code it myself but i completely do not understand how to build a suitable plugin to use it in VA and there are no video tutorials to properly/sufficiently explain how.

2) Can you also please add a status flag to the tokens that would test to see if a specific process is running or not. The reason for this is so that VA can check to see if an app is already running so it can determine if the app needs to be launched if it hasnt been already. Something like a {PROCESSEXISTS:processname} bool would suffice.

For example, i have a large steam library and require steam to be open before i can play any of the games. If its already running, i can just trigger the game to start - but if its not then VA needs to start steam first before it can launch the game.

Just a couple ideas. Thanks for any help.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4781
  • RTFM
Re: just a couple of little things
« Reply #1 on: December 17, 2020, 01:19:15 PM »
The "Set an Integer Value" action, "Set a Decimal Value" action, and the "{EXP:}" token all have a modulus function... (the first and third features can be found by searching the documentation for "modulus")


And:
Quote from: VoiceAttackHelp.pdf v1.8.8+ page 162
{PROCESSEXISTS:textVariable} – Returns “1” if a process with the name specified in textVariable exists. Returns “0” if not.
Note that this can take wildcards (*). For instance, if textVariable contains '*notepad*' (without quotes), the search will look for a process that has a name that contains 'notepad'.

Astral_Nomad

  • Newbie
  • *
  • Posts: 14
Re: just a couple of little things
« Reply #2 on: December 18, 2020, 05:28:31 PM »
thanks.