Author Topic: inline function or plugin ?  (Read 368 times)

IvanS

  • Newbie
  • *
  • Posts: 11
inline function or plugin ?
« on: July 09, 2024, 03:44:13 AM »
I'd like to push commands (ASCII text) to my app using UDP, so one way.  Is this possible with an inline function or do I need to create a plugin for that ?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4780
  • RTFM
Re: inline function or plugin ?
« Reply #1 on: July 09, 2024, 05:32:45 AM »
That's entirely possible using an inline function.

IvanS

  • Newbie
  • *
  • Posts: 11
Re: inline function or plugin ?
« Reply #2 on: July 15, 2024, 09:49:51 AM »
Thanks.

I'm going to use UDP to send various commands to my app.  So, it's the idea to use the same inline with just another text as command.  However as I see it, I will need to create the inline for every command I want to send (let's assume I want to send "up", "down", "left", " right").  Or is there another way ?
 

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4780
  • RTFM
Re: inline function or plugin ?
« Reply #3 on: July 15, 2024, 09:55:08 AM »
You could use a command containing the inline function that you call using the "Execute Another Command" action and pass values to.

Or, you could compile the inline function, and reference that using the "Execute a Precompiled Inline Function" action.
Do note that once the precompiled inline function has been executed, the file will remain in use, so it's not the most practical option if this is a function you'll be editing often (as you'd need to restart VoiceAttack to be able to overwrite the file).

IvanS

  • Newbie
  • *
  • Posts: 11
Re: inline function or plugin ?
« Reply #4 on: July 16, 2024, 01:37:05 AM »
Thank you Pfeil, for those two suggestions.  I'll go for the precompiled inline function option. That will work, since the inline won't change.  At the moment the UDP IP address and port number are hardcoded, but I can get that into variables to pass onto the inline if need be.