Writing a Scheduling Program

Just starting out? Need help? Post your questions and find answers here.
spongehammer
User
User
Posts: 84
Joined: Sat Jul 19, 2003 6:45 pm
Location: UK

Writing a Scheduling Program

Post by spongehammer »

Hello all,

this is my first post here. I am a novice so forgive my ignorance, however i do need some pointers.

I need to write a program which will allow the user to select files (mpeg videos actually) from a list and then select a time and date (from a calendar type object) at which the video will be displayed. There is a requirement to have a number of videos scheduled in a list, so there will also need to be some sort of error checking to ensure that dates & times do not conflict.

I wonder if someone could give me some pointers as to where to start or possible references to similar programs.

Thank you :)
I looked up 'paranoid' in the dictionary this morning.
It said, 'what do you want to know that for?'
LJ
Enthusiast
Enthusiast
Posts: 177
Joined: Wed Apr 30, 2003 4:00 pm

Greetings...

Post by LJ »

Greetings Sponge and welcome!

Consider breaking up the task into smaller tasks. For example, first work on the calendar, next a listbox to store the mpeg names or a file requestor and mpeg player, finally, how you want your screen layout/user interface (splittergadget?) to pull all the tasks together on one screen.

Download the CodeArchive you will find in the Tricks and Tips section. You will find very useful code in this archive for your task.

Next, get comfortable using the Search feature at the top of this message forum window. For example, click on Search and type in: calendar.

Doing this search, I found this code that may be useful to you, good luck and I hope to see your code in the future as you learn more.

Code: Select all

; (c) 2002 - Franco's template - absolutely freeware
; Win-API Calendar 
; coded under WinXP 
; (hope it works also on other M$-OS, but you never know...)  
#MCM_GETCURSEL = $1001
#ok=1
Structure INITCOMMONCONTROLSEX
 dwSize.l
 dwICC.l 
 EndStructure  
 my.INITCOMMONCONTROLSEX
  my\dwSize = 8
  my\dwICC = $100
  InitCommonControlsEx_(@my)
  hWnd=OpenWindow(0,150,150,200,250,#PB_Window_SystemMenu,"API-Calendar")
  If hWnd=0 Or CreateGadgetList(hWnd)=0:End:EndIf
  hCal=CreateWindowEx_(0,"SysMonthCal32","DateTime",#WS_CHILD|#WS_VISIBLE|#WS_BORDER,0,0,200,200,hWnd,0,GetModuleHandle_(0),0) 
  ButtonGadget(#ok,100,220,50,20,"Get Time")
  Repeat
  EventID.l = WaitWindowEvent()
  If EventID=#PB_EventGadget
   If EventGadgetID()=#ok
         SendMessage_(hCal,#MCM_GETCURSEL,0,@time.SYSTEMTIME)
               year=time\wYear
               month=time\wMonth
               day=time\wDay
               info.s=Str(month)+"/"+Str(day)+"/"+Str(year)
               MessageRequester("",info,0)
               EndIf
               
               EndIf
  Until EventID = #PB_EventCloseWindow
  End
spongehammer
User
User
Posts: 84
Joined: Sat Jul 19, 2003 6:45 pm
Location: UK

thanks

Post by spongehammer »

Hi LJ,

thanks for the prompt reply. I will do as u say.
I have been looking at the forums overall and have the impression that there are a lot of people here who are willing to share thier expertise. So i am sure that i will never be without help with this project.

thanks again :)
I looked up 'paranoid' in the dictionary this morning.
It said, 'what do you want to know that for?'
Post Reply