Kindly ask for help how to get the latest and current mi(state) to a text file.
I can't bring it to work with an if-condition:
$if(gv(Spotify)=PLAYING,
sh("echo 'PLAYING' > '/sdcard/Kustom/Spotify.txt'"),
sh("echo 'PAUSED' > '/sdcard/Kustom/Spotify.txt'")$
even without work is:
$if(gv(Spotify)=PLAYING,
sh(gv(SpotSH)),sh(gv(SpotSH)))$
My global variables are:
gv(Spotify): $mi(state)$
gv(SpotSH): $if(mi(state)=PLAYING,
gv(spotPlay),gv(spotPaus))$
gv(spotPlay): echo 'PLAYING' > '/sdcard/Spotify.txt'
gv(spotPaus): echo 'PAUSED' > '/sdcard/Spotify.txt
Perhaps anyone could help.
Best regards, Daniel