Jump to content

Recommended Posts

Posted (edited)

I am creating a program that manages the schedules of a group of people. I have completed the part that saves and stores the peoples information i need, but I want to also read this information (mostly just the shift they are working) and represent it on a linear time graph. For example:

name | |----|

name | |-------------|

name | |--------|___|--------|

name | |-----------|

name |__________________________________

increments of time

(spaces didnt show, but the shifts do not line up, they are spread across the graph)

But I haven't thought of a reasonable way to do it. At this stage I dont know how to approach it with autoit, though I may post back for actual script help when I find a way. Ideas?

(prog saves to a .ini file with different keys representing start and end times and names, among other things)

Edited by theholycow

Christianity: In the beginning, there was God, who always was there and created everything.Atheism: In the beginning, there was nothing, which exploded. Both sides look bad...

Posted

Like this maybe?

$file = FileOpen("shift.txt")
$shift_start = FileReadLine($file,5) ;guessing on the line #,should be something like 8 or 13
$shift_end = FileReadLine($file,6) ;same
$shift = $shift_end - $shift_start
$shift_view = "----"
For $i = 1 To $shift
$shift_length_view &= $shift_view
Next
$shift_spacer = "    "
For $i = 0 To $shift_start
$spacers &= $shift_spacer
Next
$shift_view = $spacers & "|" & $shift_length & "|"

I haven't tested this but hopefully you get the idea :S. It's one way and I know you use ini files but you should be able to adapt it fairly easily.

Posted

@theholycow

IIRC what you're trying to create is commonly called a Gantt diagram, so googling

'Gantt' will probably give you some graphic/design ideas

HTH,

whim

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...