SRL Archive - Suggestions

MessageBox/ShowMessage


Daniel

2010-09-05 03:03:50

MessageBox / ShowMessage pl0x? :)

Bebe

2010-09-05 03:08:58

we don't have Readln?

Daniel

2010-09-05 03:56:58

From: Bebe
we don't have Readln?

Nope. But I don't need that :D

CX gamer

2010-09-05 04:36:43

I can't think of a lot of situations this would be handy.

Daniel

2010-09-05 04:58:42

From: CX gamer
I can't think of a lot of situations this would be handy.


Mainly useful if you use forms and whatnot in your script :)

CX gamer

2010-09-05 05:05:37

Or right, I understand. Like for example when CheckUserNicks returns False, a user can choose wether to go back to the form to correct his mistake or to run the script anyway. :)

mastaraymond

2010-09-11 08:06:01

Added: MessageBox/MessageDlg/ShowMessage (and we already had InputQuery)..

See test-script:


program new;
var
Value : string;
begin
ShowMessage('ShowMessage!');
Writeln('MessageBox -> ');
case MessageBox('This is the text','My Caption', mbYesNoCancel) of
mrYes : Writeln('Pressed yes!');
mrNo : Writeln('Pressed no!');
mrCancel : Writeln('Pressed Cancel!');
end;
Writeln('MessageDlg -> ');
case MessageDlg('Caption','Press a button!',mtError, [mbAbort,mbYes,mbIgnore]) of
mrAbort : Writeln('Pressed abort!');
mrYes : Writeln('Pressed Yes');
mrIgnore: Writeln('Pressed Ignore');
mrCancel: Writeln('pressed Cancel');
end;
Writeln('InputQuery -> ');
Value := 'Edit.. or not?';
Writeln(format('Result of inputquery = [%s] the value = [%s]',[booltostr(InputQuery('Enter something funny','ENTER HERE',value)),value]));
end.