Closed RaptorX closed 5 months ago
hmm, I think I figured something out.
cookiemanager := browser.CookieManager
cookiemanager.GetCookies('https://www.shein.com', WebView2.Handler(cookies))
This didnt throw an error at least, now ill figure out how the handler function must be setup.
It seems like the handler receives a pointer but im not sure how to convert that pointer to an ahk object or how to use it:
cookiemanager := browser.CookieManager
cookiemanager.GetCookies('https://www.site.com', WebView2.Handler(cookies))
cookies(result)
{
OutputDebug result
}
any ideas as to what should i do from here?
class Handler extends Buffer {
/**
* Construct ICoreWebView2 Event or Completed Handler.
* @param invoke_cb Invoke function of handler.
* The first parameter of the callback function is the event interface pointer.
* @see https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2acceleratorkeypressedeventhandler
*/
GetCookies uses the ICoreWebView2GetCookiesCompletedHandler
cookiemanager := browser.CookieManager
cookiemanager.GetCookies('https://www.site.com', WebView2.Handler(cookies))
cookies(_, result, cookieList)
{
cookieList := WebView2.CookieList(cookieList)
}
Hey,
Im building a little tool that will use your webview2 class. I got it to where i need it but im wondering if it is possible to have an example of how to fetch a given cookie or at least get a list of the current cookies which i could then loop over.
The problem is that i dont seem to use any of the cookie objects/methods because they all have errors like this:
I've tried many different variations like this:
All end up saying that
ComCall
parameter#2
is invalid. :(