Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

File || String Operators


2 replies to this topic

FerFemNemBem

FerFemNemBem
  • Members
  • 27 posts

Posted 24 October 2001 - 12:07

Hi,

is there a comfortable way to replace Placeholder like %ID% in Files or Strings ?
Im saerching for something like:

szPlaceholder = "%ID";
nID= "12";
ReplaceString(szOriginalString, szPlaceholder, szIDString);

is there a function like this in InstallScript?

Thank You !

FFNB


WJSavoye

WJSavoye
  • Members
  • 19 posts

Posted 24 October 2001 - 23:33

FFNB,
InstallShield has Sprintf(), although it's not advertised in their String function list. Search help.
Before I knew this I wrote my own ReplaceString(...) function using StrGetTokens() and other InstallShield string functions.
WJS

FerFemNemBem

FerFemNemBem
  • Members
  • 27 posts

Posted 25 October 2001 - 08:29

Hi,

maybe the same thing i did?

Load file in List_1
Get first Element from List_1 and tokenized in List_2
Replace the Placeholder element in List_2
Merge the Elements from List_2 into one String
Write this String back to the right place in List_1
and so on... :-(
Write List_1 back to file...

Thank you, and now i will try the Sprintf() function.

Regards, FFNB