Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 05:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



FileWriteLine

Discussion on FileWriteLine within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2013
Posts: 26
Received Thanks: 3
Angry FileWriteLine

Hi ich hätte da kurtz eine Frage und zwar, möchte ich in eine .xml Datei folgendes schreiben, aber es funktioniert nicht.

<logininfo name="Server" channel_idx="channel">

mein funktion:

Quote:
Func createXML()


$accserverwriteread = IniRead(@scriptdir & "\db\db.ini", "accserverwrite", "Server",1)
$accChannelwriteread = IniRead(@scriptdir & "\db\db.ini", "accChannelwrite", "Channel",1)

_FileCreate("logininfo.xml")

Local $file = FileOpen("logininfo.xml", 1)

; Prüfen, ob Datei im Schreibmodus geöffnet ist
If $file = -1 Then
MsgBox(0, "Fehler", "Die Datei konnte nicht geöffnet werden.")
Exit
EndIf

FileWriteLine($file, '<logininfo name=','"',$accserverwriteread,'"',' channel_idx=','"',$accChannelwriteread','">')


FileClose($file)

EndFunc
könnte mir dda bitte jemand kurtz Helfen bitte wo der Fehler liegt, lg.

Edit:

hab es jetzt selbst gelöst und zwar so, nicht gerade schön aber es geht, lg.
Quote:
FileWriteLine($file, '<logininfo name="' & $accserverwriteread & '" channel_idx' & '"' & $accChannelwriteread & '"' & '>')
Dumbatzig is offline  
Old 12/28/2013, 21:24   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Ich würde dir nicht raten ständig zwischen den Stringzeichen zu wechseln, wenn du ein " zwischen "" darstellen willst mach das doch so
Code:
MsgBox(64, 0, """")
Ein "" ist dabei ein ".
alpines is offline  
Reply




All times are GMT +1. The time now is 05:19.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.