Warning Windows only !!!
$ npm i node-win-dialog@latest
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');
See WinTools
Param | Type | Optional | Default | Description |
---|---|---|---|---|
message | ?string |
✅ | none |
Message to display |
title | ?string |
✅ | none |
Title of the dialog |
type | ?MessageTypeString |
✅ | DEFAULT |
Type of the dialog |
button | ?ButtonString |
✅ | DEFAULT |
Buttons of the dialog |
defaultButton | ?ButtonDefaultString |
✅ | DEFAULT |
Default button of the dialog |
icon | ?IconString |
✅ | DEFAULT |
Icon of the dialog |
Param | Type | Optional | Default | Description |
---|---|---|---|---|
message | ?string |
✅ | none |
Message to display |
title | ?string |
✅ | none |
Title of the dialog |
defaultText | ?string |
✅ | none |
Default text of the input box |
xPos | ?number |
✅ | none |
X position of the dialog |
yPos | ?number |
✅ | none |
Y position of the dialog |
Param | Type | Optional | Default | Description |
---|---|---|---|---|
multiFile | ?boolean |
✅ | none |
Allow multi select |
title | ?string |
✅ | Open |
Title of the dialog |
...filterData | ?Array <filterData > |
✅ | none |
File type filter |
Param | Type | Optional | Default | Description |
---|---|---|---|---|
description | ?string |
✅ | Please choose a folder. |
Description of the dialog |
Param | Type | Optional | Default | Description |
---|---|---|---|---|
command | string |
cmd.exe |
File / Application | |
args | [?Array <string > |
✅ | none |
Command Arguments |
workingDir | ?string |
✅ | None |
Working Dir |
showWindow | ?WindowMode |
Show |
Window Mode |
Types
Param | Type |
---|---|
exitCode | number |
msgOut | string |
msgErr | string |
isError | boolean |
data | ?ReturnButton or string or Array <string > |
Types
Param | Type |
---|---|
name | string |
ext | string |
Hide
Show
Minimize
Maximize
Types
OK
CANCEL
YES
NO
ABORT
RETRY
IGNORE
Types
OK
OK_CANCEL
YES_NO
YES_NO_CANCEL
ABORT_RETRY_IGNORE
RETRY_CANCEL
DEFAULT
Types
NONE
ERROR
WARNING
INFORMATION
QUESTION
Types
FIRST
SECOND
THIRD
FOURTH
DEFAULT
Types
DEFAULT
APPLICATION
SYSTEM
Types