winctl | Windows window manipulation for node.js

 by   thraaawn C++ Version: Current License: No License

kandi X-RAY | winctl Summary

kandi X-RAY | winctl Summary

winctl is a C++ library. winctl has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Windows window manipulation for node.js. winctl wraps a few functions of the windows api to allow iterating over currently opened windows and performing a few limited operations on them. This is not a production ready module! There is no real documentation either yet. Sorry for that. The example has to suffice for now.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              winctl has a low active ecosystem.
              It has 57 star(s) with 26 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 6 open issues and 0 have been closed. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of winctl is current.

            kandi-Quality Quality

              winctl has no bugs reported.

            kandi-Security Security

              winctl has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              winctl does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              winctl releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of winctl
            Get all kandi verified functions for this library.

            winctl Key Features

            No Key Features are available at this moment for winctl.

            winctl Examples and Code Snippets

            Example
            C++dot img1Lines of Code : 71dot img1no licencesLicense : No License
            copy iconCopy
            var winctl = require('../');
            
            var win = winctl.GetActiveWindow();
            
            // Output some information about the currently active window
            console.log("Active Window Hwnd:", win.getHwnd());
            console.log("Active Window Title:", win.getTitle());
            console.log("Dimen  
            Building
            C++dot img2Lines of Code : 3dot img2no licencesLicense : No License
            copy iconCopy
            npm install -g node-gyp
            
            node-gyp configure
            node-gyp build
              

            Community Discussions

            Trending Discussions on winctl

            QUESTION

            Detect when the user unlocks the workstation
            Asked 2017-Apr-13 at 12:01

            I'm trying to detect when a user unlocks their workstation. The following code attempts to register the window to receive session change messages using WTSRegisterSessionNotification(). Supposedly after this I can listen for WM_WTSSESSION_CHANGE which can contain WTS_SESSION_UNLOCK as a param.

            Issue: Currently WTSRegisterSessionNotification() always returns false.

            Anyone know how I can achieve this? I'm on Windows 10 btw.

            ...

            ANSWER

            Answered 2017-Apr-10 at 01:52

            You should not be using winctl.GetActiveWindow to get a HWND because you don't actually know which window is active. As far as I can tell GetActiveWindow calls GetForegroundWindow internally and that is insane for two reasons:

            1. GetForegroundWindow returns the foreground window on the users desktop and could be a window in another application.
            2. Windows has an actual function named GetActiveWindow and it is not the same as calling GetForegroundWindow.

            Create a hidden native window somehow or use a window provided by electron (GetTopLevelNativeWindow perhaps?)

            GetLastError returns the wrong value because you are calling it too late. There is a thick layer of stuff between you and the native Windows function and something is calling SetLastError before you regain control. The 'ffi' library needs a way to specify that you want it to call GetLastError on your behalf immediately after calling the requested function.

            And finally, a Windows BOOL is int sized and I'm guessing node.js treats it as a byte?

            Source https://stackoverflow.com/questions/43310224

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install winctl

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/thraaawn/winctl.git

          • CLI

            gh repo clone thraaawn/winctl

          • sshUrl

            git@github.com:thraaawn/winctl.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link