I´d like to show up a small nagios-page with rainmeter (a little bit like active desktop in windows xp ) - ist this possible?
thanks
Peter
It is currently March 29th, 2024, 5:28 am
small webbrowser-window possible?
-
- Posts: 1
- Joined: April 17th, 2012, 5:45 am
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: small webbrowser-window possible?
I'm afraid not. Rainmeter is not a web browser and has no such capability. It can download text from a web page with WebParser, but has no understanding of HTML at all. You could do something with a programming language like C++ or C# or even AutoIt to create a little mini web browser object with no frame or controls, but the most Rainmeter would have to do with it would be to launch it with a parameter for a site URL.
-
- Posts: 7
- Joined: December 5th, 2012, 2:28 pm
Re: small webbrowser-window possible?
Thinking about it, you would need to have a 3rd party web-browser. Which can then be opened from the *.ini request.
Though it would need to be a border-less browser, that you can anchor and remove the border :S hmmm.....I will see if I can write one for this. watch this space!!!
Though it would need to be a border-less browser, that you can anchor and remove the border :S hmmm.....I will see if I can write one for this. watch this space!!!
-
- Posts: 7
- Joined: December 5th, 2012, 2:28 pm
Re: small webbrowser-window possible?
Ok...here is my example
Its a bit rough around the edges, but hey was a rush job. Let me know what you think.
Here are the steps.
Creating the basic HTA.
Open notepad and add the code below, saving it as Webpage.hta:
Creating the Rainmeter skin.
Create an ini file and enter the following text:
Finally save both resulting Webpage.hta and Webpage.ini file's, in the Rainmeter skin folder and you will have a webpage onyour desktop!!!
The only thing you will need to do is find a way of positioning the resulting webpage....hmmmm i'll get back to you!
Its a bit rough around the edges, but hey was a rush job. Let me know what you think.
Here are the steps.
Creating the basic HTA.
Open notepad and add the code below, saving it as Webpage.hta:
Code: Select all
<html>
<body>
<HTA:APPLICATION
border="none"
borderStyle="static"
caption="yes"
icon=""
maximizeButton="no"
minimizeButton="no"
showInTaskbar="no"
windowState="normal"
innerBorder="no"
navigable="yes"
scroll="no"
scrollFlat="yes" />
<div style="height: 100%; overflow: hidden;">
<iframe frameborder=0 allowtransparency=yes scrolling=no src="http://rainmeter.net/forum/viewtopic.php?f=5&t=11876" width="100%" height="100%">
</iframe>
</div>
</body>
</html>
Create an ini file and enter the following text:
Code: Select all
[Rainmeter]
BackgroundMode=1
Author=Echelon5
[MeasureAutostart]
Measure=Calc
Formula=1
IfEqualValue=1
IfEqualAction=["#CURRENTPATH#webpage.hta"]
[MeterConsole2]
Meter=String
AntiAlias=1
x=0
Y=0
The only thing you will need to do is find a way of positioning the resulting webpage....hmmmm i'll get back to you!
Last edited by jsmorley on December 14th, 2012, 11:34 pm, edited 1 time in total.
Reason: change quote to code tags
Reason: change quote to code tags
-
- Posts: 7
- Joined: December 5th, 2012, 2:28 pm
Re: small webbrowser-window possible?
Ok here is a way around locating the webpage on the desktop and resizing it again! WOOHOO:Echelon5 wrote:...the only thing you will need to do is find a way of positioning the resulting webpage....hmmmm i'll get back to you!
<html>
<head>
<SCRIPT LANGUAGE="VBScript">
Sub Window_onLoad
window.resizeTo 400,250
End Sub
</SCRIPT>
<script language="vbscript">
moveto 0,100
resizeto 500,320
</script>
<body>
<HTA:APPLICATION
border="dialog"
borderStyle="static"
caption="no"
icon="http://www.htmlgoodies.com/favicon.ico"
maximizeButton="no"
minimizeButton="no"
showInTaskbar="no"
windowState="normal"
innerBorder="yes"
navigable="yes"
scroll="auto"
scrollFlat="no" />
<div style="height: 100%; overflow: hidden;">
<iframe frameborder=0 allowtransparency=yes scrolling=no src="http://rainmeter.net/forum/viewtopic.php?f=5&t=11876" width="100%" height="100%">
</iframe>
</div>
</body>
</html>
-
- Posts: 35
- Joined: November 28th, 2012, 1:10 pm
- Location: Canada
Re: small webbrowser-window possible?
This is really cool!
I coupled it with the closeprocess app from here to make it close when the skin is unloaded.
Here's my adaptation of the ini file:
I coupled it with the closeprocess app from here to make it close when the skin is unloaded.
Here's my adaptation of the ini file:
Code: Select all
[Rainmeter]
BackgroundMode=1
Author=Echelon5
OnRefreshAction=["#CURRENTPATH#Webpage.hta"]
OnCloseAction=["#@#\Addons\CloseProcess\CloseProcess.exe" "C:\Windows\System32\mshta.exe"]
[MeterConsole2]
Meter=String
AntiAlias=1
x=0
Y=0
-
- Posts: 7
- Joined: December 5th, 2012, 2:28 pm
Re: small webbrowser-window possible?
DUDE!StarburstSpectrum wrote:This is really cool!
I coupled it with the closeprocess app from here to make it close when the skin is unloaded.
Here's my adaptation of the ini file:Code: Select all
[Rainmeter] BackgroundMode=1 Author=Echelon5 OnRefreshAction=["#CURRENTPATH#Webpage.hta"] OnCloseAction=["#@#\Addons\CloseProcess\CloseProcess.exe" "C:\Windows\System32\mshta.exe"] [MeterConsole2] Meter=String AntiAlias=1 x=0 Y=0
I was after that CloseApp thingy and couldnt think of it! Dude thanks soo much you lil life saver! lol
-
- Posts: 51
- Joined: September 18th, 2010, 1:03 am
Re: small webbrowser-window possible?
Very interesting....
I'm actually using this 'embedded' browser window right now to reply.
A couple of things though..
. Using mshta.exe to browse the web is a security risk... it has the potential for higher privledges than a regular browser. Use with caution.
. I got it to work directly... (clicking the .hta file), but it won't actually launch for me via the rainmeter skin for some reason... still investigatigating.
. I made a few changes to the hta file: removed redundant duplicate script element that was re-resizing the browser window, and played with the scroll settings to allow scrolling (necessary in a small window of course) and remove non-functioning 'default' scrollbar. I'm sure other items can be culled as well...
Now... to concieve a variable option to allow setting the URL dynamically, and creating a inputText interface to input it.
fun!
I'm actually using this 'embedded' browser window right now to reply.
A couple of things though..
. Using mshta.exe to browse the web is a security risk... it has the potential for higher privledges than a regular browser. Use with caution.
. I got it to work directly... (clicking the .hta file), but it won't actually launch for me via the rainmeter skin for some reason... still investigatigating.
. I made a few changes to the hta file: removed redundant duplicate script element that was re-resizing the browser window, and played with the scroll settings to allow scrolling (necessary in a small window of course) and remove non-functioning 'default' scrollbar. I'm sure other items can be culled as well...
Code: Select all
<html>
<head>
<script language="vbscript">
moveto 50,50
resizeto 640,320
</script>
<body>
<HTA:APPLICATION
border="dialog"
borderStyle="static"
caption="no"
icon="http://www.htmlgoodies.com/favicon.ico"
maximizeButton="no"
minimizeButton="no"
showInTaskbar="no"
windowState="normal"
innerBorder="yes"
navigable="yes"
scroll="no"
scrollFlat="no" />
<div style="height: 100%; overflow: hidden;">
<iframe frameborder=0 allowtransparency=yes scrolling=yes src="http://rainmeter.net/forum/viewtopic.php?f=5&t=11876" width="100%" height="100%">
</iframe>
</div>
</body>
</html>
fun!
fragrant.monkey :: deviantArt: aka snuffleupagus | coding: ThemeSaver for RocketDock | musician: Madera Dulce
-
- Rainmeter Sage
- Posts: 5384
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: small webbrowser-window possible?
Pretty neat idea ...
I added a couple of personal tweaks:
webpage.hta
webpage.ini
I added a couple of personal tweaks:
- * Set a caption below the webpage to allow close the config from the skin
* Zoom to ~75% to fit in the resized window 10 seconds after loading (need NirCmd.exe)
* Changed the icon to Rainmeter's icon
* Show DeviantArt's Rainmeter gallery
webpage.hta
Code: Select all
<html>
<head>
<SCRIPT LANGUAGE="VBScript">
Sub Window_onLoad
window.resizeTo 640,480
moveto 300,150
End Sub
</SCRIPT>
<body>
<HTA:APPLICATION
border="dialog"
borderStyle="static"
caption="no"
icon="C:\Program Files\Rainmeter\Rainmeter.exe"
maximizeButton="no"
minimizeButton="no"
showInTaskbar="no"
windowState="normal"
innerBorder="yes"
navigable="yes"
scroll="no"
scrollFlat="no" />
<div style="height: 100%; overflow: hidden;">
<iframe frameborder=0 allowtransparency=yes scrolling=yes src="http://rainmeter.deviantart.com/gallery/" width="100%" height="100%">
</iframe>
</div>
</body>
</html>
Code: Select all
[Rainmeter]
BackgroundMode=1
Author=Echelon5
OnRefreshAction=["#CURRENTPATH#Webpage.hta"]
OnCloseAction=["#@#\Addons\CloseProcess\CloseProcess.exe" "C:\Windows\System32\mshta.exe"]
[mWait10ZoomOut]
Measure=Calc
Formula=mWait10ZoomOut+1%11
IfEqualValue=10
IfEqualAction=["#@#Addons\NirCmd\NirCmd.exe" SendKeyPress Ctrl+minus Ctrl+minus][!HideMeter Wait][!ShowMeter CloseWebpage][!DisableMeasure mWait10ZoomOut]
;Zoomout 2 times
[CloseWebpage]
Meter=String
AntiAlias=1
X=620
Y=640
W=640
H=20
StringAlign=CENTERCENTER
StringStyle=BOLDITALIC
SolidColor=228,228,228,220
Text="Click to Close Webpage"
LeftMouseUpAction=[!DeActivateConfig]
Hidden=1
[Wait]
Meter=String
MeasureName=mWait10ZoomOut
X=620
Y=640
W=640
H=20
StringAlign=CENTERCENTER
StringStyle=BOLDITALIC
SolidColor=228,228,228,220
Text=Please wait... Preparing to Zoom ... %1
Hidden=0
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 7
- Joined: December 5th, 2012, 2:28 pm
Re: small webbrowser-window possible?
Thanks "fragrant.monkey" lol and you "Electric.Tech".
The security risk isn't too bad as you can change the switch in the HTA file to:
navagable="no". So the user can then only be restricted to the local webpage they are on.
I was unable to locate something that you be able to specify the zoom of the webpage. So thanks Electric-Tech. Do you have the code you used (as it would save me hunting on the site lol!)
lol had another look and found it...soz I R dousch!
Anyhoo, I've been playing and created this google searchbar. You test need to run the HTA file to demo.
The security risk isn't too bad as you can change the switch in the HTA file to:
navagable="no". So the user can then only be restricted to the local webpage they are on.
I was unable to locate something that you be able to specify the zoom of the webpage. So thanks Electric-Tech. Do you have the code you used (as it would save me hunting on the site lol!)
lol had another look and found it...soz I R dousch!
IfEqualAction=["#@#Addons\NirCmd\NirCmd.exe" SendKeyPress Ctrl+minus Ctrl+minus][!HideMeter Wait][!ShowMeter CloseWebpage][!DisableMeasure mWait10ZoomOut]
;Zoomout 2 times
Anyhoo, I've been playing and created this google searchbar. You test need to run the HTA file to demo.
You do not have the required permissions to view the files attached to this post.