Skip to content

Uncaught Error: task.matchType value invalid #1

@genesix-eu

Description

@genesix-eu

I am sorry to post this here, but i don't know better place to ask.

I got this code and I can't make it to work.

`

<title> Test </title> <script src="/node_modules/jquery/dist/jquery.min.js"></script> Hello
<script type="text/javascript"> const tasklist = require('tasklist'); const nwwc = require("windows-window-controller"); tasklist({verbose: true}).then(tasks => { console.log(tasks); var table = document.getElementById("test"); for (var i = 0; i < tasks.length; i++) { if (tasks[i].windowTitle !== "N/A"){ var row = table.insertRow(); var cell1 = row.insertCell(0); var cell2 = row.insertCell(1); var cell3 = row.insertCell(2); var cell4 = row.insertCell(3); cell1.innerHTML = tasks[i].imageName; cell2.innerHTML = tasks[i].pid; cell2.setAttribute("id", tasks[i].pid); cell3.innerHTML = tasks[i].memUsage; cell4.innerHTML = tasks[i].windowTitle; cell4.setAttribute("id", tasks[i].windowTitle); } } }) $(document).ready(function() { $("#test").on("click", "td", function() { console.log(event.target.id); // let temp_pid = Number(event.target.id); let temp_pid = event.target.id; console.log(typeof(temp_pid)); nwwc.hide(temp_pid).then((execRet) => console.log(execRet)); // nwwc.hide(event.target.id).then((execRet) => console.log(execRet)); // nwwc.hide(event.target.id).then((execRet) => console.log(execRet)); }); }); </script> `

I always get this error if it's pid "Number" and also if is string "windowTitle".

When I tried to edit user32.js i received empty object and window did not minimized.
Can you point me to what is wrong.

I want to make an app to control opened windows, something like windows taskbar in windows using nwjs -v 0.15.4 64bit and I am on Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions