I am using a script to do (among many other things) display a security warning message at login time, and the user will be required to click on OK to verify they are authorized to enter the system. What my problem is, ( and I'm guessing there isn't an clear cut answer for this) depending on the users screen resolution, font size, etc... the message that I created takes on a different shape and format on each PC. What I am hoping to accomplish is to create a message box, that will look as much the same on every PC as possible.
One of the main issues is that the text that I am entering into the message, is quite long, and have entered a specific number of spaces between sentences to create what looks to be 2 paragraphs.... Here is a copy of the line I am using...
$msgbox = MESSAGEBOX("This computer system is to be used only by authorized users. By continuing to use this system, you represent that you are an authorized user and are thus subject to the terms and conditions of use. [ there are spaces here to seperate the two different languages ] Ce Systeme informatique ne peut etre utilise seulement que par des utilisateurs autorises. En utilisant ce systeme, vous affirmez etre un utilisateur autorise et etre ainsi assujetti aux termes et conditions d'usage", "WARNING!!!/AVERTISSEMENT!!!",0,0)
As I mentioned depending on the users screen resolution, and font size the characters will wrap differently on each PC. I was hoping to have the look of two paragraphs. One for English and one for French. The second paragraph will start at the far left on one PC, and it will start in the middle on the second... etc... Is there a way to standardize how this text will look no matter what PC it is run on? Any advise would help
[ 23. July 2003, 14:41: Message edited by: lanceb2b ]
Howard BullockHoward Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You should be using the legal message values in the winlogon registry key. This is part of the OS.
Note that you need Admin writes to create or write to these location on an NT or higher OS computer. In that case, the message should be part of the build process.
Thanks for the reply, and I was aware of this registry entry, however, because of internal logistics, and opinions, they have decided against entering this message on each PC locally, and want this run after login time only, and only if a succesfull login is achieved......
You can use @CRLF to create paragraphs. However, the final layout is descided by the user's desktop settings, e.g. screen resolution, font sizes, and so on. Thus, you cannot create a identical-looking messagebox unless you standardize teh desktop look-and-feel. Be advised that the messagebox is limited to a total of 1024 characters.
code:
$warning='the english text'+@CRLF+@CRLF+'the franco-canadian text' $rc=messagebox($warning,'english - franco-canadian')
[ 23. July 2003, 15:09: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.
CHR(10) and CHR(13) are the ASCII-representations of the 'carriage return' and the 'line feed' characters that combined will result in a cursor to be in the first column of the follwing row.
You might want to let other's know the KiXtart version you are using as the answers will depend on it. For example, KiXtart 3.x does not support UDFs.
_________________________
There are two types of vessels, submarines and targets.
I completely understand what you mean about learning yourself.... I wasn't taking what you said as a dig..... i suppose I could have tested to see what the CHR(10) and(13) did, but really I would have just seen that it did what I wanted it to, but not know how it did it... As you posted, the explaination of the command explains that it will insert a chcaracter code, but wasn't sure what 10 and 13 were... I didn't see a list of what the character codes were...
But thanks again for your help, and I will promise :-) (for you guys and me) to do my own research first....