PDA

View Full Version : Thats me again .. Sorry for disturbance


el5ateer
08-17-2005, 08:03 AM
Hello people ,
I am now facing a little problem .. maybe I could not find the answer coz I am kinda newbie , However , Here's my Question :

I wanna get a text from an input1 .. Here is the action :

result = Input.GetText(input1);

Now I want to let that "result" appear into another input BUT inserted in a sentence like :

Good One , I like the [result] :lol

such that the bold [result] is the text which I got from Input 1 ..
Shall I expect any answer ?? :cool

yosik
08-17-2005, 08:17 AM
I wanna get a text from an input1 .. Here is the action :

result = Input.GetText(input1);

Now I want to let that "result" appear into another input BUT inserted in a sentence like :

Good One , I like the [result]

such that the bold [result] is the text which I got from Input 1 ..
Shall I expect any answer ??
Simple enough:

1. you need to use:
result = Input.GetText("input1");
WITH QUOTATION MARKS FOR THE INPUT OBJECT

2. Add the following action:

Input.SetText("input2", "Good One , I like the"..result);

Explanation: What you do is have a string of text ("Good One , I like the") to which you concatenate (..) the variable (result) whose value you got in the previous action.

Hope that helped.

Yossi

el5ateer
08-17-2005, 08:37 AM
Thanks for the fast reply mate .. Actually it worked for the example I gave but I discovered that I didn't write my real need :eek:

I need to insert that result into a Sentence , Hi bla bla bla [result] so bla bla bla :lol

:cool

TJ_Tigger
08-17-2005, 08:45 AM
Input.SetText("input2", "Hi bla bla bla "..result.." so bla bla bla");

If the insertion point is always in the same place then you can use the above. Or you could use a String.Replace to replace a unique string with the result from your input box.

Input.SetText("input2", String.Replace("Hi bla bla bla [result] so bla bla bla", "[result]", Input.GetText(input1), ";

Tigg

el5ateer
08-17-2005, 08:47 AM
You made my day .. Thanks a lot Guys :yes