Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

    Where are you text line!

    I would like to find a spacific line in a text file, change it as needed and then turn it into a html file within AMS. The area in red is what I need to change. Any ideas?

    Code:
    <html>
    <head>
    <title></title>
    <meta name="description" content="">
    </head>
    <body scroll="no" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#000000" >
    <div class=tourBar id=tourBar style="" align=right > </div>
    <table width=590 height="321" align=center cellpadding=0 cellspacing=0>
    <tr>
    <!-- leftside -->
    <td width="100%" align=left valign=top>
    <table width="618" cellpadding=2>
    <tr> 
    <td colspan=2 class=whitehead>&nbsp;
    <td width="115" align=left valign=bottom class=bodytext><font style="font-size: 1pt">&nbsp;</font></td>
    </tr>
    <tr> 
    <td width="590" align=left valign=top> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="590" height="320" id="panorama" align="">
    <param name=movie value="media/panorama.swf?img_url=media/fr_mp.jpg&htmlWidth=590&htmlHeight=320&barY=298&flSpeed=.8">
    <param name=quality value=high>
    <param name=bgcolor value=#ffffff>
    <embed src="media/panorama.swf?img_url=media/fr_mp.jpg&htmlWidth=590&htmlHeight=320&barY=298&flSpeed=.10" quality=high bgcolor=#ffffff  width="590" height="320" name="panorama" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed> 
    </object> <div class=labeltext align=right> <b></b></div></td>
    <td width="25">&nbsp;</td>
    <td class=bodytext valign=top>&nbsp;</td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td colspan=2>&nbsp; </td>
    </tr>
    </table>
    </body>
    </html>

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Bruce,

    Are you reading the text file to a string or to a table?

    If string I would use String.Replace to replace that one occurance of the substring.

    If you are reading to a table, you will have to enumerate the table to find the instance and then replace it.

    for line,value in tablefromtextfile do
    result = String.Find(value, "fr_mp.jpg", 1, false);
    if result ~= -1 then --string was found
    String.Replace(value, "fr_mp.jpg", replacementtext, false);
    end
    end
    TextFile.WriteFromTable --output the table to a file where you want it to be.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Similar Threads

  1. How would I find a blank line of text via "Find Text Line"?
    By Marker0077 in forum Setup Factory 6.0
    Replies: 11
    Last Post: 07-11-2003, 08:55 AM
  2. Text File - Find Line
    By pjborg in forum AutoPlay Media Studio 4.0
    Replies: 3
    Last Post: 07-02-2003, 03:38 PM
  3. Action: Text File - Find Line
    By pjborg in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 06-07-2003, 05:10 AM
  4. HOWTO: Display Conditional Text Based Upon a List Box Selection
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-15-2002, 10:54 AM
  5. "Delete Text Line" also adds a blank line at EOF
    By alian007 in forum Setup Factory 6.0
    Replies: 1
    Last Post: 07-30-2002, 11:00 AM

Posting Permissions

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