Author Topic: Have "Run an application" accept tokens.  (Read 5581 times)

Antrys

  • Newbie
  • *
  • Posts: 22
Have "Run an application" accept tokens.
« on: June 27, 2017, 08:17:11 PM »
It's sure be nice to be able pass tokens as command-line arguments to external apps.
I'm trying to implement a "Captain's log" using sox to record my voice.

EDDI, sets the variable {TXT:System name}
It's be nice to record a file with the name "system-name_LOG.ogg"
then I could play it back when I enter the system next time.


EDIT by Pfeil: Token parsing already applies to that field, as shown.
« Last Edit: April 18, 2020, 08:57:33 AM by Pfeil »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Have "Run an application" accept tokens.
« Reply #1 on: June 27, 2017, 08:26:03 PM »
It doesn't?  Hmmm... I'll take a look.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Have "Run an application" accept tokens.
« Reply #2 on: June 27, 2017, 08:29:37 PM »
Without running a test, I can see that there is token parsing in the code... I also noticed your example didn't have a closing curly bracket :  }

Let me know if that fixes it!

Antrys

  • Newbie
  • *
  • Posts: 22
Re: Have "Run an application" accept tokens.
« Reply #3 on: June 27, 2017, 08:35:00 PM »
Which bracket are you referring to?  Maybe it's hard to see in low-rez.

I Have: 
Code: [Select]
-r 16k -c 1 {TXT:ship name}_LOG.ogg
Should there be another close curly?

Antrys

  • Newbie
  • *
  • Posts: 22
Re: Have "Run an application" accept tokens.
« Reply #4 on: June 27, 2017, 08:36:51 PM »
Sryy about the var changing, I've been trying to get this working....  I've been trying all kinds of stuff.

Antrys

  • Newbie
  • *
  • Posts: 22
Re: Have "Run an application" accept tokens.
« Reply #5 on: June 27, 2017, 08:47:28 PM »
You're right, it does work.
I wrote a batch file and it passed it to that ok.
I have something else going on here.

These new darn Win10 command prompts ain't helping.  They don't have an option to keep them open after execution anymore. (That I can find)

Antrys

  • Newbie
  • *
  • Posts: 22
Re: Have "Run an application" accept tokens.
« Reply #6 on: June 27, 2017, 08:51:11 PM »
Figured it out.

It's back to command line basics.
When in doubt, use quotes.
Code: [Select]
-r 16k -c 1 "{TXT:system name}_LOG.ogg"
Thanks for helping me chase the correct issue.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Have "Run an application" accept tokens.
« Reply #7 on: June 27, 2017, 09:15:08 PM »
Awesome!  Thanks for letting me know.