
2 Issues with Time
#1
Posted 11 January 2007 - 08:23 AM
Issue 1: Is there a way of displaying @time on my clocking screen and updating it every second without it momentarily removing focus away from the input field for the swipe card?
Issue 2: I've experimented with displaying the client pc time (ie the actual clock that fires up when you double click the time display) alongside the ProIV clocking screen and using the client pc time for the clocking time. I can get the time into a file on the samba drive by using the command
#VAR = SYSTEM-CRT("GUI Echo. |TIME > S:\dostime")
the only drawback is a quick flash of the black screen. I've tried calling a batch file with @Echo Off but the black screen still flashes. Is there a way of issuing a DOS command with the window minimized?
Any Ideas?
Kelvin
#2
Posted 11 January 2007 - 08:37 AM
If you're in the GUI world, how about writing an ActiveX control to show the clock? It could either display the client clock using Windows APIs or possibly show the server's clock by firing an event every second which could be answered by a PRO-IV logic which sets the time shown by the control according to the current value of @TIME.
Hope this helps.
Paul
#3
Posted 11 January 2007 - 10:28 AM
If it is not possible to avoid showing the window when issuing a DOS command does anyone know a different method of getting the client pc time? Displaying the client pc time is a quick and simple solution but because I can't guarantee the Unix server and the client pc will always be in synch I need to use the same time that is on display.
Kelvin
#4
Posted 11 January 2007 - 11:29 AM
Used this for a proof of concept, if you need it let me know...
#5
Posted 11 January 2007 - 12:02 PM
What about a simple ActiveX Timer Control updating time every minute? Its saves you the problem of have the DOS prompt screen flashing when you do a system call, and you can use the server time
Used this for a proof of concept, if you need it let me know...
Neil,
That sounds ideal - updating the time display every minute is perfectly adequate for this system - so I'd be pleased to receive the ActiveX TImer Control.
Thanks,
Kelvin.
#8
Posted 11 January 2007 - 02:24 PM
Extract it to a suitable place, run the ActiveX Gallerry so that it searches for it.
Properties that you need to set:
Enabled = 1
Interval = Number expressed in milliseconds I think
Only has 1 Event that gets executed when the specified interval is reached
Shout if you need anything else
Attached Files
#9
Posted 11 January 2007 - 02:45 PM
Rather than a Batch file write a VB Script, and call it C:\time.vbs
Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.CreateTextFile("C:\time.txt") objFile.WriteLine date() & " " & time() objFile.Close
And then call it from ProIV with this...
$$CMD = "rundll32 url.dll,FileProtocolHandler c:\time.vbs" #VAR = SYSTEM-CRT('GUI WINDOWS ' + $$CMD)
HTHs,
Rob D
#10
Posted 11 January 2007 - 03:23 PM
Here goes. Attached is a zip file called S309Timer.zip. Inside it is an ocx file of the same name. As far as I know its freeware and it does not require a wrapper to be written.
Extract it to a suitable place, run the ActiveX Gallerry so that it searches for it.
Properties that you need to set:
Enabled = 1
Interval = Number expressed in milliseconds I think
Only has 1 Event that gets executed when the specified interval is reached
Shout if you need anything else
Neil,
Thanks for the ActiveX Control and the instructions.
I've extracted it and run the ActiveX Gallery but the search did not find the new control.
I noticed that the warning screen before the search says: "This option scans your PC registry for OCX controls and therefore may take some time to run."
Do I have to add the new control to the registry for the ActiveX Gallery to pick it up?
#11
Posted 11 January 2007 - 03:29 PM
As for point 2, you can use this to get around the black DOS screen getting popped up...
Rather than a Batch file write a VB Script, and call it C:\time.vbsSet objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.CreateTextFile("C:\time.txt") objFile.WriteLine date() & " " & time() objFile.Close
And then call it from ProIV with this...$$CMD = "rundll32 url.dll,FileProtocolHandler c:\time.vbs" #VAR = SYSTEM-CRT('GUI WINDOWS ' + $$CMD)
HTHs,
Rob D
Thanks Rob,
This gives me another option.
Kelvin
#12
Posted 12 January 2007 - 04:48 AM
Transfer the desktop version of the S309Timer.ocx to the c:\Windows\system32 directory
Register the control on the desktop by doing:
Start - Run - regsvr32 c:\Windows\system32\S309Timer.ocx
You should get "DllRegisterServer in c:\Windows\system32\S309Timer.ocx Succeeded."
Reply to this topic

0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users