It is currently July 14th, 2020, 12:07 am

Refreshing skin with CTRL+S

Tips and Tricks from the Rainmeter Community
User avatar
StArL0rd84
Posts: 346
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Refreshing skin with CTRL+S

Post by StArL0rd84 »

When you are working on a skin you can use this trick to automatically refresh the skin when you hit CTRL+S.
That means the .ini file will save and then the skin will refresh.
Immediately presenting you with the changes that you've made, saving you the trouble of right clicking the skin and clicking refresh all the time.

Code: Select all

[HotkeyRefresh]
 Measure=Plugin
 Plugin=HotKey
 HotKey=CTRL s
 KeyUpAction=[!Refresh]
But you cannot (at least in my case) disable the measure nor use UpdateDivider=-1 when not using it.
So just (un?)comment the line ,HotKey=CTRL s, to break it ^^

Example:
;HotKey=CTRL s

You can get the plugin here:
https://forum.rainmeter.net/viewtopic.php?f=127&t=18849&hilit=hotkey
(#WorkTime# = 1 ? #Work# : ([mEnergyLoss:%] > 100 ? #SleepMode# : #Rainmeter#))
User avatar
balala
Rainmeter Sage
Posts: 11024
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Refreshing skin with CTRL+S

Post by balala »

StArL0rd84 wrote:
March 23rd, 2019, 8:20 am
But you cannot (at least in my case) disable the measure nor use UpdateDivider=-1 when not using it.
So just (un?)comment the line ,HotKey=CTRL s, to break it ^^

Example:
;HotKey=CTRL s
Yep, you can't indeed through a !DisableMeasure bang, but there is another approach. You have to use a !CommandMeasure bang:
  • To disable the measure use the following bang: [!CommandMeasure "HotkeyRefresh" "Stop"].
  • To re-enable it, use this one: [!CommandMeasure "HotkeyRefresh" "Start"].
So, no need to comment out the HotKey option.
User avatar
sl23
Posts: 411
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Refreshing skin with CTRL+S

Post by sl23 »

Very handy, thanks :thumbup:
User avatar
Mor3bane
Posts: 859
Joined: May 7th, 2016, 7:32 am

Re: Refreshing skin with CTRL+S

Post by Mor3bane »

Well if you are speed-coding and fine tuning it may simply be expedient to do this:

MouseoverAction=[!Refresh]
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that is requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 11024
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Refreshing skin with CTRL+S

Post by balala »

Mor3bane wrote:
November 30th, 2019, 3:05 am
Well if you are speed-coding and fine tuning it may simply be expedient to do this:

MouseoverAction=[!Refresh]
Not a very good idea in my opinion, because if you add the above option to a meter (or even worst to the [Rainmeter] section), the skin is refreshed every time you're hovering the mouse over the meter (or over the skin). Too frequent refresh in most cases.
As much a s possible the refresh should be avoided: https://forum.rainmeter.net/viewtopic.php?f=5&t=22739&p=119966&hilit=refresh+balala+destructive#p119966
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: Refreshing skin with CTRL+S

Post by Yamajac »

balala wrote:
November 30th, 2019, 7:08 am
Not a very good idea in my opinion, because if you add the above option to a meter (or even worst to the [Rainmeter] section), the skin is refreshed every time you're hovering the mouse over the meter (or over the skin). Too frequent refresh in most cases.
As much a s possible the refresh should be avoided: https://forum.rainmeter.net/viewtopic.php?f=5&t=22739&p=119966&hilit=refresh+balala+destructive#p119966
For development, you don't need to worry about that though. It's awful for a production launch but it's not hard to just remove a single line of code. (which you'd have to remove anyway with the hotkey method)