I have a simple rainmeter button on my desktop that opens chrome when clicked on.
[Rainmeter]
Update=1000
[MeterLaunch3Image]
Meter=Image
ImageName=#@#Images\Alice_Chrome.png
W=64
H=128
LeftMouseUpAction=["C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"]
However, whenever I click it, a new window of chrome pops up. How can I set it so it brings an existing windows of chrome to the forefront if there is one? Thanks for the help!
It is currently March 29th, 2024, 10:47 am
Simple Rainmeter Button
-
- Posts: 8
- Joined: March 11th, 2016, 1:06 am
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Simple Rainmeter Button
Rather than launching the Chrome executable, have it open some website. This assumes that Chrome is your default browser in Windows.vquy4946 wrote:I have a simple rainmeter button on my desktop that opens chrome when clicked on.
[Rainmeter]
Update=1000
[MeterLaunch3Image]
Meter=Image
ImageName=#@#Images\Alice_Chrome.png
W=64
H=128
LeftMouseUpAction=["C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"]
However, whenever I click it, a new window of chrome pops up. How can I set it so it brings an existing windows of chrome to the forefront if there is one? Thanks for the help!
LeftMouseUpAction=["https://MyFavoriteSite.com"]
Then it will launch Chrome if it is not running, and will open the defined site in a new tab in the existing window if it is.
Just running the executable will always open a new Chrome window. As far as I know, there is no command line option that will just "restore" and "give focus" to an existing Chrome window. That would require some addon or plugin that could search for a window title or class by name and use the window "handle" to send messages to do those actions. If that is what you really want, this might help:
https://forum.rainmeter.net/viewtopic.php?p=119592#p119592
Hint: If you do go this route, the measure should look like:
Code: Select all
[MeasureRestoreIt]
Measure=Plugin
Plugin=RunCommand
Parameter="#@#nircmd\nircmd.exe" win activate class Chrome_WidgetWin_1
Chances are, it is far simpler to just call a website of some kind, some home page that you use or google.com or something.
-
- Posts: 8
- Joined: March 11th, 2016, 1:06 am
Re: Simple Rainmeter Button
Hm.... my problem is that it only works with chrome. If i have disord or steam minimized/running in the background, i cant use the same method. So... the only way to do what I want to do is to install plugins?
(Also, I dont fully understand measures, much less mix them with stuff like plugins :P)
(Also, I dont fully understand measures, much less mix them with stuff like plugins :P)
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Simple Rainmeter Button
The problem is that Rainmeter is great for making "launchers", but it can't replace the functionality of the Windows Taskbar. It's not about "minimize" and "restore".vquy4946 wrote:Hm.... my problem is that it only works with chrome. If i have disord or steam minimized/running in the background, i cant use the same method. So... the only way to do what I want to do is to install plugins?
(Also, I dont fully understand measures, much less mix them with stuff like plugins :P)
-
- Posts: 8
- Joined: March 11th, 2016, 1:06 am
Re: Simple Rainmeter Button
Good News! I found a way to maximize a window if it isn't the main window!
This guy: https://forum.rainmeter.net/viewtopic.php?f=18&t=7592
made applications that you can use. They are basically a shortcut around rainmeter's limitations. Props to him
All you have to do is call them like you would normally do for a launcher, except you pass it the application you want to open.
This guy: https://forum.rainmeter.net/viewtopic.php?f=18&t=7592
made applications that you can use. They are basically a shortcut around rainmeter's limitations. Props to him
All you have to do is call them like you would normally do for a launcher, except you pass it the application you want to open.