Ask

From Visual DialogShell Wiki
Jump to navigation Jump to search
function ask($a,$b) {
   $ask = [System.Windows.Forms.MessageBox]::Show($a,$b,'YesNo','Info')
   return $ask
<#
   .SYNOPSIS
    Opens a dialog window to ask the user a question.
    
   .DESCRIPTION
    VDS
   if ($(ask "Is this the question?" "This is the title") -eq "Yes")
   {info "This is the question"}
   else
   {info "This is not the question"}
   .LINK
   https://dialogshell.com/vds/help/index.php/ask
#>
}