forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Microsoft x86 WebView2 control - modern web browser.

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Other Product Support/Announcements
View previous topic :: View next topic  
Author Message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Apr 25, 2021 4:08 am    Post subject: Microsoft x86 WebView2 control - modern web browser. Reply with quote

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
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Apr 25, 2021 4:37 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Apr 25, 2021 2:16 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Sun Apr 25, 2021 3:43 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Other Product Support/Announcements All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group