Most of the time when changing a variable it needs to be remembered after the current session, but also be changed "right now".
Not refreshing, but rather just update the depending meter followed by a redraw. And then using DynamicVariables on the meter.
This can result in some VERY long lines of bangs!
I suggest keeping the old bangs, but still adding the new bang.
So in stead of: [!SetVariable App1 "#Path1#"][!WriteKeyValue Variables App1 "#Path1#" "#Var#"]
It could be something like: [!StoreVariable App1 "#Path1#" "#Var#"]
This topic has been discussed in the past elsewhere on this forum but i cannot find the thread.
Was just wondering what the developers thoughts on something like this concept would be in 2019?
And then a bonus question...
It might be more of a niche situation, but could also be quite handy to have a bang that could swap two variables around.
So in stead of: [!SetVariable App1 "#App2#"][!WriteKeyValue Variables App1 "#App2#" "#Var#"][!SetVariable App2 "#App1#"][!WriteKeyValue Variables App2 "#App1#" "#Var#"]
It could be: [!SwapVariable "App1" "App2" "#Var#"]
It is currently April 18th, 2024, 5:21 pm
[Feature] Combine SetVariable & WriteKeyValue
-
- Posts: 424
- Joined: February 8th, 2015, 10:07 pm
- Location: EU, Denmark.
[Feature] Combine SetVariable & WriteKeyValue
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
-
- Posts: 268
- Joined: May 12th, 2019, 8:55 am
Re: [Feature] Combine SetVariable & WriteKeyValue
I like the swap variable idea. I don't know where I'd use it, but I like it.
-
- Posts: 424
- Joined: February 8th, 2015, 10:07 pm
- Location: EU, Denmark.
Re: [Feature] Combine SetVariable & WriteKeyValue
One example could be a launcher.Cariboudjan wrote: ↑June 8th, 2019, 11:51 pm I like the swap variable idea. I don't know where I'd use it, but I like it.
You could then scroll up / down over a listed item and swap the variables for path, name etc between the two.
Can be done with setvariable and writekeyvalue,
But the !swap would be cleaner and easier code to write.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))