Where does secondary image in (node.js) Windows 8 toast notification come from? - node.js

I'm using node-notifier (link) in node.js to show a toast notification in Windows 8. I have it working and I'm able to adjust the title, text, and main image in the notification just fine. However, in a Windows 8 toast notifications, there is a secondary (smaller) image. See below:
So, node-notifier uses toaster, which in turn uses ToastNotificationManager. But, I cannot find any reference anywhere to this secondary image. I've looked here and here on Microsoft's site.
This secondary image also shows in other notifications I receive from applications like Outlook, Slack, etc.
Where is this secondary image coming from? Is the documentation just out of date? Can Toaster be modified to access this secondary image?

The secondary image is the icon for the shortcut in the Start Menu folder for the program registered to raise a toast. To change it, you'll need to modify the icon on the shortcut.
For a desktop application to use the ToastNotificationManager class, it is required to have a shortcut in the start menu, and an AppUserModelId associated with that shortcut. At ToastNotificationManager creation time, the caller passes in the same AppUserModelId, which ties back to the associated icon for the shortcut. More about registering desktop applications to raise toasts this can be found on this MSDN documentation page.
Looking at the toaster code here, it is installing the shortcut to a file called toast.lnk in the Start Menu:
String shortcutPath =
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) +
"\\Microsoft\\Windows\\Start Menu\\Programs\\toast.lnk";
And, it is creating the shortcut targeting the initial calling process:
String exePath = Process.GetCurrentProcess().MainModule.FileName;
Updating the icon in the shortcut manually should verify that you can change what is shown locally, but an update to toaster to set the icon location is likely required (to support multiple callers with different shortcuts, or by having it call IShellLink::SetIconLocation).

Related

Is it possible to embed/stream/project the live image of a native Windows window into a webpage?

In the new Microsoft Flight Simulator you can pop different cockpit displays out into their own external windows, like this:
However, none of the buttons needed to interact with the displays get "popped out" as well.
I'd like to build a web app that can embed (the continuously updating image of) one of these windows that I can surround with buttons, etc, for interaction to have, say, running on a tablet next to you.
My question is, is it possible with Node to embed the continuously updating image of a native Windows window within a webpage?
Stumbled upon the Screen Capture API. This is what I was looking for.
https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API

Can we read text from the selected objects in perception simulation

I am automating the hololense application using perception simulation. In one of the scenario, I need to perform click action on the specific objects based on the name.So, Is it possible to read the text of the selected objects ? (Note: I have selected the objects using right hand /light hand move and object is selected with distinguished color )
It seems that you want to build test automation for your app or file explorer base on the Hololens2 emulator. And what your requirement is making it automatically tap an object with a matching name in the emulator.
If so, the emulator does not support the feature which recognizing text or direct returning data from the application memory. However, you can provide more information about your business request and submit a feature request via feedback hub on new feature request to be considered in future releases of HoloLens2 emulator.
For how to post feedback request, you can follow this doc: Send feedback to Microsoft with the Feedback Hub app.
Out of the field of HoloLens app development, you can code your own desktop program to capture the view in the emulator window, and then use OCR technology to recognize the character in the screen. Finally, customize your input to the simulator according to the result. However, this is not a simple way.

Working with Mainframe application in Blue Prism.

I've been working whit Blue Prism on a project that was using at one point IBM mainframe application(ICBS). I've mange to get it working, but only problem that I had was Login in to therminal.
My robot lunched application as mainframe app, but after that therminal is asking me to login in, but its doing that in standard Win window - whit option to enter login and password.
Problem is that Blue Prism is not able to spy on thoes elements because it's launched as mainframe.
If I launch this app as standard win application, then there is no problem in login in, but after that working whit mainframe screen is imposible because I can't spy on specyfic elements of the green screens.
I was trying to launched as mainframe, then using another object(Win app) to logon and then go back to mainframe but I cant to Attach Win app Object to allready launched mainframe object. I get "could not be found" error when I'm tring to Attach.
Any idea how to get it working?
Cheers,
RAFEL
Well, there's no other way than having two different objects.
The first one should be the "Mainframe Application" object that is launching from executable file.
The second one should be the "Windows Applications" object that is attaching to appearing window.
I am guessing that you're having a problem with attaching the second object to the window.
The Blue Prism when trying to attach to the object is checking two things:
The name of the process - you can find that information using task manager.
The window title of the target Application - that's the title that is visible at the top of the window.
There is possibility to use *,# and others as wildcard characters.
You'll have to try there around there to get that working.
Below you can find a print screen of one of mine objects that attaches to windows photo viewer.

Desktop capture - Does not show all windows during sharing contents of Desktop

Here is the link to my extension code:
Trying to capture desktop image using getUserMedia and canvas
The problem is that when I use :
chrome.desktopCapture.chooseDesktopMedia(["screen", "window"],onAccessApproved);
It asks me to share contents of my screen. But it doesn't show all windows that are active on my desktop.
Example: Sometimes my skype is minimised and if click the extension icon it opens a sharing panel and asks me to share desktop contents but skype window is not shown in this panel. If I click on skype from my task bar, the sharing panel shows skype. Reason for this behaviour?
How to show all my windows on sharing screen?
Well, the behavior is consistent: on Windows, minimized windows are not shown as eligible capture targets. There is no way around it.
This limitation is not documented, which is regrettable; it may also be OS-specific.
Specifically, Windows implementation contains the following comment:
// Skip windows that are invisible, minimized, have no title, or are owned,
// unless they have the app window style set.
Interestingly, this seems more like a Mac limitation than a Windows one:
// Return a 1x1 black frame if the window is minimized, to match the behavior
// on Mac.

Show balloon notification with latest change log entries on update

I would like to display the latest top 3-5 entries of my extension change log (TXT file) when it's auto-updated and ideally in a balloon-type event like the one when you have successfully installed an extension. It should show/popup near the wrench-icon area. Like a replacement for #history that GM scripts have.
There are already a few SO questions about how to get extension version like here.
There are also one here to detect if it's an install or update based on version.
It is not desktop notifications I want.
My question is how to make the balloon and populate it with the lines.
An alternative is open my options.html page in a new tab and show the change log entries there somehow. Requires tabs permission in the manifest.json file.
chrome.tabs.create({url:chrome.extension.getURL('options.html')});
Any ideas how to do this?
Or is this impossible to do?
There's neither a mechanism to create a "balloon" notification (that's reserved for native Chrome code), nor to pop out the popup without user interaction. Your automatic notification methods are fairly limited: creating a new tab with a changelog is certainly possible, but not particularly user-friendly (since it will simply open at some arbitrary time, completely remote from the user's intent).
If possible, I'd suggest waiting to notify the user until she interacts in some way with the extension. Clicking on a page-action, for instance, could have some sort of infobar-like note at the top of the popup's UI inviting the user to read more about the update.

Resources