;*PW2.0: SHOWCPDT.WAS - Show Control Panel Date and Time setting results ;****************************************************************************** ;* * ;*PW2.0: SHOWCPDT.WAS - Show Control Panel Date and Time setting results as * ;* they will be used by PW2. These settings at the Windows* ;* Control Panel, International, may affect the way your * ;* scripts and those of others handle date and time display* ;* and calculations! Run this to see what you are set for! * ;* * ;* Though I fooled around with scripts in previous versions* ;* this is my first "from scratch" script in PW2.0. I do * ;* believe it will be easier! But this difference in the * ;* results one gets with time and date calculations and * ;* displays, now that PW follows _your_ Windows Control * ;* Panel settings, is something to remember when using the * ;* scripts written by others who may be calculating or * ;* displaying for a different date/time format. Have fun! * ;* * ;* -Paul Heim, CIS UID 76711,756 * ;* * ;****************************************************************************** ; ;Globals: string final, thedate, thetime, thetime24;declare global string variables ;used in dialog box text statements ;because they have to be "globals" Proc Main ;label to start the main (and only) procedure integer event ;integer to hold dialog box events (dlgevent) long datevar ;declare a long variable to hold the $LTIME thedate=$DATE ;make thedate variable equal to system variable $DATE thetime=$TIME ;make thetime variable equal to system variable $TIME thetime24=$TIME24 ;make thetime24 variable equal to $TIME24 datevar=$LTIME ;make datevar equal to $LTIME system variable ltimestring datevar final ;use ltimestring to convert date/time and put in final ;Now the new dialogbox! Note that each part of the dialogbox has its own index ;as you choose it to be. At the end is a push button. Since its index is 19, ;when you click on it, you get a dialog event (dlgevent) 19! Neat! dialogbox 0 90 45 180 215 2 "Windows CP Date/Time Settings Results" groupbox 1 5 5 170 85 "With Your Current CP International Settings:" text 2 10 20 100 10 "PW2's $DATE will produce:" left text 3 10 35 100 10 "PW2's $TIME will produce:" left text 4 10 50 100 10 "PW2's $TIME24 will produce:" left text 5 10 65 160 10 "PW2's $LTIME with LTIMESTRING will produce:" left text 6 110 20 60 10 thedate right text 7 110 35 60 10 thetime right text 8 110 50 60 10 thetime24 right text 9 10 75 160 10 final right groupbox 10 5 95 170 95 "Date/Time Displays and Calculations:" text 11 10 105 160 10 "Some ASPECT scripts for the new PW2.0 may be" left text 12 10 115 160 10 "written by scripters who use somewhat different" left text 13 10 125 160 10 "Control Panel Date/Time settings than yours." left text 14 10 135 160 10 "The writer may use `"ddmmyy`" format instead of" left text 15 10 145 160 10 "the typical (in the US) `"mmddyy`" format, or may" left text 16 10 155 160 10 "use the 24 hour time format. PW2.0 will always" left text 17 10 165 160 10 "use YOUR Control Panel settings, so you may" left text 18 10 175 160 10 "not get the same results without adjustments." left pushbutton 19 70 195 40 14 "&OK" OK default enddialog dlgevent 0 event ;when there is a dlgevent in dialog 0, put it in event while event !=19 ;loop while any event is not a number 19 dlgevent 0 event ;put any dlgevent in dialog box 0 into event if event == 19 ;if we get a dlgevent 19 (the pushbutton) exitwhile ;exit the while endif ;end the if endwhile ;end the while dlgdestroy 0 CANCEL ;destroy the dialogbox exit ;and exit the script endproc ;end the proc main ; ;end of script