Skip to main content

Prompter


Logo

Prompter

Display a prompt on the desktop!

About

Prompter Screen Shot

Prompter is a simple application designed to present a prompt on the desktop and optionally display a date and time picker. It supports any number of buttons, as well as optional header images and custom application icons.

Built With

Getting Started

Install the .NET Desktop Runtime 8.0 and then simply download and run Prompter.exe to get started.

Prerequisites

  • .NET 8.0 Desktop Runtime

    winget install Microsoft.DotNet.DesktopRuntime.8

    or

    Set-ExecutionPolicy Bypass -Scope Process -Force
    [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
    iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
    & "$env:ALLUSERSPROFILE\chocolatey\bin\choco.exe" "install" "dotnet-8.0-desktopruntime"

Usage

Prompter is meant to be launched from a command prompt and returns one to two values:

  1. The name of the button that was pressed, or 'Timer elapsed' if a timeout was specified and it elapsed.
  2. (Optional) The date and time that was selected by the user.

Arguments

Long NameShort NameExampleDescription
--title-t"My Prompt Title"The title of the window.
--message-m"You should reboot!"The message to display in the prompt. Use \n to add a new line to the message. --htmlmessage or -l parameter should be used with the HTML formatted messages.
--icon-i"https://site.com/icon.png"Path (Local or URL) to an image to display in the taskbar.
--headerimage-h"https://site.com/header.png"Path (Local or URL) to an image to display in the header of the prompt.
--theme-elightThe theme to use for the prompt (dark, light). Will use the Windows default theme if not specified.
--datetimeselector-dN/AEnable the date/time selector which will pass back an additional output to the console.
--buttontypes-bOK Cancel "Do Something"A space separated list of strings to display as buttons on the prompt. Defaults to "OK".
--timeout-o60The number of seconds to wait for input before closing the window. Will return 'Timer elapsed' on timeout.
--twelvehour-cN/AMake the time display in 12-hour time instead of 24-hour time.
--datetimefromhours-y0The number of hours to add to the current time in order to set the starting point for the Date/Time selector.
--datetimetohours-z48The number of hours to add to the initial time in the Date/Time selector in order to display the last available option to select.
--htmlmessage-lN/ASet this to true to enable to enable the HTML Decoding of the Message.
--userinput-uN/ASet this to true to enable the user input field.
--userinputtext-xN/ASet initial/help text for the user input field.

Examples

Example 1

C:\> Prompter.exe -m "This is a test message"
OK

Example 1

Example 2

$prompterOutput = .\Prompter.exe -m "Please select a date!" -d -i "https://clipartcraft.com/images/anime-transparent-aesthetic-2.png" -h "https://www.pngmart.com/files/13/One-Punch-Man-Saitama-PNG-Picture.png" -t "Date Selection Prompt" -b OK Cancel "Not Sure" -e light
$prompterOutput[0]
# Will be OK, Cancel, or Not Sure
$prompterOutput[1]
# Will be a parsable datetime i.e. 2022-06-27T00:00:00.0000000-04:00
[datetime]::Parse($prompterOutput[1])
# Monday, June 27, 2022 12:00:00 AM

Example 2

Example 3

$prompterOutput = .\Prompter.exe -m "Please select a date!" -d -i "https://clipartcraft.com/images/anime-transparent-aesthetic-2.png" -h "https://www.pngmart.com/files/13/One-Punch-Man-Saitama-PNG-Picture.png" -t "Date Selection Prompt" -b OK -e light -y 0 -z 72
#The available dates to select will be within the next 0 to 72 hours, with the default date being the current date and time.
$prompterOutput[0]
# Will be OK
$prompterOutput[1]
# Will be a parsable datetime i.e. 2024-07-19T00:00:00.0000000-04:00
[datetime]::Parse($prompterOutput[1])
# Friday, July 19, 2024 12:00:00 AM

Example 3

Example 4

$prompterOutput = .\Prompter.exe -m "A\nMessage\nWith\nMultiple\nLine\nBreaks" -i "https://clipartcraft.com/images/anime-transparent-aesthetic-2.png" -h "https://www.pngmart.com/files/13/One-Punch-Man-Saitama-PNG-Picture.png" -t "Message with Line Breaks" -b OK -e light
#Use \n to add a line break in the message.
$prompterOutput[0]
# Will be OK

Example 4

Example 5

$prompterOutput = .\Prompter.exe -m "<!DOCTYPE html><html><head></head><body><p>This is a notification from <a href='https://www.provaltech.com'>ProValTech</a>.</p><p>Please Email the support Engineer listed below with your concerns:</p><table border='1'><tr><th>Name</th><th>Email</th></tr><tr><td>Engineer</td><td><a href='mailto:Engineer1@provaltech.com'>Engineer1@provaltech.com</a></td></tr><tr><td>Engineer2</td><td><a href='mailto:Engineer2@provaltech.com'>Engineer2@provaltech.com</a></td></tr></table></body></html>" -l -i "https://clipartcraft.com/images/anime-transparent-aesthetic-2.png" -h "https://www.pngmart.com/files/13/One-Punch-Man-Saitama-PNG-Picture.png" -t "HTML Prompt" -b OK -e Light
#HTML Formatted message with an URL, a Table, and mailto: addresses.
$prompterOutput[0]
# Will be OK

Example 5

Example 6

$prompterOutput = .\Prompter.exe -m "We would greatly appreciate it if you could take the time to provide us with your valuable feedback on our support.\nPlease type your feedback in the text box below and select a satisfaction rating using a scale of 1 to 5, with 1 being the lowest and 5 being the highest." -i "https://clipartcraft.com/images/anime-transparent-aesthetic-2.png" -h "https://www.pngmart.com/files/13/One-Punch-Man-Saitama-PNG-Picture.png" -t "Feedback Prompt" -b 1 2 3 4 5 -e Light -u -x "We value your feedback. Please take a moment to share your thoughts in this text box."
#Enables the Text Box for the user's input.
$prompterOutput[0]
# Will be 5
$PrompterOutput[1]
#I wanted to take a moment to express my sincere gratitude for the outstanding support consistently provided by the engineer at ProVal. Each time I've reached out for assistance, your expertise, professionalism, and dedication have been remarkable. Your swift responses and thorough solutions have not only resolved my issues efficiently but have also greatly enhanced my understanding of the systems. Your unwavering commitment to delivering top-notch service is truly commendable and makes a significant difference in our operations. Thank you for always going above and beyond to ensure our success.

Example 6

Example 6

Acknowledgments