Author |
Topic  |
|
Marco1234
Germany
7 Posts |
Posted - 04/12/2002 : 06:09:09 AM
|
Can you write a simple MessageBox with an OK buttom an some rows of text? |
|
Mike Buess
USA
3037 Posts |
Posted - 04/12/2002 : 08:11:09 AM
|
There are a several ways to do that, but the easiest is...
type -b "message";
Mike Buess Origin WebRing Member |
 |
|
eparent
118 Posts |
Posted - 04/17/2002 : 09:32:19 AM
|
To display rows of text separate each row with '\n'.
Type -b "this is row1\nthis is row2";
If you want more control over your message box then use the Type.MsgBox method.
Type.MsgBox("this is row1\nthis is row2\n", "msg box title", 0, 0);
The last two arguments are for buttons and icon. For more info see Type object in your LabTalk manual.
|
 |
|
tom3m
USA
27 Posts |
Posted - 05/21/2002 : 2:19:36 PM
|
I tried copying your Type.MsgBox statement into the script menu and did not get multiple lines of text in the message box. The first command (Type -b...) *does* give multiple lines of text, though. Am I missing something, or is there just one line in the Type.MsgBox method? I like the extra functionality of that method.
I am running Origin 6.1 right now.
Cheers! |
 |
|
Mike Buess
USA
3037 Posts |
Posted - 05/21/2002 : 2:56:22 PM
|
While eparent's method works in Origin 7.0, apparently it doesn't in Origin 6.1 (I just tried with the same results that you got.) However, you can use this method instead...
%S="line 1 line 2"; Type.MsgBox(%S,"msg box title",0,0);
If you try it from the script window make sure that you highlight both lines of the %S= statement and then press enter.
Mike Buess Origin WebRing Member |
 |
|
tom3m
USA
27 Posts |
Posted - 05/22/2002 : 10:45:10 AM
|
Hi Mike,
Thanks very much. That works nicely for me. I have a script that looks for a certain condition in a set of data files and creates a log worksheet to help inform the user about what the script found, eg. which file names from the input set have the condition and which do not. I wanted the message box to tell them that the script found the condition and also what worksheet to look at to get further info. Two lines in the message box works best, I think.
I am looking at upgrading to Origin 7.0 now. |
 |
|
|
Topic  |
|