Hi!
Right now I'm using one of the fully supported music players, and I've set up a kind of button to show me whether it is on or off. In the past I had it so that when i clicked on the text it turned off and it turned on when i pressed the circle. I'm currently trying to make it so that it toggles, as for some reason when I used the toggleplayer thing it only works when turning off. Any ideas?
Beside mak_kawa's reply, also note that there is not needed to use three times the same NowPlaying (plugin) measure, with the same PlayerType=Status option, one is completely enough. You can add all those bangs used into the three IfTrueAction / IfFalseAction options into one single:
[OnOff]
Measure=NowPlaying
PlayerName=AIMP
PlayerPath=C:\Program Files (x86)\AIMP\AIMP.exe
PlayerType=Status
IfCondition=(OnOff = 0)
IfTrueAction=[!SetOption Text.Volume Text "AIMP Off"][!SetVariable OnCol "255,0,0,255"][!SetVariable com "OpenPlayer"]
IfFalseAction=[!SetOption Text.Volume Text "AIMP On"][!SetVariable OnCol "22bb45"][!SetVariable com "ClosePlayer"]
Much more concise, so more convenient.
I also rewrote the measure not to be a plugin measure, but a NowPlaying measure, because although a while ago NowPlaying was a plugin, in meantime it became a measure and on newer codes you should use it so.
ItsJustRyan wrote: ↑November 27th, 2019, 4:12 am
Thanks both of you This worked
I'm glad, however you shouldn't thank me, mak_kawa has fixed your issue, I just adviced you how to reduce the length of the code and the number of measures.