Am having an issue where I have the command set to send only to "Star Citizen"
The game has an update and then it can not find it, even when the new version is running. When you open the drop down to choose where to send it to, there are multiple "Star Citizen" in it to pick from.
I thought about doing wild cards, so I have tried *Star Citizen, Star Citizen*, and *Star Citizen* and still no dice.
Nothing in the exe or the title has version numbers. I had to change controls for "Microsoft Flight Simulator*" years ago and that still works with no issues
Active window is working in the meantime, but I would like to get this to work so I do not have to edit all the commands each update, sometimes multiple in a day.
I am currently using an inline C# function to see if something is running, if not, it exits, but I feel I should not have to do this
using System.Diagnostics;
public class VAInline
{
public void main()
{
string processName = VA.GetText("~ProcessToCheck");
Process[] pname = Process.GetProcessesByName(processName);
if (pname.Length == 0)
VA.SetBoolean("ProcessCheckResult", false);
else
VA.SetBoolean("ProcessCheckResult", true);
//if (pname.Length == 0)
//VA.WriteToLog("Process doesn't exist", "red");
//else
//VA.WriteToLog("Process is running", "green");
}
}
// References:
// https://stackoverflow.com/questions/262280/how-can-i-know-if-a-process-is-running
Which is part of this command, just to hit a series of keybinds, just to prevent it from activating on other programs when I press "J key"
Set text [~ProcessToCheck] to 'obs64'
Inline C# Function: Checks to see if process is running, wait until execution finishes
Begin Boolean Compare : [ProcessCheckResult] Equals True
Press Left Ctrl+Left Alt+J keys and hold for 0.1 seconds and release
Write '{TXT:~ProcessToCheck} is running' to log
Else
Write '{TXT:~ProcessToCheck} is not running' to log
End Condition
Have run out of ideas of what else to change.