Useful functions for sciter.js.
- git clone the repository
- install packages
npm install
- install latest sciter sdk
npm run install-sdk
- start the demo
npm run scapp
- A recent version of Node.js
node
(tested with 22 LTS) and its package managernpm
.- On Windows download and run the installer
- On Linux check the installation guide
- install package
npm install sciter-utils
- add to
<script type="module">
- add the
src
dir to your project - add to
<script type="module">
import Utils from "node_modules/sciter-utils/src/utils.js";
document.on("ready", function() {
// add support for F5 reload
Utils.addReloadWindow();
// center window on screen
Utils.centerWindow();
// center window around position
Utils.centerWindowXY(100, 100);
});
- devicePixels()
- dipPpx()
- ppxDip()
- mmPpx()
- monitorsCount()
- logMonitors()
- screenDimensions()
- windowRect()
- windowDimensions()
- setWindowDimensions()
- centerWindow()
- centerWindowXY()
- addReloadWindow()
- minimizeWindowShortcut()
- closeWindowOnEscape()
- bringToFrontWindow()
- focusWindow()
- keyLogger()
- addKeyboardShortcut()
- keyStr()
- fileExists()
- dirExists()
- getSeparator()
- splitPath()
- loadJson()
- saveJson()
- sciterInfo()
- openLink()
- playSound()
- sleep()
- flushIOQueue()
- capitalizeFirstletter()
- arrayBufferToHexStr()
- randomStr()
- uuid() - https://developer.mozilla.org/en-US/docs/Glossary/UUID
- debounce()
./node_modules/.bin/jsdoc2md src/utils.js > documentation.md