1.0.8 • Published 1 year ago

sciter-utils v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

sciter utils

Useful functions for sciter.js.

demo

  • git clone the repository
  • install packages npm install
  • install latest sciter sdk npm run install-sdk
  • start the demo npm run scapp

demo requirements

  • A recent version of Node.js node (tested with 16 LTS) and its package manager npm.

add to your project

using npm

  • install package npm install sciter-utils
  • add to <script type="module">

copy source

  • 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);
});

functions

dpi

  • devicePixels()
  • dipPpx()
  • ppxDip()
  • mmPpx()

screen and window

  • monitorsCount()
  • logMonitors()
  • screenDimensions()
  • windowRect()
  • windowDimensions()
  • setWindowDimensions()
  • centerWindow()
  • centerWindowXY()
  • addReloadWindow()
  • minimizeWindowShortcut()
  • closeWindowOnEscape()
  • bringToFrontWindow()
  • focusWindow()

keyboard

  • keyLogger()
  • addKeyboardShortcut()
  • keyStr()

files

  • fileExists()
  • dirExists()
  • getSeparator()
  • splitPath()

json

  • loadJson()
  • saveJson()

misc.

1.0.2

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago