import xbmc, os
guisettingsFile=xbmc.translatePath("special://profile/guisettings.xml")
fh=open(guisettingsFile, 'r')
content= fh.read()
fh.close()
settingValue="visualization.milkdrop"
if content.find("")>=0:
xbmc.executehttpapi("SetGUISetting(3;musicplayer.visualisation;"+settingValue+")")
elif content.find(""+settingValue+"")>=0:
xbmc.executehttpapi("SetGUISetting(3;musicplayer.visualisation;)")
xbmc.executebuiltin("ReloadSkin()")