CompuServe Messages

SDARK programming

    15-Jun-95 12:28:14
Fm: Jim Butterfield 73624,14
To: Chris Shepard 102076,276
Don't know about program SDARK or how it interfaces with ARexx, but the basic ARexx structure for doing things by day-of-week might run like this… note that I am asking the program simply to SAY the current day of the week, but you could substite code to launch your program, such as ADDRESS COMMAND "RUN >NIL: <NIL: SDARK FIREWORKS", if that's the appropriate format for doing the task. See the code I've substituted for Thursday, below. /* TRIGGER ACTION BASED ON DAY OF WEEK */ day = DATE('i')//7 SELECT WHEN day=0 THEN SAY 'Sunday' WHEN day=1 THEN SAY 'Monday' WHEN day=2 THEN SAY 'Tuesday' WHEN day=3 THEN SAY 'Wednesday' WHEN day=4 THEN ADDRESS COMMAND "RUN >NIL: <NIL: ED RAM:X" WHEN day=5 THEN SAY 'Friday' OTHERWISE SAY 'Saturday' END It goes without saying that you don't need to do things on a 7-day cycle; just change the 7 to whatever value suits and adjust the coding in the SELECT area. –Jim