View previous topic :: View next topic |
Author |
Message |
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sun Apr 25, 2021 4:08 am Post subject: Microsoft x86 WebView2 control - modern web browser. |
|
|
Compiled in VDS5 (requires vdsrun50.dll)
Uses Request For Comment (RFC): VDS Extensions for VDS / requires tsrdll.dsu (included)
http://www.vdsworld.com/forum/viewtopic.php?t=5187&start=0&postdays=0&postorder=asc&highlight=
Must have chromium based edge browser installed in pf(x86) - most people do. License files in zip.
Could not attach or add file at vdsworld.com
https://dialogshell.com/vdswebview.zip
Some initial testing shows we may only need to redistribute these, but I've included all 7 webview2 runtime files.
Microsoft.Web.WebView2.Core.dll
Microsoft.Web.WebView2.WinForms.dll
WebView2Loader.dll
senddll functions
navigatetostring - set html on page.
javascript - execute javascript.
gettitle - get the page title.
geturl - get the current url.
getquery - get the query from the address bar.
navigate - go to a webpage
powershell - The control is $webview. The primary child of that control is $webview.corewebview2. Powershell runs TSR within this DLL, and you can just use it for powershell commands and ignore the webview.
position - position the webview control.
softunload - needed to properly unload the webview control.
Last edited by cnodnarb on Sun Apr 25, 2021 5:56 pm; edited 17 times in total |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sun Apr 25, 2021 4:37 am Post subject: |
|
|
Future: Change example line 14 to this:
%s = @senddll(%%pwsh,navigate","http://dialogscript.com)
For some reason the control really doesn't like vdsworld ;/
It could just be getquery needs work. Not sure.
(getquery required page to be fully loaded, resolved)
Last edited by cnodnarb on Sun Apr 25, 2021 6:14 pm; edited 1 time in total |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sun Apr 25, 2021 2:16 pm Post subject: |
|
|
Just figured out a way to use installed edge folder instead of
'WebView2 Runtime'.
Have to refresh my knowledge on how to do a recursive folder file search in powershell or vds. |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sun Apr 25, 2021 3:43 pm Post subject: |
|
|
ORIGINAL POST (OLD) Updating top post with new.
Compiled in VDS5 (requires vdsrun50.dll)
I have not included any webview controls. Instructions below.
Uses Request For Comment (RFC): VDS Extensions for VDS / requires tsrdll.dsu (included)
http://www.vdsworld.com/forum/viewtopic.php?t=5187&start=0&postdays=0&postorder=asc&highlight=
WebView2 Runtime - install for your architecture
https://developer.microsoft.com/en-us/microsoft-edge/webview2/
https://www.nuget.org/packages/Microsoft.Web.WebView2/
Download nuget and extract using 7zip.
From lib\net45, copy all Microsoft.Web* files to dsc/dll/dsu directory.
Copy runtimes\win-x86\native\WebView2Loader.dll to dsc/dll/dsu directory.
Familiarize with https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution
(There might be a better distribution method than what I have done here)
To use widevine (video), I *think* you need to copy it from the offical edge folder into the profile folder. Mine is working.
senddll functions
navigatetostring - set html on page.
javascript - execute javascript.
gettitle - get the page title.
geturl - get the current url.
getquery - get the query from the address bar.
navigate - go to a webpage
powershell - The control is $webview. The primary child of that control is $webview.corewebview2. Powershell runs TSR within this DLL, and you can just use it for powershell commands and ignore the webview.
position - position the webview control.
softunload - needed to properly unload the webview control. |
|
Back to top |
|
|
|