Last active
June 17, 2024 10:32
-
-
Save VIRUXE/ab990c86ab343a7b349c2062a4473913 to your computer and use it in GitHub Desktop.
Change your HTS colors for the ones used in eCtune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
17-06-2024 VIRUXE - https://flaviopereira.dev | |
This script replaces current Honda Tuning Suite (https://discord.hondatuningsuite.com) colors with the ones originally used in eCtune. | |
! eCtune was created by Frank van Koppen | |
#> | |
$properties = @{ | |
"TraceColor" = "RGB[-8355585]" | |
"TrailColor" = "RGB[-3289601]" | |
"selectedColor" = "COLOR[Blue]" | |
"dispBackColor" = "COLOR[White]" | |
"dispTextColor" = "COLOR[White]" | |
"ledOnColor" = "RGB[-16725504]" | |
"ledOnDarkColor" = "RGB[-16732416]" | |
"ledOffColor" = "COLOR[Red]" | |
"BackColor2" = "COLOR[Black]" | |
"BackColor3" = "COLOR[White]" | |
"RTPColor1" = "COLOR[Red]" | |
"RTPColor2" = "COLOR[CornflowerBlue]" | |
"Text2D3D" = "COLOR[White]" | |
"PlotCol1" = "RGB[-156]" | |
"PlotCol2" = "COLOR[Green]" | |
"Text2D3D_2" = "COLOR[White]" | |
"FuelColor1" = "RGB[-4587521]" | |
"FuelColor2" = "RGB[-16711808]" | |
"FuelColor3" = "COLOR[Yellow]" | |
"FuelColor4" = "RGB[-44976]" | |
"IgnColor1" = "RGB[-4587521]" | |
"IgnColor2" = "RGB[-8323200]" | |
"IgnColor3" = "COLOR[Yellow]" | |
"IgnColor4" = "RGB[-44976]" | |
"VEColor1" = "RGB[-14136]" | |
"VEColor2" = "RGB[-3604481]" | |
"PercentColorFuel1" = "8" | |
"PercentColorFuel2" = "38" | |
"PercentColorIgn" = "50" | |
} | |
try { | |
# ? I'm guessing that different versions of HTS will have different folders | |
$folders = Get-ChildItem "$env:APPDATA" -Directory -Filter "HTS*" | Where-Object { Test-Path "$($_.FullName)\SettingsV2.xml" } | |
if ($folders.Count -eq 0) { | |
Write-Warning "No HTS folders found in $env:APPDATA." | |
return | |
} | |
if ($folders.Count -gt 1) { | |
$folders | ForEach-Object { Write-Host "$($_.Name) - $($_.FullName)" } | |
$folderIndex = Read-Host "Enter the index of the folder to use" | |
$folder = $folders[$folderIndex] | |
} else { | |
$folder = $folders[0] | |
} | |
Write-Host "Using folder $folder" | |
$xmlFilePath = "$($folder.FullName)\SettingsV2.xml" | |
if (-not (Test-Path $xmlFilePath)) { | |
Write-Warning "File $xmlFilePath does not exist." | |
return | |
} | |
$xml = [xml](Get-Content $xmlFilePath) | |
$colorNode = $xml.SelectSingleNode("//color") | |
foreach ($property in $properties.GetEnumerator()) { | |
$element = $colorNode.SelectSingleNode($property.Key) | |
if ($element -eq $null) { | |
Write-Warning "Property $($property.Key) does not exist in the XML file." | |
continue | |
} | |
$element.SetAttribute("value", $property.Value) | |
} | |
$xml.Save($xmlFilePath) | |
Write-Host "Colors updated in $xmlFilePath" | |
} finally { | |
Write-Host "Press any key to continue..." | |
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make sure to visit Honda Tuning Suite's Discord: https://discord.hondatuningsuite.com