GithubHelp home page GithubHelp logo

yvesh / active-windows Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 10.0 48 KB

Node C++ N-API module to get information on the currently selected window on Linux and Windows.

Python 11.56% C++ 83.50% JavaScript 4.94%

active-windows's People

Contributors

acs-godonnell avatar yvesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

active-windows's Issues

Problem with cyrillic charset

{
os: 'windows',
windowClass: 'chrome.exe',
windowName: "╨Ф╨╢╨╕╨╜╤Б╤Л 511 Slim Fit Levi's┬о 6407635 ╨║╤Г╨┐╨╕╤В╤М ╨╖╨░ 3┬а544┬атВ╜ ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В-╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ Wildberries - Google Chrome",
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}
{
os: 'windows',
windowClass: 'chrome.exe',
windowName: "╨Ф╨╢╨╕╨╜╤Б╤Л 511 Slim Fit Levi's┬о 6407635 ╨║╤Г╨┐╨╕╤В╤М ╨╖╨░ 3┬а544┬атВ╜ ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В-╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ Wildberries - Google Chrome",
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}
{
os: 'windows',
windowClass: 'chrome.exe',
windowName: '╨Ъ╤Г╨┐╨╕╤В╤М ╨╝╤Г╨╢╤Б╨║╨╕╨╡ ╨┤╨╢╨╕╨╜╤Б╤Л ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В ╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ WildBerries.ru - Google Chrome',
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}
{
os: 'windows',
windowClass: 'chrome.exe',
windowName: '╨Ъ╤Г╨┐╨╕╤В╤М ╨╝╤Г╨╢╤Б╨║╨╕╨╡ ╨┤╨╢╨╕╨╜╤Б╤Л ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В ╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ WildBerries.ru - Google Chrome',
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}
{
os: 'windows',
windowClass: 'chrome.exe',
windowName: '╨Ъ╤Г╨┐╨╕╤В╤М ╨╝╤Г╨╢╤Б╨║╨╕╨╡ ╨┤╨╢╨╕╨╜╤Б╤Л ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В ╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ WildBerries.ru - Google Chrome',
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}
{
os: 'windows',
windowClass: 'chrome.exe',
windowName: '╨Ъ╤Г╨┐╨╕╤В╤М ╨╝╤Г╨╢╤Б╨║╨╕╨╡ ╨┤╨╢╨╕╨╜╤Б╤Л ╨▓ ╨╕╨╜╤В╨╡╤А╨╜╨╡╤В ╨╝╨░╨│╨░╨╖╨╕╨╜╨╡ WildBerries.ru - Google Chrome',
windowDesktop: '0',
windowType: '0',
windowPid: '9608',
idleTime: '0'
}

Hook shell message.

Question:

Would it be possible to have a binding/function for hooking shell messages?

What is it useful for?

That allows us to know when a new windows is created, changes state or is removed.
That would allow for some awesome new integrations and utilities (in my case, i'm making a windows taskbar replacement with only webtech)

Here's one example in AHK for reference:

DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )
Return

ShellMessage( wParam,lParam ) {
  Local k
  If ( wParam = 1 ) ;  HSHELL_WINDOWCREATED
     {
      ; A new window was created.
      ; Diferent callbacks could be called for different events, or a single one with the event enum as argument.
     }
}

MacOS returning wrong data

Running this on my mac I get current data on any active window

  os: 'macos',
  windowClass: 'wm_class',
  windowName: 'wm_name',
  windowDesktop: 't',
  windowType: 'd',
  windowPid: 'b'

Build fails on linux

When I install this module on linux, the build fails.

prebuild-install WARN install No prebuilt binaries found (target=10.16.3 runtime=node arch=x64 libc= platform=linux)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.