PDA

View Full Version : Feature Request - System Time Plugin.



Ron
October 13th, 2002, 01:55 PM
On 2001-12-06 18:44, cohnhead wrote:
This would be a pretty easy plugin to do. Ron, if you give me an Action code ID, i can do it next week.


Use Plugin ID 136

Ron
October 13th, 2002, 01:55 PM
Hmm,.. while trying to recreate this problem I could not even get the system time into any register... now that is weird.

SteveV
October 13th, 2002, 01:55 PM
On 2002-01-11 20:28, Mark F wrote:
Is this a bug?

Appears to be. Same on my system: AM/PM rollover happens at 1:00 in the afternoon. Also after the 11:59PM to midnight rollover the time shows up as 0:00AM despite my using HH:MM AM/PM non 24 hour clock settings. After 00:59 the time is displayed correctly.

--Steve

Mark F
October 13th, 2002, 01:55 PM
If there was a way to get the time in a text register or multiple numeric registers, the OSD could display it now.

I'm sure you are less worried about ancient history (8 months ago) than right now but the convoluted OSD setup and use scenerios come from having an OSD built into Girder (used for questions and other Girder commands) that is not used by the current OSD plugin. :smile: This will hopefully change in the new architecture of version 4.x of Girder.

Mark F
October 13th, 2002, 01:55 PM
The update could be achieved via the time server plugin.

Mark F
October 13th, 2002, 01:55 PM
Is this a bug?

I have the plugin set up for reg 25, HH:MM:SS AM/PM, NOT 24 hour clock. Just after lunch today I saw 12:51:33 AM. I always thought AM changed to PM (and vice versa) at the passing of 12:00, not 1:00. Right now I see 1:27:05 PM.

_________________
Mark F

<font size=-1>[ This Message was edited by: Mark F on 2002-01-11 20:29 ]</font>

Ingo
October 13th, 2002, 01:55 PM
What format would be preffered for the Time? Should we include the date too?


if you would do it via system preferences, everybody could have it in his own format. :wink:

Ingo

jediperry
October 13th, 2002, 01:55 PM
Nice pugin. Works well with the speach plugin as well.

Mike

cohnhead
October 13th, 2002, 01:55 PM
This would be a pretty easy plugin to do. Ron, if you give me an Action code ID, i can do it next week.

What format would be preffered for the Time? Should we include the date too?

Marc

cohnhead
October 13th, 2002, 01:55 PM
Plugin is done. See "Time 2 Reg" in the downloads page. It fills the selected register with the time in the selected format. You can choose to use a 24 hour clock instead of a 12 hour clock. Then use OSD Popup to display it as you wish.

Good Luck, Let me know if there are other formats that you want me to add.

Marc

mrichmon
October 13th, 2002, 01:55 PM
How about a plugin or girder action to display the current system time?

Perhaps this would be best performed as an option on the OSD plugin - that way the color and position controls do not need to be replicated.

In danger of this starting another round of OSD feature requests, I want to mention that specifying the OSD font in the Girder settings rather than the OSD settings is somewhat confusing. Perhaps the font selection needs to be part of the OSD settings dialog, and the Girder OSD settings needs to embed the OSD plugin settings dialog in order to set *default* OSD settings. That is the defaults used for actions like "Question" which seem to call the OSD code, but do not allow the OSD position or colors etc, to be controlled.

If there is an alternate way to display the system time, other than pulling up the task bar, please let me know.

...michael

mrichmon
October 13th, 2002, 01:55 PM
Yeah, it looks like the OSD was originally part of girder, and now there are two forms of the OSD code - the plugin version, and the originally embedded version which is still being used by things like the question command.

With this sort of structure, it is often tricky to provide the appropriate hooks to call the plugin. In theory I suppose you need to keep the embedded basic version of the OSD for use by other commands when the plugin OSD is not enabled. But, implement a test at the start of the embedded OSD which checks for the plugin OSD, and forwards the call to the plugin if it is available. The harder bit is to have the girder settings dialog swallow the plugin settings dialog in order to set default OSD behavior when the plugin is available. But even this could happen if an agreed extendable interface between girder and the OSD plugin is adopted.

