Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ab008f6
Add WebView2 Rainmeter plugin with bang command support and an exampl…
NSTechBytes Dec 7, 2025
9388022
Add new member variables for action handling
RicardoTM05 Dec 8, 2025
aa35a93
Add OnFinishAction and OnPageLoadAction handling
RicardoTM05 Dec 8, 2025
67d7812
Prevent multiple creation of WebView2 environment
RicardoTM05 Dec 8, 2025
c3643f7
Refactor WebView2 creation logic for better validation
RicardoTM05 Dec 8, 2025
8e1c7f2
Remove unnecessary Rainmeter redraw triggers
RicardoTM05 Dec 8, 2025
e0111e1
Implement synchronous script execution in WebView2
RicardoTM05 Dec 9, 2025
3899200
Restore to previous working version.
RicardoTM05 Dec 9, 2025
fcfc077
Add new properties and UpdateRaincontext function
RicardoTM05 Dec 10, 2025
b48bf00
Add raincontext management to Measure class
RicardoTM05 Dec 10, 2025
edb5084
Added handling of new actions and raincontext.
RicardoTM05 Dec 10, 2025
8e397a9
Refactor for dual control handling
RicardoTM05 Dec 11, 2025
90c430d
Implement AllowDualControl feature
RicardoTM05 Dec 11, 2025
38144bc
Add currentUrl member to Plugin class
RicardoTM05 Dec 11, 2025
899ddf8
Update WebView2.cpp
RicardoTM05 Dec 11, 2025
24ce69e
added zoomFactor double
RicardoTM05 Dec 11, 2025
3de406e
added zoomFactor
RicardoTM05 Dec 11, 2025
2834a3a
Added ZoomFactor
RicardoTM05 Dec 11, 2025
1db6d10
Merge pull request #7 from RicardoTM05/working2
NSTechBytes Dec 12, 2025
a678ab9
updated skin provided by the RicardoTM.
NSTechBytes Dec 14, 2025
42d1be5
updated skins version from 0.0.6 to 0.0.7
NSTechBytes Dec 14, 2025
53ebe6f
updated plugin version from 0.0.6 to 0.0.7
NSTechBytes Dec 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Build-CPP.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#usage -----> powershell -ExecutionPolicy Bypass -Command "& {. .\Build-CPP.ps1; Dist -major 0 -minor 0 -patch 5}"
#usage -----> powershell -ExecutionPolicy Bypass -Command "& {. .\Build-CPP.ps1; Dist -major 0 -minor 0 -patch 6}"
$msbuild = "C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\MSBuild.exe"

