Creat0R
16-11-2010, 23:11
пойдёт ли то, что ты написал без изменений? »
Нет, это уже специфичная задача.
$sFile = @DesktopDir (http://www.autoitscript.com/autoit3/docs/macros.htm#@desktopdir) & "\Test.xml"
$sHValue = @DesktopWidth (http://www.autoitscript.com/autoit3/docs/macros.htm#@desktopwidth)
$sVValue = @DesktopHeight (http://www.autoitscript.com/autoit3/docs/macros.htm#@desktopheight)
$sData = FileRead (http://www.autoitscript.com/autoit3/docs/functions/FileRead.htm)($sFile)
$sData = StringRegExpReplace (http://www.autoitscript.com/autoit3/docs/functions/StringRegExpReplace.htm)($sData, '(?si)(<obj.*name="Location".*?>.*?(?!</obj>)<int name="H" value=")\d*("/>)', '${1}' & $sHValue & '$2')
$sData = StringRegExpReplace (http://www.autoitscript.com/autoit3/docs/functions/StringRegExpReplace.htm)($sData, '(?si)(<obj.*name="Location".*?>.*?(?!</obj>)<int name="V" value=")\d*("/>)', '${1}' & $sVValue & '$2')
$hFile = FileOpen (http://www.autoitscript.com/autoit3/docs/functions/FileOpen.htm)($sFile, 2)
FileWrite (http://www.autoitscript.com/autoit3/docs/functions/FileWrite.htm)($hFile, $sData)
FileClose (http://www.autoitscript.com/autoit3/docs/functions/FileClose.htm)($hFile)
Нет, это уже специфичная задача.
$sFile = @DesktopDir (http://www.autoitscript.com/autoit3/docs/macros.htm#@desktopdir) & "\Test.xml"
$sHValue = @DesktopWidth (http://www.autoitscript.com/autoit3/docs/macros.htm#@desktopwidth)
$sVValue = @DesktopHeight (http://www.autoitscript.com/autoit3/docs/macros.htm#@desktopheight)
$sData = FileRead (http://www.autoitscript.com/autoit3/docs/functions/FileRead.htm)($sFile)
$sData = StringRegExpReplace (http://www.autoitscript.com/autoit3/docs/functions/StringRegExpReplace.htm)($sData, '(?si)(<obj.*name="Location".*?>.*?(?!</obj>)<int name="H" value=")\d*("/>)', '${1}' & $sHValue & '$2')
$sData = StringRegExpReplace (http://www.autoitscript.com/autoit3/docs/functions/StringRegExpReplace.htm)($sData, '(?si)(<obj.*name="Location".*?>.*?(?!</obj>)<int name="V" value=")\d*("/>)', '${1}' & $sVValue & '$2')
$hFile = FileOpen (http://www.autoitscript.com/autoit3/docs/functions/FileOpen.htm)($sFile, 2)
FileWrite (http://www.autoitscript.com/autoit3/docs/functions/FileWrite.htm)($hFile, $sData)
FileClose (http://www.autoitscript.com/autoit3/docs/functions/FileClose.htm)($hFile)