Valuater Posted July 20, 2005 Posted July 20, 2005 (edited) UPDATE 9-29-05 Still at it with all my ideas... i have run out of room to put more buttons... heres a peek at where i amThe new Screenlots of scirting to do... for ALL THOSE BUTTONS....ggggg********************************** original post ****************************************I looking at writting an Employee Time Clock. The idea would be to find a "time" on the internet (or somewhere) so employees cant just change the time on the PC. I have a maximum of 5 employees and dont expect to get alot bigger than that(believe me, i dont want too). Idealy, this would work on my small 4 computer network.I do use Quick Books Pro which can read files for inputing paychecks, however I am not sure how easily this could be integrated.If anyone has written something similar or knows where I should look to find ideas and begin, it sure would be appreciated..thanks8) Edited September 16, 2006 by Valuater
Nova Posted July 20, 2005 Posted July 20, 2005 The idea would be to find a "time" on the internet (or somewhere) so employees cant just change the time on the PC.Why not just remove their rights to edit the time on their computers ?Or better yet buy a big clock and a stick and stand at the exit of your office, if an employee trys to leave early you first point at the clock and then hit them with the stick.They will eventually figure it out.
Valuater Posted July 20, 2005 Author Posted July 20, 2005 Why not just remove their rights to edit the time on their computers ?if someone should try to change the time.... i would like to know it, i have already thought of thatOr better yet buy a big clock and a stick and stand at the exit of your office, if an employee trys to leave early you first point at the clock and then hit them with the stick.They will eventually figure it out.<{POST_SNAPBACK}>i like that idea....lol but how is the boss going to go on his little "business" trips???SlimShady and a couple of others have written time clocks, however the links are no longer attached8)
seandisanti Posted July 20, 2005 Posted July 20, 2005 I looking at writting an Employee Time Clock. The idea would be to find a "time" on the internet (or somewhere) so employees cant just change the time on the PC. I have a maximum of 5 employees and dont expect to get alot bigger than that(believe me, i dont want too). Idealy, this would work on my small 4 computer network.I do use Quick Books Pro which can read files for inputing paychecks, however I am not sure how easily this could be integrated.If anyone has written something similar or knows where I should look to find ideas and begin, it sure would be appreciated..thanks8)<{POST_SNAPBACK}>this looks like a fun little project, i haven't done one like it before, but i'm gonna see if i can't whip something up...
Valuater Posted July 20, 2005 Author Posted July 20, 2005 this looks like a fun little project, i haven't done one like it before, but i'm gonna see if i can't whip something up...<{POST_SNAPBACK}>Thanks8)
scriptkitty Posted July 20, 2005 Posted July 20, 2005 I built a simple timeclock. When you started the app, it syncs the time with a timeserver, then when they clock in it checks the computer time with the timeserver time. If they are over 2 minutes in difference, it records it silently. I also have several other checks in place as well.If you use the beta, you can pull in the data from commandline programs, so you can have autoit grab the time seperately:#include <GUIConstants.au3> #include "constants.au3" $gui = GUICreate("console stuff") $edit = GUICtrlCreateEdit("", 10, 10, 300, 300, BitOr($WS_VSCROLL, $WS_HSCROLL,$ES_READONLY)) GUISetState() $ping = Run(@ComSpec & " /c ping google.com", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $lineout = StdoutRead($ping) If @Error = -1 Then ExitLoop GUICtrlSetData($edit, $lineout & @CRLF, 1) WEnd While 1 $get = GUIGetMsg() If $get = -3 Then Exit WEndFurthur, you can have autoit start timing itself seperately of the PC clock when it starts.TimerInit --------------------------------------------------------------------------------Returns a timestampWith the beta, you can also set up a TCP connection between computers. So you can have a seperate computer start the timer, sync the time, and run the host program in the backround. The client can connect to it, and simply punch in. The host will send back a responce, and then the client or host can send the data to an encrypted or password protected file with the clock in or out, employee number, and such.If you get any discrepancies, record them and fire that employee. If you set an autonumber field, and have a few employees, you will see something like this:bob|08:15|insam|07:30|infred|08:17|injohn|08:19|inObviously Sam cheated the timeclock, or attempted to. But if you recorded the other info then it would look like this:bob|08:15|in|nettime 08:15|Timer2123123sam|07:30|in|nettime 08:16|Timer2124433fred|08:17|in|nettime 08:17|Timer2125223john|08:19|in|nettime 08:19|Timer2127923There are a lot of ways to secure it. Make it easy to use, and set silent traps everywhere. Pretty stupid for folks to try and cheat you out of a few minutes and get fired. AutoIt3, the MACGYVER Pocket Knife for computers.
Valuater Posted July 20, 2005 Author Posted July 20, 2005 I built a simple timeclock. When you started the app, it syncs the time with a timeserver, then when they clock in it checks the computer time with the timeserver time. If they are over 2 minutes in difference, it records it silently. I also have several other checks in place as well.There are a lot of ways to secure it. Make it easy to use, and set silent traps everywhere. Pretty stupid for folks to try and cheat you out of a few minutes and get fired.<{POST_SNAPBACK}>Thank you very much scriptkitty,I will check those ideas out (and your script)8)
DjDeep00 Posted July 27, 2005 Posted July 27, 2005 I was looking into doing something similar. Do u think its possible for you to share the program or show me some pointer on how to create it? I am thinkin bout using an SQL database for all the employees and timings. Thanks in advance.
JSThePatriot Posted July 27, 2005 Posted July 27, 2005 Thank you very much scriptkitty,I will check those ideas out (and your script)8)<{POST_SNAPBACK}>Also to be sure you dont have a 2 minute discrepancy due to low BIOS Battery, sync the clocks on the computer with a time server about 1-2 hours before anyone should be clocking in to ensure the validity of the data.My 2 cents.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
seandisanti Posted July 27, 2005 Posted July 27, 2005 Also to be sure you dont have a 2 minute discrepancy due to low BIOS Battery, sync the clocks on the computer with a time server about 1-2 hours before anyone should be clocking in to ensure the validity of the data.My 2 cents.JS<{POST_SNAPBACK}>actually the way i'm doing it, going to have a check run at login to sync the time (seperate from timeclock script) if he wants, and then there's a gui with "in", "out", and "submit" buttons. then there are 8 labels, 4 visible that display the time. when in or out is clicked, the appropriate labels are changed to record and display system time, and then store net time too. and all info is written to a local temp file. when submit is clicked, all of the data goes to a network share in .csv format for easy automated import to excel, showing discrepancies for each punch. Also there is a manager side gui that grabs all files for specific date (filename schema is "username01012005") and puts the employee names in a dropdown, so that manager can at a glance check punches for any given date for any given employee... a discrepancy like you describe is possible, but should be a consistent one, but i'm hoping that he elects to use the sync script as part of a login script to avoid that. i already have most of the client side code written then i'm going to do up a spreadsheet and the manager side, wasn't going to post it here because of size (client side is already over 100 lines) but if anybody wants to see the code, i can put it on my site (no real page or anything i just use it for web storage mostly) when i'm done. wow i used alot of parenthases (doesn't look like i even spelled that right) in this post...
Valuater Posted August 3, 2005 Author Posted August 3, 2005 Thanks cameronsdad... for all the help, support and script you wrote....8) well, i decided to create a ini file rather than have the employee type in their full name 4 or more times a day. thus 001, 002 ,003 is much easier. i am working on the in/out portion. i have had some help from other programs and noticed they use one portion of in/out rather than start/lunch/end lunch/end shift. the saving to of the file will include a weeks work based on 7 days from fri to thurs utilizing "_DateDayOfWeek" the info saved will include hours of work completed the gui will include a "slip" to post extra items, mileage etc..... This is not complete as yet but here is where i am now lots of work ahead for mee thanks again 8)
scriptkitty Posted August 3, 2005 Posted August 3, 2005 looking very nice. AutoIt3, the MACGYVER Pocket Knife for computers.
DjDeep00 Posted August 5, 2005 Posted August 5, 2005 Nice job! I like the way it looks. I just need to know how did u go bout making the program? What kind of database u are using? If possible can u please post the code? Any help would appreciated. Thanks in advance.
Valuater Posted August 6, 2005 Author Posted August 6, 2005 Nice job! I like the way it looks. I just need to know how did u go bout making the program? What kind of database u are using? If possible can u please post the code? Any help would appreciated.Thanks in advance.<{POST_SNAPBACK}>still under construction8)
DjDeep00 Posted August 12, 2005 Posted August 12, 2005 O kool but is it possible for u to share some code or some logic behind it? I really want to start something but not sure how to approach it. If you have any code or any ideas please share. Thanks in advance.
Valuater Posted August 13, 2005 Author Posted August 13, 2005 (edited) Well.... I'm not sure I will ever finish this one. Because I have learned more and have more and more ideas.... geeezzzz But... here is the *QTime Station* - Messenger and the code for this messenger expandcollapse popupDim $QT_web = "www.XPCleanMenu.HostRocket.com" ;delete last listing Filedelete("b.tmp") ;gets the computer list and a few other things RunWait(@ComSpec & ' /c net view > a.tmp', @ScriptDir, @SW_HIDE) ;open the file for working $file = FileOpen("a.tmp", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ;Creates new file in which the result will be written FileOpen("b.tmp", 1) ; Read in lines of text until the EOF is reached in file a.tmp While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop ;find the string "\\" $result = StringInStr($line,"\\") if $result = 1 Then ;find next blank $blankpos = StringInStr($line," ") ;Find length of line $len = StringLen($line) ;calculate from what position to Trim string to the right $len = $len - $blankpos ;Trim all characters after the computer name $line = StringTrimRight($line, $len) ;Trim the // $line = StringTrimLeft($line,2) ;Write line to file, adding "|" FileWrite("b.tmp", $line & "|") EndIf Wend FileClose($file) FileDelete("a.tmp") $file2 = FileReadline("b.tmp", 1) ;install pics $Time_Logo = @TempDir & "\Time-logo.jpg" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Time.jpg", $Time_Logo) $Time_icon = @TempDir & "\Time-Icon.ico" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Time-Icon.ico", $Time_icon) $Sound_clk = @TempDir & "\Sound_clk.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Clickerx.wav", $Sound_clk) $Sound_grp = @TempDir & "\Sound_grp.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Group_open.wav", $Sound_grp) $Sound_bar = @TempDir & "\Sound_bar.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\xpinfbar.wav", $Sound_bar) $Sound_lnk = @TempDir & "\Sound_lnk.wav" FileInstall("C:\XPClean-web\Settings\XPClean-pics\Sounds\Notify.wav", $Sound_lnk) ;GUI Start #include "GUIConstants.au3" #include <Process.au3> ;Set GUI Opt("GUICoordMode", 1) ;Opt("GUINotifyMode", 1) $Tmesg_win = GuiCreate(" *QTime Station* - Messenger ", 329,145) GUISetIcon($Time_icon) $Icon_1 = GUICtrlCreatePic($Time_Logo, 265, 10, 50, 50) ;Create 2 buttons $button_1 = GUICtrlCreateButton("S&end", 40, 110, 80, 25) GUICtrlSetState(-1,$GUI_DEFBUTTON) $button_2 = GUICtrlCreateButton("C&ancel", 210, 110, 80, 25) ;Create 1 combo box, give focus and populate with contents of b.tmp $combo_1 = GUICtrlCreateCombo( "", 110, 20, 120, 20) GUICtrlSetState(-1,$GUI_FOCUS) GUICtrlSetData(-1,$file2) ;create labels $label_1 = GUICtrlCreateLabel( "C&hoose the PC", 20, 22, 150, 20) ;create text input $text = GUICtrlCreateInput("Message", 25, 70, 280, 20) ;Show the GUI GuiSetState (@SW_SHOW) SoundPlay ($Sound_lnk,1) ;sets tray icon opt("TrayMenuMode", 1) ; Default tray menu items (Script Paused/Exit) will not be shown. opt("TrayOnEventMode", 1) ;TraySetClick (16); right click $show_tray = TrayCreateItem ("Show *QTime Station*") TrayItemSetOnEvent (-1, "Set_Show") TrayCreateItem ("") $upgrade_tray = TrayCreateItem ("Check New Releases") TrayItemSetOnEvent (-1, "Set_Update") TrayCreateItem ("") $setup_tray = TrayCreateItem ("Net-Send Setup") TrayItemSetOnEvent (-1, "Set_Setup") TrayCreateItem ("") $about_tray = TrayCreateItem ("About QTasc") TrayItemSetOnEvent (-1, "Set_QT") TrayCreateItem ("") $exit_tray = TrayCreateItem ("Exit *QTime Station*") TrayItemSetOnEvent (-1, "Set_Exit") TraySetState () $msg = 0 While 1; $msg <> -3 $msg = GuiGetMsg() Select case $msg = $button_2 Or $msg = $GUI_EVENT_CLOSE GUISetState(@SW_HIDE, $Tmesg_win) SoundPlay ($Sound_grp,1) case $msg = $button_1 SoundPlay ($Sound_clk,1) $CPUID = GuictrlRead($combo_1) $msg1 = GuictrlRead($text) $var =RunWait(@comspec & " /c net send "& $CPUID &" "& $msg1,"",@sw_hide) ;GUICtrlSetData ( $combo_1, $file2) EndSelect WEnd Exit ;---------------------------- FUNCTIONS ---------------------- Func Set_Update() SoundPlay ($Sound_clk,1) Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & $QT_web) WinWaitActive("") EndFunc Func Set_Show() SoundPlay ($Sound_grp,1) GUISetState(@SW_SHOW, $Tmesg_win) EndFunc Func Set_QT() SoundPlay ($Sound_grp,1) $iMsgBoxAnswer = MsgBox(32, "*QTime Station* , by QTasc", "WHO IS, QT APPRAISAL SERVICE CO ?" & @CRLF & "" & @CRLF & "We are a Real Estate Appraisal Company based in Riverside, California. " & @CRLF & "" & @CRLF & "Thank you." & @CRLF & "" & @CRLF & "", 60) Select Case $iMsgBoxAnswer = -1;Timeout EndSelect SoundPlay ($Sound_grp,1) EndFunc Func Set_Exit() SoundPlay ($Sound_lnk,1) Exit EndFunc ;==>Set_Exit Func Set_Setup() SoundPlay ($Sound_clk,1) GUISetState(@SW_HIDE, $Tmesg_win) Run("mmc Services.msc -k netsvcs", @SystemDir) WinWaitActive("Services") Sleep(200) Send("{TAB}") Sleep(100) Send("Messenger") Sleep(100) Send("{ENTER}") Sleep(100) Send("!e") Sleep(100) Send("A") EndFunc ;==>Set_Exit The script was partially derived from 5 different "net send" programs (thanks all) ..... still needs a little clean-up, but works great 8) PS OK.... alot of clean-up 8) Edited August 13, 2005 by Valuater
Valuater Posted September 29, 2005 Author Posted September 29, 2005 updated page 1... 9/29/05 and thanks to gafrost for this function..... _SoundGetWaveVolume() 8)
mr_carter Posted October 6, 2005 Posted October 6, 2005 Wow!! This looks great.. I've been wating to do something like this using SQL DB just havent had time to try it.. would love to see the finshed project when it's done
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now