Author Topic: The most obvious feature request  (Read 9542 times)

Artiom

  • Guest
The most obvious feature request
« on: August 23, 2016, 12:00:43 PM »
apart from the rest, isn't there a way to pass a parameter to a command? I haven't found such a thing. But I can't think of anything else which could help VoiceAttack more.

This is my first "program" and honestly I can't look at this w/o shuddering:



Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: The most obvious feature request
« Reply #1 on: August 23, 2016, 12:49:37 PM »
What are you looking to "pass" to a command? Can it not be done using a value(variable)?

Elmegaard

  • Guest
Re: The most obvious feature request
« Reply #2 on: August 24, 2016, 10:24:39 AM »
I think what he means is, that you can say:
"Shield" {parameter} {parameter}

Example:
Shield Back 50%
Shield Front 50%

And in the macro you would be able to filter on these parameters and execute different commands based on it. This would make all his "Shield" commands compromised to one single Macro in VoiceAttack.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: The most obvious feature request
« Reply #3 on: August 24, 2016, 02:12:52 PM »
I think what he means is, that you can say:
"Shield" {parameter} {parameter}

That's already possible:

Shield [Back;Front] 50%
Code: [Select]
Begin Text Compare : [{CMD}] Contains 'Front'
    Press NumPad 8 key and hold for 0,01 seconds and release
Else
    Press NumPad 2 key and hold for 0,01 seconds and release
End Condition

It's in the manual under "Dynamic command sections".

Artiom

  • Guest
Re: The most obvious feature request
« Reply #4 on: August 25, 2016, 01:55:00 PM »
That's already possible:

Shield [Back;Front] 50%
Code: [Select]
Begin Text Compare : [{CMD}] Contains 'Front'
    Press NumPad 8 key and hold for 0,01 seconds and release
Else
    Press NumPad 2 key and hold for 0,01 seconds and release
End Condition

It's in the manual under "Dynamic command sections".

So you have to _repeat_ every variant in the code, right? Because by itself pattern isn't resolved to something sensible, like an array of matches. If there was an array, we cound access the keywords by index like it's done in PHP preg_match for example. But there are no arrays in VA. Also, if we had arrays, we could create one single array for ALL the keybindings of a game and use it from anywhere.

As for variables, I don't see other ways except this ugly one: setting global variables for passing arguments.


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: The most obvious feature request
« Reply #5 on: August 25, 2016, 03:06:46 PM »
So you have to _repeat_ every variant in the code, right? Because by itself pattern isn't resolved to something sensible, like an array of matches. If there was an array, we cound access the keywords by index like it's done in PHP preg_match for example.
I'm not sure what you're looking for, though there is no regular expression support(currently).

But there are no arrays in VA.
Not yet, though it's on the to-do list.

As for variables, I don't see other ways except this ugly one: setting global variables for passing arguments.
Any variable in VoiceAttack is(currently) a global variable, which I understand feels a bit "iffy" if you're a programmer, but I believe the intent is to keep it simple for the majority of users.


It did occur to me to use wildcards and the "{CMD_AFTER}" token to pass parameters by calling the command by name, but it appears that action doesn't take the wildcard into account when matching commands.

Artiom

  • Guest
Re: The most obvious feature request
« Reply #6 on: August 29, 2016, 06:20:18 AM »
Not yet, though it's on the to-do list.

Oh, that'd be really coll. Is the to-do list published somewhere? Would gladly look at it.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: The most obvious feature request
« Reply #7 on: August 29, 2016, 06:46:17 AM »
It is not, as far as I'm aware. I'd assume Gary keeps track of it on his end.

By now I imagine he goes through it like