NGDesktop Utils (ref)
Last updated
Was this helpful?
Last updated
Was this helpful?
(part of package '')
You can access it in code via: plugins.ngdesktoputils
Executes a command async, the server side call will not block on this call.
Parameters:
{} program
{} args
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:
{} program The command to be executed
{} args The command arguments
Returns: The result from standard output.
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.
Get clipboard text.
Returns default printer on local machine.
Returns installed printers on local machine.
Retrieve information from the ngdesktop client
@return {CustomType<ngdesktoputils.sysinfo>}
Whether application is running as NGDesktop.
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:
Set clipboard text.
Parameters:
Manage URLs using their default applications
Parameters:
Contains printer information. scripting type: CustomType<ngdesktoputils.printer>
deviceId
The device identifier for the printer.
name
The name of the printer.
paperSizes
An array of supported paper sizes.
Contains print options for different platforms. scripting type: CustomType<ngdesktoputils.printoptions>
printer
The printer identifier or name to use.
unix
An array of Unix-specific printing options.
win32
An array of Windows-specific printing options.
Contains system information from the NGDesktop client. scripting type: CustomType<ngdesktoputils.sysinfo>
electronVersion
The version of Electron used by NGDesktop.
ngDesktopVersion
The NGDesktop version.
osFreeMem
The available (free) system memory in bytes.
osPlatform
The operating system platform (e.g. 'darwin', 'win32', etc.).
osRelease
The operating system release version.
osTotalMem
The total system memory in bytes.
Returns: The clipboard text.
Returns: The default printer object.
Returns: An array of printer objects.
Returns: an object containing the client's system information:ngDesktopVersion - string: ngdesktop versionosPlatform - string: can be 'darwin', 'linux', 'freebsd', 'openbsd' and 'win32'osRelease - string: kernel release numberosTotalMem - long: total system's memoryosFreeMem - long: total available memory
Returns: True if app running inside NGDesktop, false otherwise.
{} path
{} [options]
{} text To be set in clipboard
{} url The URL to be opened.
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type:
Type: