It is currently May 19th, 2024, 10:40 am

PluginWebView - Make skin using web technology

Share and get help with Plugins and Addons
User avatar
tass_co
Posts: 518
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: PluginWebView - Make skin using web technology

Post by tass_co »

Yincognito wrote: May 20th, 2022, 2:17 pm I understand. Well, you can't expect to just add stuff to something and then to magically work - usually some effort is required to get what you want. That being said, if you're only after the text contents of the clipboard, you can integrate the Get-Clipboard and Set-Clipboard commands from Powershell in a standard RunCommand measure, something that is pretty trivial to implement.
Manage Clipboard.jpg
Or, you can use the !SetClip bang from Rainmeter for setting the clipboard part.

If you need more than such basic abilities, you'd obviously have to explore other more complex avenues... :confused:
You are right. I know it won't happen without effort.
I have to work on it.
Thank you.
I don't know where i going from here, but i promise it won't be boring... :great:
User avatar
Jax
Posts: 104
Joined: June 7th, 2021, 11:46 am

Re: PluginWebView - Make skin using web technology

Post by Jax »

Hi there! I am having a bit of trouble with trying to build the plugin myself with Visual Studio 2022. When I try to build after following the instructions from the GitHub repo, I get this error

Code: Select all

Severity    Code    Description    Project    File    Line    Suppression State
Error        This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\Source\Repos\rainmeter\packages\Microsoft.Web.WebView2.1.0.1054.31\build\native\Microsoft.Web.WebView2.targets.    PluginWebView    C:\Users\Jax\source\repos\PluginWebView\PluginWebView.vcxproj    237    
Tried updating the NuGet packages but still no luck. I wanted to simply replace "Click OK to get one from the darkweb" with "WebView2 runtime is required. Install now?" in https://github.com/khanhas/PluginWebView/blob/main/src/plugin.cpp. If possible, please tell me what I have to do to resolve the build error, or better... build the plugin with the label change! Thanks in advance :rosegift:
User avatar
Yincognito
Rainmeter Sage
Posts: 7286
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: PluginWebView - Make skin using web technology

Post by Yincognito »

Jax wrote: November 1st, 2022, 1:17 pmI wanted to simply replace "Click OK to get one from the darkweb" with "WebView2 runtime is required. Install now?" in https://github.com/khanhas/PluginWebView/blob/main/src/plugin.cpp.
The way I see it, in this case, there are several options having varying degrees of success:
- hex editing the executable itself to change the dialog text or its representation (if possible)
- editing the .csproj file to remove or adjust the <Import ...><Target>...</Target> part where the error text is found (if it works)
- cleaning up the existing and installing the suited NuGet packages from scratch (if confident)
- make more in depth adjustments to the code itself to remove such dependencies (if you know how)
- close the dialog and download the Microsoft Edge WebView2 Runtime directly (if you want the easy way out)

P.S. This crossed my mind as well, since the dialog text is a bit creepy for a regular user, but then it's safe and works in the end, so I guess the whole thing was just a little joke from the developer's part... :twisted:
P.S.S. I didn't test it, but I'd be curious if the dialog still shows up if the said runtime package is already installed in the system (via direct install). :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Jax
Posts: 104
Joined: June 7th, 2021, 11:46 am

Re: PluginWebView - Make skin using web technology

Post by Jax »

Yincognito wrote: November 1st, 2022, 3:07 pm editing the .csproj file to remove or adjust the <Import ...><Target>...</Target> part where the error text is found (if it works)
Tried this... when building I get syntax errors from https://github.com/rainmeter/rainmeter/blob/master/Common/StringUtil.h line 69. Nothing builds at the end :(
Yincognito wrote: November 1st, 2022, 3:07 pm P.S. This crossed my mind as well, since the dialog text is a bit creepy for a regular user, but then it's safe and works in the end, so I guess the whole thing was just a little joke from the developer's part...
I am looking forward to distribute skins with this plugin to a lot of users, so I wanted to make sure that it wouldn't come off as malicious to them.
Additionally, if the C++ Runtime isn't installed on the system, the plugin fails to load completely with the error 126.
User avatar
Yincognito
Rainmeter Sage
Posts: 7286
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: PluginWebView - Make skin using web technology

Post by Yincognito »

Jax wrote: November 2nd, 2022, 3:00 amTried this... when building I get syntax errors from https://github.com/rainmeter/rainmeter/blob/master/Common/StringUtil.h line 69. Nothing builds at the end :(
Yeah, well, it was a blind suggestion based on what others experienced, since I didn't install VS yet (will do it on the next clean install of the OS).
Jax wrote: November 2nd, 2022, 3:00 amI am looking forward to distribute skins with this plugin to a lot of users, so I wanted to make sure that it wouldn't come off as malicious to them.
Additionally, if the C++ Runtime isn't installed on the system, the plugin fails to load completely with the error 126.
I look forward to do the same, when my 3D Earth skin will be completed and released (the only thing left to do is to make the atmosphere in a diferent way than it is done now, for better realism). In my case, I'll post the proper links to both runtime packages (C++ and WebView2) when writing the skin description anyway, so I don't have to bother with changing anything when it comes to these dependencies. Generally, I try to avoid dependencies, but in this case are necessary so my "strategy" is to provide them separately as links and let the user handle their installation and management.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
RonXTCdaBass
Posts: 7
Joined: December 17th, 2022, 3:13 am
Location: Berlin, Germany

Re: PluginWebView - Make skin using web technology

Post by RonXTCdaBass »

Hello @ all!

Maybe can someone help me... :???:
my english is not really good, but i understand more as i can say or write.

I´m using Win7 64bit, have installed the MS Edge and the Webview components but all tries to use this shown only empty borders.
no content.

1´ve tested all files from the "PluginWebViewExample" folder but nothing...

the Plugin seems installed: %MYPATH%\Rainmeter\Skins\@Vault\Plugins\WebView\0.1.0\... 32 & 64 bit, all files exist.
the about rainmeter shows in the plugin tab the "WebView.dll 0.1.0 too...

i tried a simple Twitch-Chat to show:

Code: Select all

[Rainmeter]
Update=100000000000000000000

SkinWidth=320
SkinHeight=500
Background=#Background#
BackgroundMode=3
BackgroundMargins=0,34,0,14
FontColor=255,255,255,140

[Variables]
;-----------------------
@Include1=#@#GeneralVariables.inc

[MeterAllBackground]
Meter=Shape
Shape=Rectangle 0.5,0.5,320,500,12 | Fill Color #BackgroundColor# | StrokeWidth 1.5 | Stroke Color #FrameColor#

[mes]
Measure=Plugin
Plugin=WebView
URL=https://nightdev.com/hosted/obschat?theme=dark&channel=ronxtcdabass&fade=180&bot_activity=true&prevent_clipping=false
X=20
Y=20

[dummy]
meter=string
W=320
H=500
SolidColor=0,0,0,1

[MeasureAverageCPU]
Measure=CPU

[MeasureCPU1]
Measure=CPU
Processor=1
Image

maybe is it only a little mistaky by me, or something what easy to solve ;)

Thanks and happy hollidays!!
User avatar
balala
Rainmeter Sage
Posts: 16238
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: PluginWebView - Make skin using web technology

Post by balala »

RonXTCdaBass wrote: December 17th, 2022, 3:44 am the Plugin seems installed: %MYPATH%\Rainmeter\Skins\@Vault\Plugins\WebView\0.1.0\... 32 & 64 bit, all files exist.
the about rainmeter shows in the plugin tab the "WebView.dll 0.1.0 too...
In the @Vault folder you have only a copy of the plugin files, but these are not used by Rainmeter. The place where Rainmeter stores the installed plugins is c:\Users\<YourName>\AppData\Roaming\Rainmeter\Plugins\. But if you have the plugin listed onto the Plugins tab of the About windows, it's ok, and Rainmeter sees and uses it.
RonXTCdaBass wrote: December 17th, 2022, 3:44 am i tried a simple Twitch-Chat to show:
You have a huge problem with the Update value of the posted code. Update=100000000000000000000 means an update on every 100,000,000,000,000,000,000 milliseconds, so one update per 100,000,000,000,000,000 seconds. And this means more than three million years! So for first replace please the Update with the default Update=1000 (or at least remove the Update option from the [Rainmeter] section, in which case the skin will use the default value, which is 1000).
Do you get the skin working with this Update?
User avatar
RonXTCdaBass
Posts: 7
Joined: December 17th, 2022, 3:13 am
Location: Berlin, Germany

Re: PluginWebView - Make skin using web technology

Post by RonXTCdaBass »

Good morning and thanks for the fast answer!
balala wrote: December 17th, 2022, 6:58 am In the @Vault folder you have only a copy of the plugin files, but these are not used by Rainmeter. The place where Rainmeter stores the installed plugins is c:\Users\<YourName>\AppData\Roaming\Rainmeter\Plugins\. But if you have the plugin listed onto the Plugins tab of the About windows, it's ok, and Rainmeter sees and uses it.
1. the plugins in the folder came with the install. 2. Yes, the plugin is displayed in the About tab. In the folderc:\Users\<YourName>\AppData\Roaming\Rainmeter\Plugins\ the 64bit version seems to be according to the file size.
You have a huge problem with the Update value of the posted code. Update=100000000000000000000 means an update on every 100,000,000,000,000,000,000 milliseconds, so one update per 100,000,000,000,000,000 seconds. And this means more than three million years! So for first replace please the Update with the default Update=1000 (or at least remove the Update option from the [Rainmeter] section, in which case the skin will use the default value, which is 1000).
Do you get the skin working with this Update?
Haha yes, the update time was funny, but even after changing it to Update=1000, the part doesn't show me anything.
However, none of the skins from the pack "PluginWebView_0.1.0.rmskin" show me anything either.

I just reinstalled: Edge and WebView, no change.
User avatar
balala
Rainmeter Sage
Posts: 16238
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: PluginWebView - Make skin using web technology

Post by balala »

RonXTCdaBass wrote: December 17th, 2022, 7:23 am 1. the plugins in the folder came with the install. 2. Yes, the plugin is displayed in the About tab. In the folderc:\Users\<YourName>\AppData\Roaming\Rainmeter\Plugins\ the 64bit version seems to be according to the file size.
In this case the plugin is properly installed and Rainmeter should have to be able to use it.
RonXTCdaBass wrote: December 17th, 2022, 7:23 am Haha yes, the update time was funny, but even after changing it to Update=1000, the part doesn't show me anything.
However, none of the skins from the pack "PluginWebView_0.1.0.rmskin" show me anything either.

I just reinstalled: Edge and WebView, no change.
Don't know what to say. Do you have any message in the log?
User avatar
RonXTCdaBass
Posts: 7
Joined: December 17th, 2022, 3:13 am
Location: Berlin, Germany

Re: PluginWebView - Make skin using web technology

Post by RonXTCdaBass »

balala wrote: December 17th, 2022, 3:10 pm In this case the plugin is properly installed and Rainmeter should have to be able to use it.

Don't know what to say. Do you have any message in the log?
The logfile:

Code: Select all