function Add-RMSkinFooter {
Expand Down
90 changes: 73 additions & 17 deletions Resources/Skins/WebView2/BangCommand/BangCommand.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ DynamicWindowSize=1
Name=BangCommand
Author=nstechbytes
Information=Demonstrates controlling WebView2 via !CommandMeasure bangs.
Version=0.0.6
Version=0.0.7
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[Variables]
WebURL=https://nstechbytes.pages.dev/
WebW=600
WebH=350
WebH=500
WebX=300
WebY=25
WebY=45
ZoomFactor=1.0
Hidden=0
ClickThrough=0
AllowDualControl=1

; ========================================
; Measure
; ========================================
Expand All @@ -28,15 +32,25 @@ W=#WebW#
H=#WebH#
X=#WebX#
Y=#WebY#
ZoomFactor=#ZoomFactor#
Hidden=#Hidden#
ClickThrough=#ClickThrough#
AllowDualControl=#AllowDualControl#
OnWebViewLoadAction=[!log "WebView loaded succesfully!"]
OnWebViewFailAction=[!log "WebView failed :("]
OnPageFirstLoadAction=[!log "First time on this page!"]
OnPageLoadStartAction=[!log "Navigation has started!"]
OnPageLoadingAction=[!log "Page is loading!"]
OnPageLoadFinishAction=[!log "Navigation has finished!"]
OnPageReloadAction=[!log "Page has been reloaded!"]
DynamicVariables=1

; ========================================
; Background
; ========================================
[MeterBackground]
Meter=Shape
Shape=Rectangle 0,0,950,420,12 | FillColor 0,0,0,200 | StrokeWidth 0
Shape=Rectangle 0,0,920,570,12 | FillColor 0,0,0,200 | StrokeWidth 0

[Title]
Meter=String
Expand Down Expand Up @@ -65,23 +79,23 @@ MeterStyle=StyleButtonText
Text=Navigate to Google (via Variable)
X=150
Y=58
LeftMouseUpAction=[!SetVariable WebURL "https://www.google.com"][!UpdateMeasure MeasureWebView][!Redraw]
LeftMouseUpAction=[!SetVariable WebURL "https://www.google.com"][!UpdateMeasure MeasureWebView]

[TxtNavigateGitHub]
Meter=String
MeterStyle=StyleButtonText
Text=Navigate to GitHub (via Variable)
X=150
Y=88
LeftMouseUpAction=[!SetVariable WebURL "https://github.com"][!UpdateMeasure MeasureWebView][!Redraw]
LeftMouseUpAction=[!SetVariable WebURL "https://github.com"][!UpdateMeasure MeasureWebView]

[TxtNavigateExample]
[TxtNavigateForum]
Meter=String
MeterStyle=StyleButtonText
Text=Navigate to Example (via Bang)
Text=Navigate to Forum (via Bang)
X=150
Y=118
LeftMouseUpAction=[!CommandMeasure MeasureWebView "Navigate https://example.com"]
LeftMouseUpAction=[!CommandMeasure MeasureWebView "Navigate https://forum.rainmeter.net/"]

[TxtReload]
Meter=String
Expand Down Expand Up @@ -119,7 +133,7 @@ W=122
H=24
X=86
Y=208
LeftMouseUpAction=[!SetVariable Hidden 0][!UpdateMeasure MeasureWebView][!Redraw]
LeftMouseUpAction=[!SetVariable Hidden 0][!UpdateMeasure MeasureWebView]

[TxtHide]
Meter=String
Expand All @@ -129,15 +143,15 @@ W=125
H=24
X=212
Y=208
LeftMouseUpAction=[!SetVariable Hidden 1][!UpdateMeasure MeasureWebView][!Redraw]
LeftMouseUpAction=[!SetVariable Hidden 1][!UpdateMeasure MeasureWebView]

[TxtExecuteScript]
Meter=String
MeterStyle=StyleButtonText
Text=Execute Script
X=150
Y=238
LeftMouseUpAction=[!CommandMeasure MeasureWebView "ExecuteScript alert('Hello!')"]
LeftMouseUpAction=[!CommandMeasure MeasureWebView "ExecuteScript console.log('Script has been executed.')"]

[TxtOpenDevTools]
Meter=String
Expand All @@ -153,31 +167,73 @@ MeterStyle=StyleButtonText
Text=Set Width: 500 (via Variable)
X=150
Y=298
LeftMouseUpAction=[!SetVariable WebW 500][!UpdateMeasure MeasureWebView][!Redraw]
LeftMouseUpAction=[!SetVariable WebW (#WebW#=600?500:600)][!UpdateMeasure MeasureWebView][!UpdateMeter #CURRENTSECTION#][!Redraw]
DynamicVariables=1

[TxtSetHeight]
Meter=String
MeterStyle=StyleButtonText
Text=Set Height: 400 (via Variable)
X=150
Y=328
LeftMouseUpAction=[!SetVariable WebH 400][!UpdateMeasure MeasureWebView][!Redraw]
LeftMouseUpAction=[!SetVariable WebH (#WebH#=410?470:410)][!UpdateMeasure MeasureWebView][!UpdateMeter #CURRENTSECTION#][!Redraw]
DynamicVariables=1

[TxtSetX]
Meter=String
MeterStyle=StyleButtonText
Text=Set X: 100 (via Variable)
Text=Set X: 320 (via Variable)
X=150
Y=358
LeftMouseUpAction=[!SetVariable WebX 100][!UpdateMeasure MeasureWebView][!Redraw]
LeftMouseUpAction=[!SetVariable WebX (#WebX#=300?320:300)][!UpdateMeasure MeasureWebView][!UpdateMeter #CURRENTSECTION#][!Redraw]
DynamicVariables=1

[TxtSetY]
Meter=String
MeterStyle=StyleButtonText
Text=Set Y: 50 (via Variable)
X=150
Y=388
LeftMouseUpAction=[!SetVariable WebY 50][!UpdateMeasure MeasureWebView][!Redraw]
LeftMouseUpAction=[!SetVariable WebY (#WebY#=45?50:45)][!UpdateMeasure MeasureWebView][!UpdateMeter #CURRENTSECTION#][!Redraw]
DynamicVariables=1

[TxtSetZoom]
Meter=String
MeterStyle=StyleButtonText
Text=Set ZoomFactor: 2.0 (via Variable)
X=150
Y=418
LeftMouseUpAction=[!SetVariable ZoomFactor (#ZoomFactor#=1?2:1)][!UpdateMeasure MeasureWebView][!UpdateMeter #CURRENTSECTION#][!Redraw]
DynamicVariables=1

[TxtSetEnableClickThrough]
Meter=String
MeterStyle=StyleButtonText
Text=Set ClickThrough: 1 (via Variable)
X=150
Y=448
LeftMouseUpAction=[!SetVariable ClickThrough 1][!UpdateMeasure MeasureWebView]

[TxtSetDisableClickThrough]
Meter=String
MeterStyle=StyleButtonText
Text=Set ClickThrough: 0 (via Variable)
X=150
Y=478
LeftMouseUpAction=[!SetVariable ClickThrough 0][!UpdateMeasure MeasureWebView]

[TxtSetEnableAllowDualControl]
Meter=String
MeterStyle=StyleButtonText
Text=Set AllowDualControl: 1 (Variable)
X=150
Y=508
LeftMouseUpAction=[!SetVariable AllowDualControl 1][!UpdateMeasure MeasureWebView]

[TxtSetDisableAllowDualControl]
Meter=String
MeterStyle=StyleButtonText
Text=Set AllowDualControl: 0 (Variable)
X=150
Y=538
LeftMouseUpAction=[!SetVariable AllowDualControl 0][!UpdateMeasure MeasureWebView]
2 changes: 1 addition & 1 deletion Resources/Skins/WebView2/Calendar/Calendar.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Update=1000
Name=Calendar
Author=nstechbytes
Information=Calendar Widget using WebView2
Version=0.0.6
Version=0.0.7
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
; ========================================
; Measure
Expand Down
2 changes: 1 addition & 1 deletion Resources/Skins/WebView2/Clock/Clock.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Update=1000
Name=Calendar
Author=nstechbytes
Information=Calendar Widget using WebView2
Version=0.0.6
Version=0.0.7
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
; ========================================
; Measure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DynamicWindowSize=1
Name=InformationProperty
Author=nstechbytes
Information=Shows Rainmeter information properties via WebView2.
Version=0.0.6
Version=0.0.7
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
; ========================================
; Measure
Expand Down
2 changes: 1 addition & 1 deletion Resources/Skins/WebView2/IslamicDate/IslamicDate.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Update=1000
Name=Islamic Date
Author=nstechbytes
Information=Islamic (Hijri) Date Widget using WebView2
Version=0.0.6
Version=0.0.7
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
; ========================================
; Measure
Expand Down
2 changes: 1 addition & 1 deletion Resources/Skins/WebView2/JSInteraction/JSInteraction.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DynamicWindowSize=1
Name=JSInteraction
Author=nstechbytes
Information=Demonstrates JavaScript interaction (OnInitialize, OnUpdate, CallJS) with the WebView2 plugin.
Version=0.0.6
Version=0.0.7
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

; ========================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DynamicWindowSize=1
Name=ReadMeasureOption
Author=nstechbytes
Information=Demonstrates reading options from the current measure using the WebView2 plugin.
Version=0.0.6
Version=0.0.7
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
; ========================================
; Measure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DynamicWindowSize=1
Name=ReadSectionOption Demo
Author=nstechbytes
Information=Demonstrates reading options from other sections using WebView2
Version=0.0.6
Version=0.0.7
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[Variables]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DynamicWindowSize=1
Name=UtilityFunction
Author=nstechbytes
Information=Demonstrates RainmeterAPI utility functions using the WebView2 plugin.
Version=0.0.6
Version=0.0.7
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[Variables]
Expand Down
2 changes: 1 addition & 1 deletion Resources/Skins/WebView2/Weather/Weather.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Update=1000
Name=Weather
Author=nstechbytes
Information=Weather Widget using WebView2
Version=0.0.6
Version=0.0.7
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
; ========================================
; Measure
Expand Down
4 changes: 2 additions & 2 deletions Resources/skin_definition.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"skinDir": ".\\Resources\\Skins",
"version": "0.0.6",
"version": "0.0.7",
"minimumVersion": "4.5",
"author": "nstechbytes",
"variableFiles": "",
Expand All @@ -17,5 +17,5 @@
"load": "WebView2\\Clock\\Clock.ini",
"headerImage": ".\\Resources\\banner.bmp",
"configPrefix": "WebView2",
"output": ".\\dist\\WebView2_v0.0.6_Alpha6.rmskin"
"output": ".\\dist\\WebView2_v0.0.7_Alpha7.rmskin"
}
Loading
Loading