Issue with overwolf.media.takeWindowsScreenshotByName

Issue Description: API function ‘overwolf.media.takeWindowsScreenshotByName’ is not working
Steps to reproduce:
Code used:
overwolf.media.takeWindowsScreenshotByName(windowNames.inGame, false, (answer) => {
DotaLogger.log("overwolf.media.takeWindowsScreenshotByName: Answer = " + JSON.stringify(answer))
})

I get the following error message: “overwolf.media.takeWindowsScreenshotByName: Answer = {“status”:“error”,“success”:false,“error”:“Can’t find window: inGame”}”

Impact for my app: low, as I don’t use the functionality in my app yet.

Do you currently have a workaround? No.

Hi @Michel,

I will check it and let you know.

Thanks.

Hi,

We added the bug to our backlog. Currently, there is no ETA, but I will update you here once the fix is released.

Thanks.

Hi @Michel,

Can you please clarify what you are trying to do? To take a screenshot of one of your app’s windows or take a screenshot of other OS windows?

This function is to capture a native OS window by it’s OS Title - for example - “Untitled - Notepad”.

To capture one of your app’s windows you should use HTML5 Canvas.toDataURL().

I understand that this was not clear, so I updated our docs and added this note.

I hope that now everything is clear and makes sense.

Thanks,
Eran

Dear Eran,

I would like to take screenshot of my app’s windows.

Unfortunately I can’t use Canvas.toDataURL, as my windows are not Canvas elements. Or am I missing something?

Best regards,
Michel

Hi @Michel,

Can you send me your app’s OPK? or it’s already in the store?

Thanks.

Yes, it’s already in the store: Dota Coach

Hi @Michel,

You should generate the canvas. For example, using html2canvas.js:

https://stackoverflow.com/questions/4340056/can-you-take-a-screenshot-of-the-page-using-canvas

Thanks