Jump to content

HAA

Members
  • Posts

    5
  • Joined

  • Last visited

About HAA

  • Birthday April 16

Profile Information

  • Location
    Bern, Switzerland

HAA's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks a lot M23 it worked great.
  2. the problem is I have the line withot the variable, which looks like that in the line 102 of my file: <setting name="PhoneInterfaceServiceProvider"> (Aastra2380ip)</setting> the line has been written without the variable
  3. Jos, I tried both ways and they are not working, besides I also removed a $ in the string from M23. here are the both: #include <File.au3> AutoItSetOption("ExpandVarStrings", 1) $valuefile = @UserName $result = StringRegExp(FileRead("C:\tmp\Test.txt"),$valuefile & "\s=\s(.*)", 1) MsgBox(0, "", $result[0]) _FileWriteToLine("Q:\test\assi.config", 102, '      <setting name="PhoneInterfaceServiceProvider">$result$ (Aastra2380ip)</setting>', True) and #include <File.au3> AutoItSetOption("ExpandVarStrings", 1) $valuefile = @UserName $result = StringRegExp(FileRead("C:\tmp\Test.txt"),$valuefile & "\s=\s(.*)", 1) MsgBox(0, "", $result[0]) _FileWriteToLine("Q:\test\assi.config", 102, '      <setting name="PhoneInterfaceServiceProvider">' & $result & ' (Aastra2380ip)</setting>', True)
  4. Hi M23, I've also tried that, but it's actually same and does not work HAA
  5. I'm trying to write a line, which includes a variable to a file. I do get an answer via MsgBox but when I open the file and look at the line, variable has not been written into the file. #include <File.au3> AutoItSetOption("ExpandVarStrings", 1) $valuefile = @UserName $result = StringRegExp(FileRead("C:\tmp\Test.txt"),$valuefile & "\s=\s(.*)", 1) MsgBox(0, "", $result[0]) _FileWriteToLine("Q:\test\assi.config", 102, ' <setting name="PhoneInterfaceServiceProvider">$result$ (Aastra2380ip)</setting>', True)
×
×
  • Create New...