"Date" zone for Autoplay script

I wanted to have both the time and date in a simple 'autoplay.bsp' file on the HD2000, so I made the following change to the version 'autorun.bas':

Starting at line 1381, insert:

elseif zoneType$="DATE" then res=CreateObject("roResourceManager", "resources.txt") cTemp = CreateObject("roClockWidget", r, res, 0) if (foreground_text_color<>-1) then cTemp.SetForegroundColor(foreground_text_color) else cTemp.SetForegroundColor(&h0000fe) endif if (background_text_color<>-1) then cTemp.SetBackgroundColor(background_text_color) endif zoneObjects(zone_count)=cTemp

Then you can add to your autoplay.bsp:

DefineZone DATE 960,320,320,80

And you'll have the date displayed in the zone using the parameters in the 'resource.txt' file. Example in the next link-- right hand size shows two zones, one with 'clock' and one with 'date'.



Hopefully I didn't reinvent the wheel-- I didn't find anything with the forum search. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->

I did run into one 'odd' thing-- when I use a "Backgroundbitmap" with the clock, I always got grey text. So, I changed the "cTemp.SetForegroundColor(&ha0a0a0)" to be the color I wanted (blue in this case-- &h0000fe).

YMMV, no warranties expressed or implied. <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->



Please sign in to leave a comment.