mirror of
https://github.com/BubbaGumpShrump/AutoTrackR2.git
synced 2025-06-19 21:19:07 +00:00
Fix passenger and videorecord
This commit is contained in:
parent
ea0f18f919
commit
23bee3925f
4 changed files with 5 additions and 7 deletions
|
@ -23,7 +23,6 @@
|
||||||
<None Remove="config.ini" />
|
<None Remove="config.ini" />
|
||||||
<None Remove="Fonts\Orbitron-Bold.ttf" />
|
<None Remove="Fonts\Orbitron-Bold.ttf" />
|
||||||
<None Remove="Fonts\Roboto-Regular.ttf" />
|
<None Remove="Fonts\Roboto-Regular.ttf" />
|
||||||
<None Remove="kill-log.csv" />
|
|
||||||
<None Remove="KillTrackR_MainScript.ps1" />
|
<None Remove="KillTrackR_MainScript.ps1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -69,7 +68,6 @@
|
||||||
<Resource Include="Fonts\Roboto-Regular.ttf">
|
<Resource Include="Fonts\Roboto-Regular.ttf">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Resource>
|
</Resource>
|
||||||
<Resource Include="kill-log.csv" />
|
|
||||||
<EmbeddedResource Include="KillTrackR_MainScript.ps1">
|
<EmbeddedResource Include="KillTrackR_MainScript.ps1">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|
|
@ -219,7 +219,7 @@ function Read-LogEntry {
|
||||||
if ($ship -notmatch $shipManPattern){
|
if ($ship -notmatch $shipManPattern){
|
||||||
$ship = "Player"
|
$ship = "Player"
|
||||||
}
|
}
|
||||||
If ($enemyShip -notmatch $shipManPattern) {
|
If ($enemyShip -notmatch $shipManPattern -or $enemyShip -notlike "Passenger" ) {
|
||||||
$enemyShip = "Player"
|
$enemyShip = "Player"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ function Read-LogEntry {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Record video
|
# Record video
|
||||||
if ($recording -eq $true -and $enemyShip -ne "Passenger"){
|
if ($videoRecord -eq $true -and $enemyShip -ne "Passenger"){
|
||||||
# send keybind for windows game bar recording
|
# send keybind for windows game bar recording
|
||||||
Start-Sleep 2
|
Start-Sleep 2
|
||||||
$sleeptimer = $sleeptimer -9
|
$sleeptimer = $sleeptimer -9
|
||||||
|
@ -367,10 +367,10 @@ function Read-LogEntry {
|
||||||
Start-Sleep 7
|
Start-Sleep 7
|
||||||
|
|
||||||
$latestFile = Get-ChildItem -Path $videoPath | Where-Object { -not $_.PSIsContainer } | Sort-Object CreationTime -Descending | Select-Object -First 1
|
$latestFile = Get-ChildItem -Path $videoPath | Where-Object { -not $_.PSIsContainer } | Sort-Object CreationTime -Descending | Select-Object -First 1
|
||||||
# Check if the latest file is no more than 10 seconds old
|
# Check if the latest file is no more than 30 seconds old
|
||||||
if ($latestFile) {
|
if ($latestFile) {
|
||||||
$fileAgeInSeconds = (New-TimeSpan -Start $latestFile.CreationTime -End (Get-Date)).TotalSeconds
|
$fileAgeInSeconds = (New-TimeSpan -Start $latestFile.CreationTime -End (Get-Date)).TotalSeconds
|
||||||
if ($fileAgeInSeconds -le 10) {
|
if ($fileAgeInSeconds -le 30) {
|
||||||
# Generate a timestamp in ddMMMyyyy-HH:mm format
|
# Generate a timestamp in ddMMMyyyy-HH:mm format
|
||||||
$timestamp = (Get-Date).ToString("ddMMMyyyy-HHmm")
|
$timestamp = (Get-Date).ToString("ddMMMyyyy-HHmm")
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@ namespace AutoTrackR2
|
||||||
var processStartInfo = new System.Diagnostics.ProcessStartInfo
|
var processStartInfo = new System.Diagnostics.ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = "msiexec",
|
FileName = "msiexec",
|
||||||
Arguments = $"/i \"{installerPath}\" /norestart", // Silent install with no restart
|
Arguments = $"/i \"{installerPath}\" /norestart REINSTALLMODE=amus", // Silent install with no restart
|
||||||
UseShellExecute = true, // Ensures that the process runs in the background
|
UseShellExecute = true, // Ensures that the process runs in the background
|
||||||
CreateNoWindow = true // Hides the command prompt window
|
CreateNoWindow = true // Hides the command prompt window
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue