Skip to content

Commit 301d422

Browse files
v2.26.0
1 parent b5106b5 commit 301d422

16 files changed

+2437
-33
lines changed

PSScriptTools.psd1

160 Bytes
Binary file not shown.

PSScriptTools.psm1

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ if ($psEditor) {
6363
Param(
6464
[Microsoft.PowerShell.EditorServices.Extensions.EditorContext]$context
6565
)
66-
6766
$prompt = "What do you need to do?"
6867
$title = "To Do"
6968
$item = Invoke-InputBox -Title $title -Prompt $prompt
@@ -96,3 +95,23 @@ elseif ($psise) {
9695
$psISE.CurrentPowerShellTab.AddOnsMenu.Submenus.Add("ToDo", $Action, "Ctrl+Alt+2" ) | Out-Null
9796
}
9897
}
98+
99+
#define a function to open the PDF version of the README as a help file
100+
101+
Function Open-PSScriptToolsHelp {
102+
[cmdletbinding()]
103+
Param()
104+
105+
$pdf = Join-Path -path $PSScriptRoot -ChildPath PSScriptToolsHelp.pdf
106+
if (Test-Path -Path $pdf) {
107+
Try {
108+
Start-Process -FilePath $pdf -ErrorAction Stop
109+
}
110+
Catch {
111+
Write-Warning "Failed to automatically open the PDF. You will need to manually open $pdf."
112+
}
113+
}
114+
else {
115+
Write-Warning "Can't find $pdf."
116+
}
117+
}

0 commit comments

Comments
 (0)