The Hamma Posted May 10, 2022 Share Posted May 10, 2022 Does anyone know how to change the size of a script message. I am unable to edit it while the script is running and it is taking up to much area. It covers a quarter of the drawing. Quote Link to comment
Pat Stanford Posted May 10, 2022 Share Posted May 10, 2022 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. 1 Quote Link to comment
Sam Jones Posted May 10, 2022 Share Posted May 10, 2022 Actually, you can get the Message dialog to update during the run of a script, but only if you don't use any other dialogs in the same script. Resizing and positioning the Message box remains as you describe, only done manually. Quote Link to comment
Pat Stanford Posted May 10, 2022 Share Posted May 10, 2022 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); Quote Link to comment
Sam Jones Posted May 10, 2022 Share Posted May 10, 2022 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. Quote Link to comment
Pat Stanford Posted May 10, 2022 Share Posted May 10, 2022 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); Quote Link to comment
Sam Jones Posted May 10, 2022 Share Posted May 10, 2022 I have only needed it to update with user interaction, so I can tell the user what to do. Otherwise, like you, I use AlrtDialog(). Quote Link to comment
Pat Stanford Posted May 10, 2022 Share Posted May 10, 2022 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. 😞 Quote Link to comment
michaelk Posted May 10, 2022 Share Posted May 10, 2022 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. Quote Link to comment
Sam Jones Posted May 10, 2022 Share Posted May 10, 2022 Michael, did you try both of my versions? If you did, you are doing something wrong.🤪 Pat, I prefer the mouse click to the flash of the AlrtDialog, but that is a matter of taste, and I don't ever use it for that, so my taste doesn't count. Quote Link to comment
michaelk Posted May 10, 2022 Share Posted May 10, 2022 🙄 🙄 🙄 🙄 I quoted the wrong thing. I was trying Pat's script. Yours works. 🙂 Quote Link to comment
MullinRJ Posted May 11, 2022 Share Posted May 11, 2022 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 Quote Link to comment
The Hamma Posted May 11, 2022 Author Share Posted May 11, 2022 (edited) 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 May 11, 2022 by The Hamma Quote Link to comment
Sam Jones Posted May 11, 2022 Share Posted May 11, 2022 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. Quote Link to comment
SamIWas Posted May 11, 2022 Share Posted May 11, 2022 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. 1 Quote Link to comment
Recommended Posts
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.