NGDesktop Utils (ref)
(part of package 'NGDesktop Utils')
You can access it in code via: plugins.ngdesktoputils
API
executeCommand
Executes a command async, the server side call will not block on this call.
Parameters:
executeCommandSync
This executes a command and returns the result of the stdout This will also call reject when a error happens so the call will error out. (will not return correct) Try to use the async executeCommand so nothing will be blocking.
Parameters:
Returns: string
exit
This will close the NGDesktop main application. Be sure you will call this and after this call application.exit() to close also the client directly itself.
getClipboardContent
Get clipboard text.
Returns: string
getDefaultPrinter
Returns default printer on local machine.
Returns: printer
getPrinters
Returns installed printers on local machine.
Returns: printer[]
getSystemInformation
Retrieve information from the ngdesktop client
@return
Returns: sysinfo
isNGDesktop
Whether application is running as NGDesktop.
Returns: boolean
printPDF
Prints a pdf document specified by path. Optionally, specify printer or unix print options (lp command) or windows print options see: https://github.com/Servoy/pdf-to-printer
Parameters:
path string options printoptions (optional)
setClipboardContent
Set clipboard text.
@param {string} text to be set in clipboard
Parameters:
text string
showExternal
Manage URLs using their default applications
@param {String} url
Parameters:
url string
Types
printer
scripting type: CustomType<ngdesktoputils.printer>
printoptions
scripting type: CustomType<ngdesktoputils.printoptions>
sysinfo
scripting type: CustomType<ngdesktoputils.sysinfo>
electronVersion
Type: string
ngDesktopVersion
Type: string
osFreeMem
Type: long
osPlatform
Type: string
osRelease
Type: string
osTotalMem
Type: long
Last updated