So, the next question would be whether there is a way to get the output of a command into a text register? :smile:

If so I could hack together a bat file. Although, the next step of getting the register to update regularly in order to allow the time to be displayed in the corner of the screen may be tricky.

<font size=-1>[ This Message was edited by: mrichmon on 2001-12-06 00:53 ]</font>

mrichmon
October 13th, 2002, 01:55 PM
On 2001-12-07 00:03, Ingo wrote:


What format would be preffered for the Time? Should we include the date too?


if you would do it via system preferences, everybody could have it in his own format. :wink:

Ingo


I'd suggest that you want control over the format, seperate from the system preferences. This way it would be possible to use a state set to switch between showing the time and showing the date.

My original desire for this type of plugin is so I can have a clock in the corner of my display while I am watching TV and getting ready for work. (Especially since I've got all my overlay colours set the same so OSD 2.0 gives me nice transparent backgrounds.)

So, if Cohnhead is talking about a plugin to put the system time into a register, is it worth building in a update feature? Or could this be achieved with the timer plugin?

What about making it generic so you can target the plugin to a window component to set the text content or component name into a register? eg the taskbar clock with
ClassName: Shell_TrayWnd
Executable: Explorer.EXE
ChildName: 11:04AM
ChildClass: TrayClockWClass


These are just suggestions. Since I'll be happy with just getting the time onto the screen, and if I were not in the middle of writing my thesis I'd try coding it up myself.

----
Michael

<font size=-1>[ This Message was edited by: mrichmon on 2001-12-07 01:17 ]</font>

mrichmon
October 13th, 2002, 01:55 PM
Excellent! Once again the web provides. :smile:

It took me a bit of searching to work out
how text registers function, but it's working very nicely.

Thanks to Marc for putting this together so quickly.

A quick overview for those unfamiliar with register usage in girder.
Text registers seem to be a parallel set of registers to the numeric registers visible when you hit F10. To get the time to display in the OSD you need to perform two steps:

set the current time into the appropriate text register using the new 'Time 2 Reg' action. In this example the register to specify in the 'Time 2 Reg' settings is 4 - so the current time will be placed in text register 4.
display the time on the screen using the OSD. Finally, make an OSD action which includes '[treg 4]' in the message text (without the quotes).


There is nothing special about using text register 4, and you can get more flexibility by parameterising the treg index with register indexing such as [treg [reg 1]]. But that can be left as an exercise for the reader. :smile:

ocgltd
October 13th, 2002, 01:55 PM
Could I request another time format?
HH MM A M
That way the SAY IT will read the time properly. The HH:MM is spoken as HH minutes MM seconds. An "AM" is spoken as "ahm"...

Pete
January 14th, 2003, 06:43 PM
This plugin is great, thank you!

Pete

Pete
February 25th, 2003, 04:20 PM
Is there any chance that the time2string plugin could be changed to always use a two-digit hour when using 24-hour time? That is, before 10:00, I'd like to see 00:00 through 09:59. Currently it shows 0:00 through 9:59.

The reason that I prefer the leading zero is because it makes it obvious that it's using 24-hour time.

In Regional Settings in Control Panel (WinXP), I have specified the time format with two capital "H"es like this: HH:mm:ss
The HH code means: use 24-hour time and keep the leading zero. In all other parts of WinXP on my computer, the leading zero is present.

Otherwise, is there any "easy" way for me to do this? I don't have any experience writing plugins for Girder.

Thanks for your consideration,

Pete

Pete
February 26th, 2003, 08:24 AM
I've found a way to do this using a "Variable Manipulation Script". I'll post it here in case any other newbies want the same thing as me.
if strlen&#40;currentTime&#41; < 5 then
currentTime = "0"..currentTime
end

Pete