1.1.0 • Published 3 years ago

node-win-dialog v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

node-win-dialog

Install

Warning Windows only !!!

$ npm i node-win-dialog@latest

Screenshots

Screenshot

Usage

const Dialog = require('node-win-dialog');

const log = new Dialog();

log.showDialog('Hello wolrd', 'title');

log.showInputBox('Hello wolrd', 'title', 'default text')

log.showOpenFileDialog(false, 'title');

log.showFolderDialog('Description');

Properties

WinTools

See WinTools

Methods

showDialog

ParamTypeOptionalDefaultDescription
message?stringnoneMessage to display
title?stringnoneTitle of the dialog
type?MessageTypeStringDEFAULTType of the dialog
button?ButtonStringDEFAULTButtons of the dialog
defaultButton?ButtonDefaultStringDEFAULTDefault button of the dialog
icon?IconStringDEFAULTIcon of the dialog

Return Promise<Response>

showInputBox

ParamTypeOptionalDefaultDescription
message?stringnoneMessage to display
title?stringnoneTitle of the dialog
defaultText?stringnoneDefault text of the input box
xPos?numbernoneX position of the dialog
yPos?numbernoneY position of the dialog

Return Promise<Response>

showOpenFileDialog

ParamTypeOptionalDefaultDescription
multiFile?booleannoneAllow multi select
title?stringOpenTitle of the dialog
...filterData?Array<filterData>noneFile type filter

Return Promise<Response>

showFolderDialog

ParamTypeOptionalDefaultDescription
description?stringPlease choose a folder.Description of the dialog

Return Promise<Response>

Typedefs

Response

Types

ParamType
exitCodenumber
msgOutstring
msgErrstring
isErrorboolean
data?ReturnButton or string or Array[`string`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)

filterData

Types

ParamType
namestring
extstring

ReturnButton

  • OK
  • CANCEL
  • YES
  • NO
  • ABORT
  • RETRY
  • IGNORE

Types

ButtonString

  • OK
  • OK_CANCEL
  • YES_NO
  • YES_NO_CANCEL
  • ABORT_RETRY_IGNORE
  • RETRY_CANCEL
  • DEFAULT

Types

IconString

  • NONE
  • ERROR
  • WARNING
  • INFORMATION
  • QUESTION

Types

ButtonDefaultString

  • FIRST
  • SECOND
  • THIRD
  • FOURTH
  • DEFAULT

Types

MessageTypeString

  • DEFAULT
  • APPLICATION
  • SYSTEM

Types

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago