Code: Select all
SysGet, Monitor, Monitor
XMLFile = %A_AppData%\Winamp\studio.xnf
FileRead, XMLData, %XMLFile%
XML := ComObjCreate("MSXML2.DOMDocument.6.0")
XML.async := False
XML.loadXML(XMLData)
XMLNodes := XML.selectNodes("//entry")
For XMLNode in XMLNodes
{
Loop % XMLNode.attributes.length
{
AttName := XMLNode.attributes[A_Index-1].nodeName
AttValue := XMLNode.attributes[A_Index-1].text
If (AttValue = "Bento_isMainWndMaximized")
{
Text := XMLNode.getAttribute("value")
MsgBox %Text%
XMLNode.setAttribute("value", 0)
}
If (AttValue = "Bento_nomax_w")
{
Text := XMLNode.getAttribute("value")
MsgBox %Text%
XMLNode.setAttribute("value", %MonitorRight%)
}
If (AttValue = "Bento_nomax_h")
{
Text := XMLNode.getAttribute("value")
MsgBox %Text%
XMLNode.setAttribute("value", %MonitorBottom%)
}
}
XML.Save(XMLFile)