What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » OpenTextFile & DeleteFile

OpenTextFile & DeleteFile
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: OpenTextFile & DeleteFile
You have your parameters wrong:
code:
FileSystemObject.CreateTextFile
object.CreateTextFile filename [, overwrite[, unicode]]
That means:
  • filename is the path to the file to be created.
  • overwrite is a Boolean defining whether the existing file may be overwritten.
  • unicode is a Boolean defining whether the text file should be saved as Unicode (true) or AscII (false, default).
That means that the '2' is interpreted as a Boolean for the overwrite parameter and becomes converted to 'true', and that the 'true' or 'false' in your last parameter actually changes the text encoding. This is what causes your "strange characters" (which aren't strange at all, in fact).

To fix this, just leave out the invalid '2' parameter. This way, your true/false are correctly sent as overwrite parameter. :)
code:
fichier2 = fso.CreateTextFile(chemin_fichier_calendrier, true); //Allow overwrite
fichier2 = fso.CreateTextFile(chemin_fichier_calendrier, false); //Don't allow overwrite

This post was edited on 01-06-2008 at 09:40 AM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
01-06-2008 09:39 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
OpenTextFile & DeleteFile - by personne3000 on 01-05-2008 at 05:00 PM
RE: OpenTextFile & DeleteFile - by Matti on 01-06-2008 at 09:39 AM
RE: OpenTextFile & DeleteFile - by personne3000 on 01-06-2008 at 11:33 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On