Rex Posted March 8, 2010 Share Posted March 8, 2010 Hi Boyz & Girlz of the AutoIT forumzI just ended a large project, creating a program to my work that allows the user to send informations to a shipping company... jada jada jada aso. who cares But my point is, when my Boos asked me how long time did U use on the program? It hit me i hadn't keep any record over my work, so i couldn't give him an correct answer lucky enough i could go back threw my backups and this way calc the amount of time i had used ± x hours .So i thought i should had used a Project Manager / Time keeper, or better yet create one my self But but when i started to create the GUI i stroke me, i had no clue what the GUI should contain.Current i have some input's:Project NameProject AuthorAuthor EmailForum Linkthen i created an edit for:Project DescriptionProject UpdatesAnd i went cold So now i ask all of U, what do U think a project manager / timer needs to be perfect.I have a couple of ideas of what the manager might should could:Handle several ProjectsShow Time already spentBug tracker of some sort (Treeview with checkboxes enabled ??)Ideas to be addedGenerate a report of used time (ma by specified in time pr. day?)any sugs?Cheers/Rex Link to comment Share on other sites More sharing options...
Rex Posted March 16, 2010 Author Share Posted March 16, 2010 Any one ? I have never used a project manager / timer so i really have no clue to what i should include to make it a perfect tracker for project(s) I did Google project timer/manager software, but most of those i found has so many features that i didn't know where to start I a really want to make my own, this way i also improve my AutoIT skills Cheers /Rex Link to comment Share on other sites More sharing options...
kaotkbliss Posted March 16, 2010 Share Posted March 16, 2010 you are in luck, I just created one for my work. it uses excel to give a spreadsheet of all jobs and times. expandcollapse popup#include <GuiConstants.au3> #include <Array.au3> #include <Excel.au3> Opt("TrayIconDebug", 1) main() Func main() $main = GUICreate("Main", 175, 75) $tt = GUICtrlCreateButton("Timetrak", 120, 20) $job = GUICtrlCreateButton("Jobs", 10, 20) $new = GUICtrlCreateButton("New Pay", 55, 20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $tt Then GUIDelete($main) timetrak() ElseIf $msg = $job Then GUIDelete($main) start() ElseIf $msg = $new Then $spot = IniReadSectionNames("C:\jobs.ini") If IsArray($spot) Then For $i = 1 To $spot[0] IniDelete("C:\jobs.ini", $spot[$i]) Next GUICtrlCreateLabel("Previous jobs deleted", 10, 50) ElseIf (Not IsArray($spot)) Then GUICtrlCreateLabel("No previous jobs", 10, 50) EndIf ElseIf $msg = $GUI_EVENT_CLOSE Then Exit (1) EndIf WEnd EndFunc ;==>main Func start() GUICreate("Job Tracker", 225, 100) $list = GUICtrlCreateCombo("Job1", 10, 10) GUICtrlSetData($list, "Job2|Job3", "Job1") GUICtrlSetData($list, "Job4|Job5|Job6", "Job1") GUICtrlSetData($list, "Job7|Job8|Job9", "Job1") $start = GUICtrlCreateButton("Start", 10, 40) $stop = GUICtrlCreateButton("Stop", 60, 40) $done = GUICtrlCreateButton("Done", 150, 40) GUICtrlSetState($stop, $GUI_DISABLE) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $start Then $list1 = (GUICtrlRead($list) & " " & @MON & @MDAY) IniWrite("C:\jobs.ini", $list1, 1, @MON & "_" & @MDAY) $timestart = TimerInit() GUICtrlSetState($start, $GUI_DISABLE) GUICtrlSetState($stop, $GUI_ENABLE) GUICtrlSetState($done, $GUI_DISABLE) GUICtrlSetState($GUI_EVENT_CLOSE, $GUI_DISABLE) ElseIf $msg = $stop Then $timestop = TimerDiff($timestart) $hours1 = IniRead("C:\jobs.ini", $list1, 2, "0") $hours = $timestop / 60000 $hours2 = $hours + $hours1 IniWrite("C:\jobs.ini", $list1, 2, $hours2) GUICtrlSetState($stop, $GUI_DISABLE) GUICtrlSetState($start, $GUI_ENABLE) GUICtrlSetState($done, $GUI_ENABLE) GUICtrlSetState($GUI_EVENT_CLOSE, $GUI_ENABLE) ElseIf $msg = $GUI_EVENT_CLOSE Then GUIDelete() Exit (1) ElseIf $msg = $done Then GUIDelete() main() EndIf WEnd EndFunc ;==>start Func timetrak() $row = 2 $column = 1 $column2 = 2 $row2 = 1 $x = 1 Local $datearray[$x] $jobs = IniReadSectionNames("C:\jobs.ini") $excel = _ExcelBookNew() For $i = 1 To UBound($jobs) - 1 $date = IniRead("C:\jobs.ini", $jobs[$i], 1, "") If $date <> $datearray[$x - 1] Then _ArrayAdd($datearray, $date) $column2 += 1 $x += 1 EndIf Next $column2 = 2 For $i = 1 To UBound($datearray) - 1 _ExcelWriteCell($excel, $datearray[$i], $row2, $column2) $column2 += 1 Next For $i = 1 To UBound($jobs) - 1 $job2 = StringTrimRight($jobs[$i], 5) $cell = _ExcelReadCell($excel, $row, $column) Do $cell = _ExcelReadCell($excel, $row, $column) If $cell = "" Then ExitLoop EndIf If $cell = $job2 Then ExitLoop EndIf If $cell <> $job2 Then $row += 1 EndIf Until $cell = "" If $cell = "" Then _ExcelWriteCell($excel, $job2, $row, $column) EndIf $row = 2 Next $row = 1 $column2 = 2 For $i = 1 To UBound($jobs) - 1 $column2 = 2 $row = 1 $job2 = StringTrimRight($jobs[$i], 5) $cell = _ExcelReadCell($excel, $row, 1) Do $row += 1 $cell = _ExcelReadCell($excel, $row, 1) Until $cell = $job2 $datecheck = IniRead("C:\jobs.ini", $jobs[$i], 1, "") $datecheck2 = _ExcelReadCell($excel, 1, $column2) Do $datecheck = IniRead("C:\jobs.ini", $jobs[$i], 1, "") $datecheck2 = _ExcelReadCell($excel, 1, $column2) If $datecheck = $datecheck2 Then $hours = IniRead("C:\jobs.ini", $jobs[$i], 2, "") $hours = $hours / 60 $hours = Round($hours, 2) _ExcelWriteCell($excel, $hours & " hr", $row, $column2) $column2 += 1 ElseIf $datecheck <> $datecheck2 Then $column2 += 1 EndIf Until $datecheck2 = "" Next $column2 = 2 $row2 = 1 Do $datecheck2 = _ExcelReadCell($excel, $row2, $column2) $replace = StringReplace($datecheck2, "_", "-") _ExcelWriteCell($excel, $replace, $row2, $column2) $column2 += 1 Until $datecheck2 = "" main() EndFunc ;==>timetrak 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Rex Posted March 16, 2010 Author Share Posted March 16, 2010 you are in luck, I just created one for my work. it uses excel to give a spreadsheet of all jobs and times. expandcollapse popup#include <GuiConstants.au3> #include <Array.au3> #include <Excel.au3> Opt("TrayIconDebug", 1) main() Func main() $main = GUICreate("Main", 175, 75) $tt = GUICtrlCreateButton("Timetrak", 120, 20) $job = GUICtrlCreateButton("Jobs", 10, 20) $new = GUICtrlCreateButton("New Pay", 55, 20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $tt Then GUIDelete($main) timetrak() ElseIf $msg = $job Then GUIDelete($main) start() ElseIf $msg = $new Then $spot = IniReadSectionNames("C:\jobs.ini") If IsArray($spot) Then For $i = 1 To $spot[0] IniDelete("C:\jobs.ini", $spot[$i]) Next GUICtrlCreateLabel("Previous jobs deleted", 10, 50) ElseIf (Not IsArray($spot)) Then GUICtrlCreateLabel("No previous jobs", 10, 50) EndIf ElseIf $msg = $GUI_EVENT_CLOSE Then Exit (1) EndIf WEnd EndFunc ;==>main Func start() GUICreate("Job Tracker", 225, 100) $list = GUICtrlCreateCombo("Job1", 10, 10) GUICtrlSetData($list, "Job2|Job3", "Job1") GUICtrlSetData($list, "Job4|Job5|Job6", "Job1") GUICtrlSetData($list, "Job7|Job8|Job9", "Job1") $start = GUICtrlCreateButton("Start", 10, 40) $stop = GUICtrlCreateButton("Stop", 60, 40) $done = GUICtrlCreateButton("Done", 150, 40) GUICtrlSetState($stop, $GUI_DISABLE) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $start Then $list1 = (GUICtrlRead($list) & " " & @MON & @MDAY) IniWrite("C:\jobs.ini", $list1, 1, @MON & "_" & @MDAY) $timestart = TimerInit() GUICtrlSetState($start, $GUI_DISABLE) GUICtrlSetState($stop, $GUI_ENABLE) GUICtrlSetState($done, $GUI_DISABLE) GUICtrlSetState($GUI_EVENT_CLOSE, $GUI_DISABLE) ElseIf $msg = $stop Then $timestop = TimerDiff($timestart) $hours1 = IniRead("C:\jobs.ini", $list1, 2, "0") $hours = $timestop / 60000 $hours2 = $hours + $hours1 IniWrite("C:\jobs.ini", $list1, 2, $hours2) GUICtrlSetState($stop, $GUI_DISABLE) GUICtrlSetState($start, $GUI_ENABLE) GUICtrlSetState($done, $GUI_ENABLE) GUICtrlSetState($GUI_EVENT_CLOSE, $GUI_ENABLE) ElseIf $msg = $GUI_EVENT_CLOSE Then GUIDelete() Exit (1) ElseIf $msg = $done Then GUIDelete() main() EndIf WEnd EndFunc ;==>start Func timetrak() $row = 2 $column = 1 $column2 = 2 $row2 = 1 $x = 1 Local $datearray[$x] $jobs = IniReadSectionNames("C:\jobs.ini") $excel = _ExcelBookNew() For $i = 1 To UBound($jobs) - 1 $date = IniRead("C:\jobs.ini", $jobs[$i], 1, "") If $date <> $datearray[$x - 1] Then _ArrayAdd($datearray, $date) $column2 += 1 $x += 1 EndIf Next $column2 = 2 For $i = 1 To UBound($datearray) - 1 _ExcelWriteCell($excel, $datearray[$i], $row2, $column2) $column2 += 1 Next For $i = 1 To UBound($jobs) - 1 $job2 = StringTrimRight($jobs[$i], 5) $cell = _ExcelReadCell($excel, $row, $column) Do $cell = _ExcelReadCell($excel, $row, $column) If $cell = "" Then ExitLoop EndIf If $cell = $job2 Then ExitLoop EndIf If $cell <> $job2 Then $row += 1 EndIf Until $cell = "" If $cell = "" Then _ExcelWriteCell($excel, $job2, $row, $column) EndIf $row = 2 Next $row = 1 $column2 = 2 For $i = 1 To UBound($jobs) - 1 $column2 = 2 $row = 1 $job2 = StringTrimRight($jobs[$i], 5) $cell = _ExcelReadCell($excel, $row, 1) Do $row += 1 $cell = _ExcelReadCell($excel, $row, 1) Until $cell = $job2 $datecheck = IniRead("C:\jobs.ini", $jobs[$i], 1, "") $datecheck2 = _ExcelReadCell($excel, 1, $column2) Do $datecheck = IniRead("C:\jobs.ini", $jobs[$i], 1, "") $datecheck2 = _ExcelReadCell($excel, 1, $column2) If $datecheck = $datecheck2 Then $hours = IniRead("C:\jobs.ini", $jobs[$i], 2, "") $hours = $hours / 60 $hours = Round($hours, 2) _ExcelWriteCell($excel, $hours & " hr", $row, $column2) $column2 += 1 ElseIf $datecheck <> $datecheck2 Then $column2 += 1 EndIf Until $datecheck2 = "" Next $column2 = 2 $row2 = 1 Do $datecheck2 = _ExcelReadCell($excel, $row2, $column2) $replace = StringReplace($datecheck2, "_", "-") _ExcelWriteCell($excel, $replace, $row2, $column2) $column2 += 1 Until $datecheck2 = "" main() EndFunc ;==>timetrak Cool i'll look into it thx Cheers /Rex Link to comment Share on other sites More sharing options...
ShawnW Posted March 16, 2010 Share Posted March 16, 2010 Well I got a rather ambitious idea for this project that I believe would be rather unique if thought out properly (which I haven't done). Basically an automated tracker of which projects you work on. A script that runs all the time in the background and looks at what files and processes are open. It compares them to a list of file or process names that you set as part of a project, and calculates how much time you spend with them as the active window. It would of course need to pause the timer if you idle for to long, and subtract the time it took to go idle from the total time, then resume once your at work again. You could even have a context menu added in windows that would add files to a project so that keeping the list of files in a project up to date would not be as tedious. Probably a lot of details to work out but seemed like a cool idea so thought I'd mention it. -Shawn Link to comment Share on other sites More sharing options...
Rex Posted March 17, 2010 Author Share Posted March 17, 2010 Well I got a rather ambitious idea for this project that I believe would be rather unique if thought out properly (which I haven't done).Basically an automated tracker of which projects you work on. A script that runs all the time in the background and looks at what files and processes are open. It compares them to a list of file or process names that you set as part of a project, and calculates how much time you spend with them as the active window. It would of course need to pause the timer if you idle for to long, and subtract the time it took to go idle from the total time, then resume once your at work again.You could even have a context menu added in windows that would add files to a project so that keeping the list of files in a project up to date would not be as tedious.Probably a lot of details to work out but seemed like a cool idea so thought I'd mention it.-ShawnHi ShawnThat's an ambitious idea i must say but it's not bad not at all, i will write it to my list of things that could be nice to have and maybe it will end up in the project .Cheers/Rex Link to comment Share on other sites More sharing options...
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