Jump to content
Developer Wiki and Function Reference Links ×

SCRIPT MESSAGE SIZE


Recommended Posts

The only way I know of is to manually resize it smaller. 

 

It grows to match the size necessary for a message, but it then stays at that size even if you close it manually or with the ClrMessage command.  😞

 

There was along discussion on the Vectorscript list back in 2013.

 

Since then Message has gotten worse, with the ability to update during the run of a script lost.

 

I now use AlrtDialog almost exclusively instead. It take a click/return to close, but is better for my purposes.

 

 

  • Like 1
Link to comment

Please teach me the trick Sam.  When I run the following script with the message box closed I only get it opening at the end of the script run showing 'Hello World. 3'. I never see the 1 or 2.

 

Procedure Test;

VAR	N1:Integer;

BEGIN
	For N1 := 1 to 3 do
		Begin
			Message('Hello World. ', N1);
			Wait(1);
		End;
End;

Run(Test);

 

Link to comment

Try the following:

 

Procedure Test;

VAR    N1:Integer;
    X, Y    :INTEGER;

BEGIN
    For N1 := 1 to 3 do
        Begin
            Message('Hello World. ', N1);
            GetPt(X, Y);
        End;
End;

Run(Test);

 

After that, swap the GetPt() and the Message() statements.  Both versions work here.

 

 

Link to comment

It does seem to work with the GetPt. But I can't make it work consistently without user interaction.  The  For 1 to 10000 is about a 2 second delay on my machine. I occasionally see the 2, always see the 3, Never see the 1.

 

Still seems deeply broken to what was available in ~VW2010 to me. Has been broken this way since at least VW2015. No way to see data as you iterate a look without a GetPoint or AlrtDialog.

 

I submitted a VE on this in 2016. It was converted to a Bug in January 2017.  😞

 

 

Procedure Test;

VAR	N1, N2, X1, Y1	:Integer;
	L1, L2	:LongInt;
BEGIN
	L1:=1;
	For N1 := 1 to 3 do
		Begin
			Message('Hello World. ', N1,' ',L1, ' ',Date(2,2));
			For L2:= 1 to 10000000 do L1:=L1+1;
			Rect(0,0,1,1);
		End;
End;

Run(Test);

 

Link to comment
4 minutes ago, Pat Stanford said:

It does seem to work with the GetPt. But I can't make it work consistently without user interaction.  The  For 1 to 10000 is about a 2 second delay on my machine. I occasionally see the 2, always see the 3, Never see the 1.

 

I never see the 2.  Only the 3.

Link to comment

Yes, Message() only updates mid-script if the script is interrupted by an interactive call like GetPt(), or a dialog call like AlrtDialog(). So, what's the point, unless you want to see Sam's point?

 

PROCEDURE StupidMessageTricks;
VAR
	I :Integer;
BEGIN
	for I := 1 to 3 do begin
		message(I);
		AlrtDialog(concat(I));
	end;		{ for }
END;
Run(StupidMessageTricks);

 

Raymond

Link to comment

Thanks, I was able to resize the message dialog manualy but only after I commented out the "ClrMessage" command at the end. 

 

Made a quick script to fix, LOL. 

message('Move and Resize this dialog box as desired. Close when done.');

 

Edited by The Hamma
Link to comment

I use the Message dialog to tell the user either what will happen next or what to do next.  Example, I have a command that allows the user to assign the circuits of a multicable (multiple circuits) to different lights.  The Message window tells him the number of the circuit he is about to assign, and it increments that number every time he clicks on a light and assigns a circuit.  There are a bunch of other things that the user can do with the click by holding down modifier keys and the Message window also tells the user what those options are.  The only thing the user does is click on lights one at a time.

 

Link to comment
23 hours ago, Pat Stanford said:

What I really want it for is debugging.  Loop with a Message and a Wait so I can let the code run and look at values as it continues.  Useless for that in the current state.  So I use AlrtDialog(Concat(Blah, Blah1, Blah2)); and hit the enter key 1000 times.  😞

 

We are the same....I really lament the loss of Message functionality for debugging.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...