Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2

Thread: Text file

  1. #1
    Join Date
    Jun 2006
    Posts
    37

    Text file

    I was writing a text file to refer back to in order to trigger a page jump back to the last page previously viewed. The code I worte was:

    SaveGame = Shell.GetFolder(SHF_PROGRAMFILES);
    Folder.Create(SaveGame.."\\SaveFolder");
    TextFile.WriteFromString("C:\Save1.txt", "Saved", false);
    Application.Exit(0);

    I saw that the text file seemed to find it's way into the Save Folder that was created even though there was nothing but c:\ specified. So since this seemed to be unusual I changed the code to read:

    SaveGame = Shell.GetFolder(SHF_PROGRAMFILES);
    Folder.Create(SaveGame.."\\SaveFolder");
    SaveGame = TextFile.WriteFromString("C:\\Save1.txt", "Saved", false);
    Application.Exit(0);

    As you can see I added one extra backslash behind C: as well as put "SaveGame =" in front of the line. It found it's way there again. Now I have learned the hard way that with so many systems out there that there is usually only one "right" way to code something to prevent problems. I want this to work properly on 98/2000/XP. So which way should I go in order to make sure that the file always finds it way to the right place on ALL systems without any errors?

  2. #2
    Join Date
    Jun 2006
    Posts
    37
    I've apparently stumped some folks with this one but I would appreciate any stab in the dark that someone might have.

Similar Threads

  1. Example: Loading Paragraph Text Using a Timer
    By Jonas DK in forum AutoPlay Media Studio 5.0 Examples
    Replies: 7
    Last Post: 11-25-2004, 05:10 PM
  2. Writing Text to a File
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-22-2003, 02:02 PM
  3. Text File Actions
    By csd214 in forum Setup Factory 6.0
    Replies: 0
    Last Post: 12-06-2001, 12:50 AM
  4. Replies: 0
    Last Post: 08-17-2000, 02:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts