Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim FlightPlan, CurrentPath, xmlDoc, ICAO, ICAOIdent, FileContent, OutputFile
- Set objFSO=CreateObject("Scripting.FileSystemObject")
- With CreateObject("WScript.Shell")
- CurrentPath=.CurrentDirectory
- End With
- Set xmlDoc = CreateObject("Msxml2.DOMDocument")
- xmlDoc.setProperty "SelectionLanguage", "XPath"
- FlightPlan = CurrentPath + "\" + InputBox("Enter the filename (e.g. flightplan.pln) of the file - must be in this folder:")
- xmlDoc.load(FlightPlan)
- For Each ICAO In xmlDoc.SelectNodes("/SimBase.Document/FlightPlan.FlightPlan/ATCWaypoint/ICAO")
- ICAOIdent = ICAO.selectSingleNode("ICAOIdent").text
- FileContent = FileContent + ICAOIdent + vbCrLf
- Next
- OutputFile = CurrentPath + "\" + InputBox("Enter the filename (e.g. flightplan.txt) of the file to write to (in this folder)")
- Set File = objFSO.CreateTextFile(OutputFile,True)
- File.Write FileContent
- File.Close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement