Here is your tips for today

BY IN QBasic Comments Off on Here is your tips for today

Di era DOS dulu, kita mengenal file AUTOEXEC.BAT yang berfungsi untuk menjalankan file executable (file-file dengan ekstensi EXE, COM atau BAT) secara otomatis. Waktu itu saya pernah membuat program untuk menampilkan tips-tips yang berganti setiap harinya. Berikut adalah listing programnya, mungkin bisa memberikan inspirasi buat kita semua…

‘%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%’

‘ ” Here’s Your Tips for Today “

‘ Created by Yulius Candra Wahyu Kurniawan
‘ Last edited : August, 1995
‘ Copyright (C) 1995 MagicTouch Software Inc.
‘ All Rights Reserved

‘%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%’

DECLARE SUB Center (Row, Fore, Back, Text$)
DECLARE SUB CheckTips ()
DECLARE SUB SetCursor (Row, Col, Fore, Back)
DECLARE SUB Tips.1 ()
DECLARE SUB Tips.2 ()
DECLARE SUB Tips.3 ()
DECLARE SUB Tips.4 ()
DECLARE SUB Tips.5 ()
DECLARE SUB Tips.6 ()
DECLARE SUB Tips.7 ()
DECLARE SUB Tips.8 ()
DECLARE SUB Tips.9 ()
DECLARE SUB Tips.10 ()
DECLARE SUB Tips.11 ()
DECLARE SUB Tips.12 ()
DECLARE SUB Tips.13 ()
DECLARE SUB Tips.14 ()
DECLARE SUB Tips.15 ()
DECLARE SUB Tips.16 ()
DECLARE SUB Tips.17 ()
DECLARE SUB Tips.18 ()
DECLARE SUB Tips.19 ()
DECLARE SUB Tips.20 ()
DECLARE SUB Tips.21 ()
DECLARE SUB Tips.22 ()
DECLARE SUB Tips.23 ()
DECLARE SUB Tips.24 ()
DECLARE SUB Tips.25 ()
DECLARE SUB Tips.26 ()
DECLARE SUB Tips.27 ()
DECLARE SUB Tips.28 ()
DECLARE SUB Tips.29 ()
DECLARE SUB Tips.30 ()
DECLARE SUB Tips.31 ()
DECLARE SUB TypeChar (Row, Fore, Back, Text$)
CONST Pesan$ = “H.a.v.e. a. W.o.n.d.e.r.f.u.l. D.a.y”

CLS
CheckTips

SUB Center (Row, Fore, Back, Text$)
Col = INT((80 – LEN(Text$)) / 2)
LOCATE Row, Col
COLOR Fore, Back
PRINT Text$;
END SUB

SUB CheckTips
DIM CDow$(8)
CTime$ = TIME$
CHours$ = LEFT$(CTime$, 2)
CDay$ = DATE$
CDate$ = MID$(CDay$, 4, 2)
CMonth$ = LEFT$(CDay$, 2)
CYear$ = RIGHT$(CDay$, 4)
Year = VAL(CYear$)
Month = VAL(CMonth$)
Day = VAL(CDate$)
Var.1 = Month – 2 – 12 * (Month < 3)
Var.2 = Year + (Month < 3)
Var.3 = INT(Var.2 / 100)
Var.2 = Var.2 – 100 + Var.3
Dow = INT(2.61 * Var.1 – .2) + Day + Var.2 + INT(Var.2 / 4)
Dow = (Dow + INT(Var.3 / 4) – Var.3 – Var.3 + 77) MOD 7 + 1
CDow$(1) = “Monday”
CDow$(2) = “Tuesday”
CDow$(3) = “Wednesday”
CDow$(4) = “Thursday”
CDow$(5) = “Friday”
CDow$(6) = “Saturday”
CDow$(7) = “Sunday”
IF CMonth$ = “01” THEN Month$ = “January”
IF CMonth$ = “02” THEN Month$ = “February”
IF CMonth$ = “03” THEN Month$ = “March”
IF CMonth$ = “04” THEN Month$ = “April”
IF CMonth$ = “05” THEN Month$ = “May”
IF CMonth$ = “06” THEN Month$ = “June”
IF CMonth$ = “07” THEN Month$ = “July”
IF CMonth$ = “08” THEN Month$ = “August”
IF CMonth$ = “09” THEN Month$ = “September”
IF CMonth$ = “10” THEN Month$ = “October”
IF CMonth$ = “11” THEN Month$ = “November”
IF CMonth$ = “12” THEN Month$ = “December”
IF CHours$ >= “04” AND CHour$ <= “10” THEN
Greeting$ = “G.o.o.d. M.o.r.n.i.n.g”
END IF
IF CHours$ >= “11” AND CHour$ <= “14” THEN
Greeting$ = “G.o.o.d. A.f.t.e.r.n.o.o.n”
END IF
IF CHours$ >= “15” AND CHour$ <= “18” THEN
Greeting$ = “G.o.o.d. E.v.e.n.i.n.g”
END IF
IF CHours$ >= “19” AND CHour$ <= “03” THEN
Greeting$ = “G.o.o.d. N.i.g.h.t”
END IF
Center 1, 26, 0, Greeting$
Center 2, 26, 0, Pesan$
Center 3, 14, 0, “Created by Yulius Candra Wahyu Kurniawan”
Center 4, 14, 0, “Copyright (C) 1995 MagicTouch Software Inc.”
Text$ = “It is a Lovely ” + CDow$(Dow) + “, on ” + Month$ + ” ” + CDate$ + ” ” + CYear$
Center 5, 11, 0, Text$
Center 6, 13, 0, “Here’s Your Tips for Today :”
IF CDate$ = “01” THEN Tips.1
IF CDate$ = “02” THEN Tips.2
IF CDate$ = “03” THEN Tips.3
IF CDate$ = “04” THEN Tips.4
IF CDate$ = “05” THEN Tips.5
IF CDate$ = “06” THEN Tips.6
IF CDate$ = “07” THEN Tips.7
IF CDate$ = “08” THEN Tips.8
IF CDate$ = “09” THEN Tips.9
IF CDate$ = “10” THEN Tips.10
IF CDate$ = “11” THEN Tips.11
IF CDate$ = “12” THEN Tips.12
IF CDate$ = “13” THEN Tips.13
IF CDate$ = “14” THEN Tips.14
IF CDate$ = “15” THEN Tips.15
IF CDate$ = “16” THEN Tips.16
IF CDate$ = “17” THEN Tips.17
IF CDate$ = “18” THEN Tips.18
IF CDate$ = “19” THEN Tips.19
IF CDate$ = “20” THEN Tips.20
IF CDate$ = “21” THEN Tips.21
IF CDate$ = “22” THEN Tips.22
IF CDate$ = “23” THEN Tips.23
IF CDate$ = “24” THEN Tips.24
IF CDate$ = “25” THEN Tips.25
IF CDate$ = “26” THEN Tips.26
IF CDate$ = “27” THEN Tips.27
IF CDate$ = “28” THEN Tips.28
IF CDate$ = “29” THEN Tips.29
IF CDate$ = “30” THEN Tips.30
IF CDate$ = “31” THEN Tips.31
SetCursor 13, 1, 7, 0
END SUB

SUB SetCursor (Row, Col, Fore, Back)
LOCATE Row, Col
COLOR Fore, Back
END SUB

SUB Tips.1
TypeChar 8, 15, 0, “Bring supply when you go, but”
TypeChar 9, 15, 0, “bring charity when you die”
END SUB

SUB Tips.10
TypeChar 8, 15, 0, “Think to day and speak tomorrow”
END SUB

SUB Tips.11
TypeChar 8, 15, 0, “Give your smile to everyone, but”
TypeChar 9, 15, 0, “give your love only for one person”
END SUB

SUB Tips.12
TypeChar 8, 15, 0, “Love which begun with high soul flame,”
TypeChar 9, 15, 0, “often would end with cold and frozen”
END SUB

SUB Tips.13
TypeChar 8, 15, 0, “Love is a wheel that crush everyone who follow his movement”
TypeChar 9, 15, 0, “but without its crush we can’t feel how beautiful of life”
END SUB

SUB Tips.14
TypeChar 8, 15, 0, “True love is which only for two persons and”
TypeChar 9, 15, 0, “haven’t the place for third person”
END SUB

SUB Tips.15
TypeChar 8, 15, 0, “Life is not valuable for someone who doesn’t have true friend”
END SUB

SUB Tips.16
TypeChar 8, 15, 0, “When you can’t get your idea on one way,”
TypeChar 9, 15, 0, “get it on another way”
END SUB

SUB Tips.17
TypeChar 8, 15, 0, “Don’t be affraid if you only failed once,”
TypeChar 9, 15, 0, “Edison has failed ten thousand times before”
TypeChar 10, 15, 0, “he succeeded in making an electric lamp”
END SUB

SUB Tips.18
TypeChar 8, 15, 0, “Don’t forget experiences what have gone away”
TypeChar 9, 15, 0, “but use those experiences as leader for the future”
END SUB

SUB Tips.19
TypeChar 8, 15, 0, “A true companion is loving all the time”
TypeChar 9, 15, 0, “and is a brother in difficulty”
END SUB

SUB Tips.2
TypeChar 8, 15, 0, “Don’t so sad because everyone don’t know you”
TypeChar 9, 15, 0, “but try so that you can be know”
END SUB

SUB Tips.20
TypeChar 8, 15, 0, “Don’t buy friends with presents,”
TypeChar 9, 15, 0, “if you stop giving then they’ll stop loving”
END SUB

SUB Tips.21
TypeChar 8, 15, 0, “The good man is the man who is feel shy”
TypeChar 9, 15, 0, “when his words are more than his action”
END SUB

SUB Tips.22
TypeChar 8, 15, 0, “The wise man always think about what is wrong on himself”
TypeChar 9, 15, 0, “and doesn’t like to think about mistake of the others”
END SUB

SUB Tips.23
TypeChar 8, 15, 0, “Take care of your idea well…”
TypeChar 9, 15, 0, “When your idea are lost it’s the same with death”
END SUB

SUB Tips.24
TypeChar 8, 15, 0, “The time can make us very happy, but”
TypeChar 9, 15, 0, “it’s also make us in sorrow and suffering”
END SUB

SUB Tips.25
TypeChar 8, 15, 0, “The secret of every success is always steady”
TypeChar 9, 15, 0, “to catch the opportunity when it appears”
END SUB

SUB Tips.26
TypeChar 8, 15, 0, “Some work that you do, don’t stop before get the product”
END SUB

SUB Tips.27
TypeChar 8, 15, 0, “Good treat for the man who ever annoy for you,”
TypeChar 9, 15, 0, “exactly one day he would appologize for you”
END SUB

SUB Tips.28
TypeChar 8, 15, 0, “Fighting with another makes war, but”
TypeChar 9, 15, 0, “struggling with one’s self bring peace”
END SUB

SUB Tips.29
TypeChar 8, 15, 0, “Don’t feel well be hold by earth so that you get trouble,”
TypeChar 9, 15, 0, “but let the earth in your handself that you can make shake it”
END SUB

SUB Tips.3
TypeChar 8, 15, 0, “Let not your tongue cut your throat”
END SUB

SUB Tips.30
TypeChar 8, 15, 0, “Fight the devil, it would go away from you”
END SUB

SUB Tips.31
TypeChar 8, 15, 0, “Remember… The work you don’t like to do it today”
TypeChar 9, 15, 0, “not sure shall you do it tomorrow”
END SUB

SUB Tips.4
TypeChar 8, 15, 0, “Only with the sufferings of life can teach the people”
TypeChar 9, 15, 0, “for give respect about goodness and the attractive of life”
END SUB

SUB Tips.5
TypeChar 8, 15, 0, “Love is beauty but not every beauty have love”
END SUB

SUB Tips.6
TypeChar 8, 15, 0, “The true love is like a ghost, almost all man speak it”
TypeChar 9, 15, 0, “but only some men ever really discover it”
END SUB

SUB Tips.7
TypeChar 8, 15, 0, “Love is a curious thing, when we catch it tight it would die”
TypeChar 9, 15, 0, “but if we catch it not so tight it would run away”
END SUB

SUB Tips.8
TypeChar 8, 15, 0, “Love make the weak man become strong”
TypeChar 9, 15, 0, “and the strong man become weak”
END SUB

SUB Tips.9
TypeChar 8, 15, 0, “Do for everything, so that we can make possible for that impossible”
END SUB

SUB TypeChar (Row, Fore, Back, Text$)
Col = INT((80 – LEN(Text$)) / 2)
FOR Counter = 1 TO LEN(Text$)
FOR Delay = 1 TO 800
NEXT
LOCATE Row, Col
COLOR Fore, Back
SOUND 8000, .5
PRINT MID$(Text$, Counter, 1);
Col = Col + 1
NEXT
END SUB




Comments are closed.