Time Thread last updated on 2003-02-19 00:46:35

Posted by member 3800 on 2003-02-17 12:37:52

Kinda a shot in the dark here but this is what I'm trying to accomplish (without too much dirtywork hehe):
(time) AM
(time) PM
explanation: K the time is gonna be in larger font (which is why it's there twice, it's not gonna be there twice, it's just gonna be twice as large) then there's gonna be something like a supscript and superscript for the AM and PM. Does this make sense? And does anyone have any easy way of doing it? Like I said it's probably a shot in the dark hehe
Thanks,
-Tesh

Posted by member 831 on 2003-02-18 00:35:39 link

How about if you just run another instance of the clock, and just have the am/pm in it?

Posted by member 60 on 2003-02-18 14:32:39 link

timer.dll & mzscript.dll
this probably won't make sense, probably not the most elgant solution but anyway:

;never used timer.dll myself...
*Timer ampm #sl 1m !am_pm_shift

*Script bang !am_pm_shift
*Script exec !ifNExist _clockAmPm !varSet _clockAmPm "na"
;this only works with mzscript .9 something +, with integer compare
; *Script gotoif ( "%[hour]" => "12" ) shift_pm
; now messy mzscript that is string compare only (added x to force string compare)
*Script gotoif ( "%[hour]x" = "0x" ) shift_am
*Script gotoif ( "%[hour]x" = "1x" ) shift_am
*Script gotoif ( "%[hour]x" = "2x" ) shift_am
*Script gotoif ( "%[hour]x" "20000000" = true :P


*Script label shift_am
*Script gotoif ( "%[_clockAmPm]" = "am" ) shift_exit ;no need to change indicator
*Script exec !varSet _clockAmPm "am"
;required bangs to show am indicator/hide pm
*Script goto shift_exit


*Script label shift_pm
*Script gotoif ( "%[_clockAmPm]" = "pm" ) shift_exit ;no need to change indicator
*Script exec !varSet _clockAmPm "pm"
;required bangs to show pm indicator/hide am
*Script goto shift_exit


*Script label shift_exit
*Script exit
*Script ~bang

Posted by member 60 on 2003-02-18 14:37:12 link

didn't like my 'lessthen'... will now try with > and <:

*Timer ampm #sl 1m !am_pm_shift

*Script bang !am_pm_shift
*Script exec !ifNExist _clockAmPm !varSet _clockAmPm "na"
;this only works with mzscript .9 something +, with integer compare
; *Script gotoif ( "%[hour]" => "12" ) shift_pm
; now messy mzscript that is string compare only (added x to force string compare)
*Script gotoif ( "%[hour]x" = "0x" ) shift_am
*Script gotoif ( "%[hour]x" = "1x" ) shift_am
*Script gotoif ( "%[hour]x" = "2x" ) shift_am
*Script gotoif ( "%[hour]x" <= "23x" ) shift_pm
; with string compare "3" > "20000000" = true :P


*Script label shift_am
*Script gotoif ( "%[_clockAmPm]" = "am" ) shift_exit ;no need to change indicator
*Script exec !varSet _clockAmPm "am"
;required bangs to show am indicator/hide pm
*Script goto shift_exit


*Script label shift_pm
*Script gotoif ( "%[_clockAmPm]" = "pm" ) shift_exit ;no need to change indicator
*Script exec !varSet _clockAmPm "pm"
;required bangs to show pm indicator/hide am
*Script goto shift_exit


*Script label shift_exit
*Script exit
*Script ~bang

Posted by member 3800 on 2003-02-19 00:46:35 link

Thanks I'll give it a shot!