NOTE (16:23:59.002) Ron\Chat\chat.ini: Refreshing skin
DBUG (16:23:59.003) Ron\Chat\chat.ini: Reading file: C:\Users\Home64\Documents\Rainmeter\Skins\Ron\Chat\chat.ini
DBUG (16:23:59.004) Ron\Chat\chat.ini: Reading file: C:\Users\Home64\Documents\Rainmeter\Skins\Ron\@Resources\GeneralVariables.inc
DBUG (16:23:59.005) : Reading file: C:\Users\Home64\AppData\Roaming\Rainmeter\Rainmeter.ini
DBUG (16:23:59.112) Ron\Chat\chat.ini: Local Font families: Count=20 Source: @Resources=C:\Users\Home64\Documents\Rainmeter\Skins\Ron\@Resources\Fonts\
DBUG (16:23:59.113) Ron\Chat\chat.ini: Local Font families: DS-Digital, DS-Digital Bold, DS-Digital Bold Italic, DS-Digital Italic, DS-Digital Normal, Fira Sans, Fira Sans Bold, Fira Sans ExtraBold, Fira Sans Heavy, Fira Sans Light, Fira Sans Medium, Fira Sans Regular, Fira Sans SemiBold, Fira Sans Thin, Fira Sans Ultra, Fira Sans UltraLight, Font Awesome 5 Free, Font Awesome 5 Free Solid, Slider, Slider Regular
DBUG (16:23:59.137) : Plugin loaded: C:\Program Files\Rainmeter\Plugins\WebView.dll
NOTE (16:24:08.448) Ron\yin_yang\yin_yang.ini: Refreshing skin
DBUG (16:24:08.449) Ron\yin_yang\yin_yang.ini: Reading file: C:\Users\Home64\Documents\Rainmeter\Skins\Ron\yin_yang\yin_yang.ini
DBUG (16:24:08.450) Ron\yin_yang\yin_yang.ini: Reading file: C:\Users\Home64\Documents\Rainmeter\Skins\Ron\@Resources\GeneralVariables.inc
DBUG (16:24:08.451) : Reading file: C:\Users\Home64\AppData\Roaming\Rainmeter\Rainmeter.ini
DBUG (16:24:08.463) Ron\yin_yang\yin_yang.ini: Local Font families: Count=20 Source: @Resources=C:\Users\Home64\Documents\Rainmeter\Skins\Ron\@Resources\Fonts\
DBUG (16:24:08.464) Ron\yin_yang\yin_yang.ini: Local Font families: DS-Digital, DS-Digital Bold, DS-Digital Bold Italic, DS-Digital Italic, DS-Digital Normal, Fira Sans, Fira Sans Bold, Fira Sans ExtraBold, Fira Sans Heavy, Fira Sans Light, Fira Sans Medium, Fira Sans Regular, Fira Sans SemiBold, Fira Sans Thin, Fira Sans Ultra, Fira Sans UltraLight, Font Awesome 5 Free, Font Awesome 5 Free Solid, Slider, Slider Regular
NOTE (16:24:22.967) WebParserTest\WebParserTest.ini: Refreshing skin
DBUG (16:24:22.968) WebParserTest\WebParserTest.ini: Reading file: C:\Users\Home64\Documents\Rainmeter\Skins\WebParserTest\WebParserTest.ini
DBUG (16:24:22.972) : Reading file: C:\Users\Home64\AppData\Roaming\Rainmeter\Rainmeter.ini
DBUG (16:24:22.977) : Plugin loaded: C:\Users\Home64\AppData\Roaming\Rainmeter\Plugins\CheckNet.dll
DBUG (16:24:25.028) WebParserTest\WebParserTest.ini - [MeasureWebParser]: Fetching: http://www.msftncsi.com/ncsi.txt
DBUG (16:24:25.049) WebParserTest\WebParserTest.ini - [MeasureWebParser]: Fetching: Success!
DBUG (16:24:25.050) WebParserTest\WebParserTest.ini - [MeasureWebParser]: Parsing data...
DBUG (16:24:25.050) WebParserTest\WebParserTest.ini - [MeasureWebParser]: Parsing data...done!
and i have an idea.... maybe the "GeneralVariables.inc" ?

Code: Select all

[Variables]

;--- Background & Border Variables to change the design ---
;Background=#@#Images\Background-color-dark.png
;Background=#@#Images\Background-color.png
;Background=#@#Images\Background-box.png
Background=#@#Images\Background-box-purple.png
;Background=#@#Images\ButtonBox-slim.png
;---BG pictures end---

BackgroundAlpha=40
BackgroundColor=0,0,0,#BackgroundAlpha#
FrameColor=120,120,120,20
RapidColor=244,125,67,255

; Font Variables original
;TextFont=Fira Sans
;MediumTextFont=Fira Sans Medium
;ThinFont=Fira Sans Light

; Font Variables 
fontName=Trebuchet MS
TextFont=Trebuchet MS
MediumTextFont=Trebuchet MS
ThinFont=Trebuchet MS
textSize=8
CPUfont=8
FontHeight=9

; Color Variables
LabelColor=255,255,255
ValueColor=255,255,255
colorBar=235,160,80,255
colorText=255,255,255,205
colorCPU=235,180,0,255
CoolColor=0,255,255,140
IconAlpha=200
MoonAlpha=140

; Symbol Variables
Degrees=°

; Image Variables.
ImagePath=#@#Images\

; scale factor
Scale=1.00

;measureDay Variables ---->FormatLocale=#Local#<-----
Local=de-DE

;RSS Variables
FontColor=255,255,255
ShadowColor=0,0,0,128
HoverColor=0,0,0,110
ButtonColor=255,255,255,200
ActiveColor=128,192,255,217
YellowColor=255,255,0,255
;--->launcher active & passive<---
LauncherA=166, 0, 255,180 
LauncherP=0,255,255,140

LineHeight=14
ItemWidth=295
HoverH=(#LineHeight#+1)
i will look later here. i must visit a friend now.
Last edited by SilverAzide on December 17th, 2022, 3:34 pm, edited 1 time in total.
Reason: Please use code tags instead of snippet tags when posting code (or logs). It's the </> button.