VoiceAttack commands

Forum rules
EVE University's usual communications rules apply, so ensure that any topics are appropriate for a family-friendly environment.
<<

Turhan Bey

Portrait

Retired Director
Retired Director

Post 2018.06.22 04:29

VoiceAttack commands

I was about to upgrade a Voice Pack and thus I needed to get my custom commands archived. I was about to just dump them into my own little directory of text files, but then I figured that I could post them here to share with any other VoiceAttack users to use, if they so wish.

Some commands are generic, while others may be specific to a game (I use it for both EVE Online and Elite: Dangerous). So, I'll note any game-specific code at the start, otherwise one can assume that the command is generic. I also use a game-specific prefix for all command within a specific game (or "[computer; windows;]" for generic commands) which will be left out for clarity.

EDIT: Moved thread to "Videogames and Media" subforum; more appropriate location.
ImageImageImage
"The first mistake most gameplay zealots make is thinking that the game should revolve around them. The second is believing that it already does."
"Maybe it's just a game. Or perhaps it's a world. Perhaps it's a community. One thing is for certain: If it's only a game to you, then that is all it will ever be."
<<

Turhan Bey

Portrait

Retired Director
Retired Director

Post 2018.06.22 04:36

Re: VoiceAttack commands

Description: Plays a random song from a directory of files. Does so by firing up a music player of choice.

Extra notes: Both the path to the songs and the path and name of the music player are hard-coded because they are only used once making it a bit unnecessarily complicated to set variables for them, even though doing so would be "cleaner". Feel free to add this if you'd like.
----

Spoken Command: When I say: play [a;] [random;] song; play [some;] [random;] music

Set a Text Value -> ~MusicDir -> Text: d:\Users\firefly\Music\audio\VoiceAttack\random
(Customize text to your own location of directory full of song files.)

Inline C# Function: returns files in directory, wait until execution finishes
  Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using System.IO;

public class VAInline
{
   public void main()
   {
            string path = VA.GetText("~MusicDir");
            //VA.WriteToLog("Path: " + path, "red");
            if(Directory.Exists(path))
            {
                string [] fileEntries = Directory.GetFiles(path);
               
                short count = 0;
                foreach(string fileName in fileEntries)
                {
                    count++;
                    VA.SetText("~file" + count, fileName);
                    //VA.WriteToLog("File" + count + ": " + fileName, "red");
                }
                VA.SetSmallInt("~randmax", count);
                //VA.WriteToLog("Count: " + count, "red");
            }
            else
            {
                VA.WriteToLog("Path is not a valid directory", "red");
            }
   }
}


Set a Small Integer (Condition) Value -> ~SongNum -> Convert Text/Token: {RANDOM:1:{SMALL:~randmax}}

Set a Text Value -> ~SongFile -> Text: {TXT:~File{SMALL:~SongNum}}

Run an Application -> D:\Program Files (x86)\foobar2000\foobar2000.exe -> With these parameters: "{TXT:~SongFile}" -> Window Style: normal -> Advanced: Do not wait for launched application
(Customize path and name of media player executable.)
ImageImageImage
"The first mistake most gameplay zealots make is thinking that the game should revolve around them. The second is believing that it already does."
"Maybe it's just a game. Or perhaps it's a world. Perhaps it's a community. One thing is for certain: If it's only a game to you, then that is all it will ever be."
<<

Turhan Bey

Portrait

Retired Director
Retired Director

Post 2018.06.22 04:41

Re: VoiceAttack commands

Description: Kills the media player process.

Extra notes: Nothing special. Just posted as a reminder that sometimes, you may want the music to just STFU right away without having to task out and close it manually, e.g. during an unexpected PvP encounter.
----

Spoken Command: When I say: [stop; cut; cancel] music; quick quiet; [kill; stop] foobar
(Customize if you use a different media player, of course.)

Stop a Process by Name -> foobar2000
(Again, customize to your specific media player process.)
ImageImageImage
"The first mistake most gameplay zealots make is thinking that the game should revolve around them. The second is believing that it already does."
"Maybe it's just a game. Or perhaps it's a world. Perhaps it's a community. One thing is for certain: If it's only a game to you, then that is all it will ever be."

Return to Videogames and Media

Who is online

Users browsing this forum: No registered users

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Powered by Dediserve