Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2001
    Location
    Tallahassee, FL, US
    Posts
    4

    Huh? Editing a text file?

    I'm just moving from APMS4 to APMS5 and I'm having trouble figuring out how to edit a text file based on user supplied information. In version 4 I used:

    TextFile.DeleteLine("%SrcDir%\BIN\autoplay.dat",1)
    TextFile.InsertLine("%SrcDir%\BIN\autoplay.dat","% _ContractID%",1)


    I need to search and replace text or a known line number. How can this be done in version 5.

    Any help would be appreciated.

  2. #2
    Join Date
    Nov 2003
    Location
    Salzburg / Austria
    Posts
    312
    Maybe

    Read the textfile into a string: TextFile.ReadToString ()
    Make your changes
    Write new String to Textfile: TextFile.WriteFromString ( )


    Stefan_M
    "With a rubber duck, one's never alone."

    Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    Join Date
    Sep 2001
    Location
    Tallahassee, FL, US
    Posts
    4

    That did it.

    Thanks for the tip. It work great.

    I guess I was associating a string with a single line instead of an entire file.

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. HOWTO: "Hide" Externally Referenced Files
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-23-2002, 03:19 PM
  4. Text File Actions
    By csd214 in forum Setup Factory 6.0
    Replies: 0
    Last Post: 12-06-2001, 12:50 AM
  5. 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