Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can InstallShield Scripting Convert Integer to String?

223 views
Skip to first unread message

John Hulsman

unread,
Aug 20, 2001, 4:11:00 PM8/20/01
to
On a different note...

Can InstallShield Scripting Convert Integer to String?


Mats Manhav

unread,
Aug 20, 2001, 5:08:22 PM8/20/01
to
Sprintf can be used for this purpose:
Mats Manhav
Moonsea Software

John Hulsman

unread,
Aug 20, 2001, 5:23:32 PM8/20/01
to
Sprintf isn't working for me, I tried displaying an integer called
nKey by this line...

sprintf(nKey);

The IS compiler choked on it. I don't want to just show this
value in a message box or something, I want to display it on a
form in my dialog, and I can only send a string to the edit box
like this...

CtrlSetText( szDlg, IDC_KEY, szKey );

But unfortunately I am unable to convert integer to string and
preferrably I would like to pass it from my DLL as a string
that is ready to use in that line if I knew how. Ideally writing
C++ code that returns a pointer to a string and then
converting the pointer to a string in IS would be best if I knew
a little more about pointers :-( or if I could just pass it in from
the DLL as a string then I would be set.

John


Mark G. Wenzel

unread,
Aug 20, 2001, 5:54:43 PM8/20/01
to
Would the Install Script "NumToStr()" function work for you?

"John Hulsman" <jhul...@jasperengines.com> wrote in message
news:3b817fd3$1...@news.installshield.com...

John Hulsman

unread,
Aug 20, 2001, 5:49:57 PM8/20/01
to
My apologies. I just didn't have the syntax right.
It should be:

Sprintf (szKey, "%d", nKey);

This stores the integer value of nKey in string szKey and
it works fine. I'm sorry about the previous response, it
was just the frustration of all of this.

Thank you,
John


Dave English

unread,
Aug 21, 2001, 4:49:55 AM8/21/01
to
In article <3b818679$1...@news.installshield.com>, Mark G. Wenzel
<MarkW...@Martin-Group.com> writes

>Would the Install Script "NumToStr()" function work for you?
>
>"John Hulsman" <jhul...@jasperengines.com> wrote in message
>news:3b817fd3$1...@news.installshield.com...
>> Sprintf isn't working for me, I tried displaying an integer called
>> nKey by this line...
>>
>> sprintf(nKey);
>>
>> The IS compiler choked on it.
...

Or you could use a variant type (not documented very much) , e.g.:

NUMBER nTest;
VARIANT vTest;
STRING szTest;
begin
nTest = 99;
vTest = nTest;
szTest = vTest;
MessageBox (szTest, INFORMATION);

Regards
--
Dave English,
Client Software Development, Thus PLC,
Dorking Business Park, DORKING, Surrey, UK. RH4 1HJ
http://www.thus.net

0 new messages