box.exe (c) Pedago Ab & Anders Gustafsson Creates an attention-getting messagebox from the login-script. Usage: Copy the executable into sys:public or other suitable directory in the path and add the following line to the loginscript: #box 65;Greetings!;Lovely day - Spring in the air! This will stop script execution and put up a dialogbox with the caption "Greetings!" and a text of "Lovely day - Spring in the air!". The style is a regular box with an asterix and two buttons OK and Cancel. If you want to break the line on the third argument you kan use the vertical bar to do so, ie: #box 65;Greetings!;Lovely day - Spring in the air!|Why should I? The first argument is simply a combination of the values below and the returncode, something you can check in the script by using ERROR_LEVEL, is what you click to get out of the box. For example 0x30+0x01 = 65d will give you a box with an exclamation mark and two buttons: Yes and No. If you click Yes the program will return 6. If you click No it will return 7. As usual I take no resposiblility for what you do with this program. Comments are welcome, adress them to dalton@pedago.fi. /* * MessageBox() Flags */ #define MB_OK 0x00000000L #define MB_OKCANCEL 0x00000001L #define MB_ABORTRETRYIGNORE 0x00000002L #define MB_YESNOCANCEL 0x00000003L #define MB_YESNO 0x00000004L #define MB_RETRYCANCEL 0x00000005L #define MB_ICONHAND 0x00000010L #define MB_ICONQUESTION 0x00000020L #define MB_ICONEXCLAMATION 0x00000030L #define MB_ICONASTERISK 0x00000040L /* * Dialog Box Command IDs (ie returncodes) */ #define IDOK 1 #define IDCANCEL 2 #define IDABORT 3 #define IDRETRY 4 #define IDIGNORE 5 #define IDYES 6 #define IDNO 7 About Pedago Interaktiv Ab Pedago Interaktiv Ab is a consulting company, located on the Åland Islands in Finland. We specialise in: - Network planning and implementation - Training (instructor-led and CBT-BASED) - Application develoment For more information please contact peter@pedago.fi or dalton@pedago.fi.