Skip to content

Commit

Permalink
Pragmatically set window title
Browse files Browse the repository at this point in the history
  • Loading branch information
SavageCore committed Feb 9, 2024
1 parent aa5e592 commit 3380886
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion screenshot.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ param (
[string]$theme
)

$version = (Get-Content torf_gui/version.py | Select-String -Pattern "__version__").ToString().Split(" ")[2].Trim('"')

# Start the Python script
Start-Process python -ArgumentList "torf_gui/gui.py" -WindowStyle Hidden

Expand Down Expand Up @@ -61,5 +63,5 @@ public class ScreenCapture {
"@ -ReferencedAssemblies System.Drawing, System.Windows.Forms

$screenCapture = New-Object ScreenCapture
$bitmap = $screenCapture.CaptureWindow("torf-gui 0.3.0")
$bitmap = $screenCapture.CaptureWindow("torf-gui $version")
$bitmap.Save("screenshot-$theme.png", [System.Drawing.Imaging.ImageFormat]::Png)

0 comments on commit 3380886

Please sign in to comment.