mirror of
https://github.com/BubbaGumpShrump/AutoTrackR2.git
synced 2025-05-25 01:25:30 +00:00
Fix - Clean output text
This commit is contained in:
parent
7592b1729c
commit
a541c5822b
1 changed files with 11 additions and 4 deletions
|
@ -100,15 +100,15 @@ $ueePattern = '<p class="entry citizen-record">\s*<span class="label">UEE Citize
|
|||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$process = Get-Process | Where-Object {$_.Name -like "AutoTrackR2"}
|
||||
$global:killTally = 0
|
||||
$global:GameMode = ""
|
||||
$global:GameVersion = ""
|
||||
|
||||
# Load historic kills from csv
|
||||
if (Test-Path "$scriptFolder\Kill-Log.csv") {
|
||||
$historicKills = Import-CSV "$scriptFolder\Kill-log.csv"
|
||||
foreach ($kill in $historicKills) {
|
||||
Write-Output "NewKill=throwaway,$($kill.EnemyPilot),$($kill.EnemyShip),$($kill.OrgAffiliation),$($kill.Enlisted),$($kill.RecordNumber),$($kill.KillTime),$($kill.PFP)"
|
||||
$global:killTally++
|
||||
Try {
|
||||
Write-Output "NewKill=throwaway,$($kill.EnemyPilot),$($kill.EnemyShip),$($kill.OrgAffiliation),$($kill.Enlisted),$($kill.RecordNumber),$($kill.KillTime), $($kill.PFP)"
|
||||
$global:killTally++
|
||||
} Catch {Write-Output "Error Loading Kill: $($kill.EnemyPilot)"}
|
||||
}
|
||||
}
|
||||
Write-Output "KillTally=$global:killTally"
|
||||
|
@ -340,6 +340,13 @@ function Read-LogEntry {
|
|||
PFP = $victimPFP
|
||||
}
|
||||
|
||||
# Remove commas from all properties
|
||||
foreach ($property in $killData.PSObject.Properties) {
|
||||
if ($property.Value -is [string]) {
|
||||
$property.Value = $property.Value -replace ',', ''
|
||||
}
|
||||
}
|
||||
|
||||
# Export to CSV
|
||||
if (-Not (Test-Path $csvPath)) {
|
||||
# If file doesn't exist, create it with headers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue