How to do this?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sdanda
    New Member
    • Oct 2007
    • 36

    How to do this?

    Hai,
    First of all I would like to copy a file from another file.Then I would like to open the copied file and read the contents of a file,If i find a particular string I would like to add some content to this file...How to do this?

    Suppose my copied file contain this

    function OnFirstUIBefore ()
    number nResult, nLevel, nSize, nSetupType;
    string szTitle, szMsg, szOpt1, szOpt2, szLicenseFile;
    begin

    Dlg_Start:
    nResult = 0;

    Dlg_SdWelcome:
    szTitle = "";
    szMsg = "";
    //{{IS_SCRIPT_TAG (Dlg_SdWelcome)
    nResult = SdWelcome( szTitle, szMsg );
    //}}IS_SCRIPT_TAG (Dlg_SdWelcome)
    if (nResult = BACK) goto Dlg_Start;

    Dlg_SdLicense2:
    szTitle = "";
    szOpt1 = "";
    szOpt2 = "";

    end

    While reading my file if the string "szTitle" found in the file I would like to add some content to this file..How to do this?
    My new file willl contain this


    function OnFirstUIBefore ()
    number nResult, nLevel, nSize, nSetupType;
    string szTitle, szMsg, szOpt1, szOpt2, szLicenseFile;
    string szTitle1;

    begin

    Dlg_Start:
    nResult = 0;

    Dlg_SdWelcome:
    szTitle = "Welcome to the Installshield software";
    szMsg = "";
    szTitle1="Hello "
    //{{IS_SCRIPT_TAG (Dlg_SdWelcome)
    nResult = SdWelcome( szTitle, szMsg );
    //}}IS_SCRIPT_TAG (Dlg_SdWelcome)
    if (nResult = BACK) goto Dlg_Start;

    Dlg_SdLicense2:
    szTitle = "Welcome to license dialog";
    szOpt1 = "";
    szOpt2 = "";

    end

    After finding szTitle(in the first instance) I would like to add this message "Welcome to the Installshield software" and one more line szTitle1="Hello " and "szTitle1" in declaration section of the function.
    How to do this?Can any one help me?
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    What version of VB are you using?
    What have you tried so far? We're happy to help, but generally won't create your program for you.

    Comment

    Working...