View Full Version : Dialog.TimedMessage
jcuster
10-13-2006, 01:25 PM
a bug I think..
I tried to use the Dialog.TimedMessage to display a status dialog to the user but when the Dialog.TimedMessage is executed the dialog box is not sized correctly.
It would be if I didn't use the hard return symbols but the Dialog.TimedMessage didn't autowrap the text of the dialog.
I wanted a nice standard sized dialog with no buttons.
jcuster
10-13-2006, 01:31 PM
I didn't attach the screen shot in the last post sorry!
It is working fine on my end with the latest version of the software. What version are you running (help -> about)
Adam Kapilik
jcuster
10-16-2006, 01:27 PM
I'm using SUF 7.0.5.1
Me too. Can you show me your exact text? I will try to replicate with that.
Adam Kapilik
jcuster
10-16-2006, 02:38 PM
Exact text of code
Dialog.TimedMessage("SDCS Approved Security Updates", "Security updates are being installed by\r Senate Democratic Computer Services. Do NOT use your computer\r until it has rebooted. This procedure will take 2 minutes.", 60000, MB_ICONINFORMATION);
Try using \r\n for newline. With this code I get it to look nice:
Dialog.TimedMessage("SDCS Approved Security Updates", "Security updates are being installed by\r\n Senate Democratic Computer Services. Do NOT use your computer\r\n until it has rebooted. This procedure will take 2 minutes.", 5000, MB_ICONINFORMATION);
AJK
jcuster
10-16-2006, 03:56 PM
Thats exactly what my boss wants. Now I just got to put the \r\ns in the right places to make look pretty.
Is there a good explanation of the /r /n characters in the help file in case I firget?
thanks again..
Lorne
10-16-2006, 05:30 PM
Each "\r\n" is actually two escape sequences that are used to start a new line. It's called a "carriage return/linefeed" pair, and is usually abbreviated as CRLF (CarriageReturn/LineFeed).
This stems back to the old typewriter days where advancing the page by one line and returning to the beginning of the line were two separate actions.
There are different standards for text on different operating systems; some of them need CRLF to start a new line, others need just the CR, others need only the LF.
Windows uses CRLF.
In programming languages like C, and Lua, newlines are often represented by a single escape sequence: \n. That \n will normally be translated into whatever is needed to make a new line, for example CRLF on Windows, or LF on Unix. This behaviour is what happens when the output is done in "text mode."
If the text is output in "binary mode" instead, then no translation is done, and the \n represents a single character.
(You might recognize the terms "text mode" and "binary mode" from FTP transfers. There, too, it refers to whether any translation is done for the newline characters.)
On Windows, sometimes you can use \n, and other times you need to use \r\n. Essentially, some parts of Windows operate in text mode, and others operate in binary mode.
As for remembering what to use, the best advice I can give you is to just try \n, and if that doesn't work, try \r\n. :)
Intrigued
10-16-2006, 06:13 PM
That's what I appreciate about you I.R. folks... williness to take a minute to long-hand explain something.
:yes
Lorne knows almost everything about computers.. glad he's on our side
Adam.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.