Author Topic: Programmer trying to understand `Begin Text Compare`  (Read 2124 times)

sentix

  • Newbie
  • *
  • Posts: 2
Programmer trying to understand `Begin Text Compare`
« on: December 06, 2023, 10:40:15 AM »
I get what it's doing, taking variable and testing it for various conditions.

I don't get is if it naturally loops until the condition is true or if I am looking at a buggy Elite Dangerous profile command.

The profile is part of the EliteAttack profile and the command script looks like

```
Begin Text Compare: [someVar] Has Been Set
     Begin Condition: [EliteAttack.targetSubSystem] equals [EliteAttack.currentSubsystem]
        Set text [someVar] to [Not set]
     else
         Press variables key(s) [edCyclePreviouSubsystem] and hold for 0,01 seconds and release
     End Condition
End Condition
```

please ignore minor spelling mistakes, that is the gist of the command script.   It looks like the Begin Text Compare loops but I haven't been able to find documentation that confirms that.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4647
  • RTFM
Re: Programmer trying to understand `Begin Text Compare`
« Reply #1 on: December 06, 2023, 10:43:03 AM »
Conditions don't loop, no.


As an aside, you can right-click the action list, choose "Copy All as Text" from the context menu, then paste here into a code block (click the # button)

Backticks are (as far as I'm aware) Discord markup, they don't have any special significance in this forum software

sentix

  • Newbie
  • *
  • Posts: 2
Re: Programmer trying to understand `Begin Text Compare`
« Reply #2 on: December 06, 2023, 10:49:19 AM »
Triple ` is just habit from Markdown syntax for me.

Thanks for answering so quickly.   VA's syntax is fairly straight forward so I wonder if the author of that profile just made a mistake as there is nothing that causes it to loop.

Thank you for the copy all as text tip, that will definitely make things easier.

Side question, is there any advanced documentation on VA's scripting language and or the inline C# function's API?    I know that language and there are a few things I'd like to try out.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4647
  • RTFM
Re: Programmer trying to understand `Begin Text Compare`
« Reply #3 on: December 06, 2023, 10:56:46 AM »
If the command does appear to be looping, perhaps it has its "Repeating" option set to something other than "Execute only once"?



Not sure what you mean by "advanced", but both are documented in VoiceAttackHelp.pdf (press F1 while VoiceAttack has focus; note that the inline function editor will not respond to that keypress while the main editing control has focus)

If you're familiar with C# and the Windows API, you'll likely find that many features share those concepts.