By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,782 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,782 IT Pros & Developers. It's quick & easy.

How to do this?

P: 36
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?
Nov 26 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 5K+
P: 8,434
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.
Nov 28 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.