The simplest way would be to check whether the process exists after you try to start it, but because there is currently no "{PROCESSEXISTS:}" token, and that method would require a time delay, I've used a tiny snippet of C# to catch the error, if it occurs:
Set Text [~ApplicationToStart] to 'mspaint.exe'
Inline C# Function: , wait until execution finishes
Begin Boolean Compare : [~ExecutionError] Equals True
Say, 'Error while starting application'
Else
Say, 'Application Started'
End Condition
All you should have to do is set "~ApplicationToStart" to the location of your steam executable, and change the "Say Something with Text-To-Speech" actions into "Play a Sound" actions.
The command is attached below so you can import it.
The inline function contains:
public void main()
{
try
{
System.Diagnostics.Process.Start(VA.GetText("~ApplicationToStart"));
}
catch(Exception e)
{
//VA.WriteToLog(e.ToString(),"red");//Uncomment this if you want the error to show up in the log
VA.SetBoolean("~ExecutionError",true);
}
}
You don't have to worry about this, but I'm including it in case anyone's curious.