Author Topic: Execute another command - Passing text again X)  (Read 1047 times)

Vindaloo

  • Newbie
  • *
  • Posts: 5
Execute another command - Passing text again X)
« on: May 08, 2022, 02:23:28 PM »
Hi guys
just joined this forum as I just got the progam for elite and now I'm having an issue that I've read a lot about including this forum post: https://forum.voiceattack.com/smf/index.php?topic=3837.0

So that post is what I have but I'm still getting the Not set in my log.

Here's my main command (called by voice)
Code: [Select]
// set flight mode to combat
Write [Orange] 'toggle flight mode if it is in analysis mode' to log
Execute command, '_toggleFlightMode' - passing values (and wait until it completes)
//

The execute command window has the receiving command (_toggleFlightMode) set from the dropdown
It has the 'Wait until this command completes' box checked
it has the word 'combat' without quotes in the text box under passed values

The '_toggleFlightMode' command is the receiving command and after completing what is required goes back to the main command
The first entry in the sequence should display the received text value in the log (to ensure I got the right text arriving)

Code: [Select]
// passedText1(combat ; analysis)
Write [Orange] 'the passed command was {TXT:~passedText1}' to log

So thats what I learned from the user manual and was confirmed in the forum link above but I can't get it to work.

Now as the entire code of the main command is not here, I should mention that there is a previous 'Execute command' earlier in my script but that doesn't pass any variables to it's called command, and it does return to the main command and continue.

hope someone can help

kind regards
Jon

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Execute another command - Passing text again X)
« Reply #1 on: May 08, 2022, 03:20:30 PM »
it has the word 'combat' without quotes in the text box under passed values
Are you trying to pass the contents of a text variable named "combat"? That is what you're currently doing


As mentioned in the documentation, literal text must be wrapped in double quotes, otherwise the input is interpreted as a variable name.

Vindaloo

  • Newbie
  • *
  • Posts: 5
Re: Execute another command - Passing text again X)
« Reply #2 on: May 08, 2022, 04:38:55 PM »
Oh a true hero...... you know I already used this in another command somewhere but couldn't find it to refresh my memory.. Pfeil, you are a god  ;)

I tried sooooo many ways....

Thank you