Guest User

Untitled

a guest
Jan 19th, 2018
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.60 KB | None | 0 0
  1. nomainwin
  2. WindowWidth = 350
  3. WindowHeight =150
  4. UpperLeftX = 10
  5. UpperLeftY = 10
  6. dim fullPath$(20)
  7. 'HourChime$
  8. 'MinChime$
  9. '
  10. 'MinChime$
  11. 'QuarterChime$
  12. 'HalfChime$
  13. 'ThreeQuarterChime$
  14. 'HourChime$
  15.  
  16. ' BackgroundColor$ = "white"
  17. MENU #w, "File", "Exit", [Exit],"start",[Alarm]
  18. MENU #w, "Settings", "settings", [browseForChime],"start",[Alarm]
  19. MENU #w, "Clock Theme", "Grand Father Clock", [GrandTheme],"Kukoo Clock",[KukooTheme],"DigitalWatch",[DigitalWatch],"Custom Teme",[Custom]
  20. MENU #w, "Help", "Instructons", [Instructons], "About", [About]
  21.  
  22.  
  23. radiobutton #w.min, "Silant", [silent], [Wait], 1, 1, 45, 15 '140, 60, 25, 20
  24. radiobutton #w.min, "Minute", [Minute], [Wait], 50, 1, 50, 20
  25. radiobutton #w.Hour, "Hour", [Hour], [Wait], 100,1, 45, 20
  26. radiobutton #w.Default, "Default", [Default], [Wait], 145,1, 50, 20
  27.  
  28. STATICTEXT #w.statict, "24H00 Format : Set Time", 05, 30, 120, 15'05 30 120 15
  29. STATICTEXT #w.statict, "Time now", 150, 30, 50, 15
  30.  
  31. textbox #w.tb1, 10, 60, 100, 30
  32. textbox #w.tb3, 150, 60, 100, 30
  33.  
  34. button #w.button, "Start", [Alarm], LR, 50, 20,50,30'default
  35.  
  36. inter = 2
  37. b$ = "00"
  38. ' C:\Alarm Clock 1.04\Digital Watch
  39. HourChime$ = "C:\Alarm Clock 1.04\Digital Watch\Four.wav"
  40. HourChime$ = SeparateFile$(HourChime$)
  41. MinChime$ = "C:\Alarm Clock 1.04\Digital Watch\One.wav"
  42. ' MinChime$ = SeparateFile$(MinChime$)
  43. AlarmChime$ = "'C:\Alarm Clock 1.04\Digital Watch\One.wav"
  44. AlarmChime$ = SeparateFile$( AlarmChime$)
  45. ' HourChime$ = "\Digital Watch\was intence.wav"
  46. ' STATICTEXT #w.staticText1, "", 10, 05, 500, 45
  47. ' a$ ="Alarm Clock 1.01 By Kevin van Os";chr$(10);"For more info on this pacage and\or others Contant Kevin van Os ";chr$(13);"Tell: 082 713-5259"
  48. ' [Default]
  49.  
  50. inter = 2
  51. b$ = "00"
  52. 'HourChime$ = "Digital Watch2.wav"
  53. open "Alarm Clock 1.05" for window_nf as #w
  54. ' #w.tb1 "24H00"
  55. ' print #w.tb1, "!setfocus"
  56. print #w.Default, "set"
  57. '********************************
  58. inter = 2
  59. b$ = "00"
  60. HourChime$ = "Digital Watch\One.wav"
  61. MinChime$ = "Digital Watch\One.wav"
  62. MinChime3$ = "Digital Watch\One.wav"
  63. '********************************
  64.  
  65. '__________________.
  66. #w "trapclose [quit2]"
  67. #w.tb1 "hh:mm"
  68. #w.tb1 "!selectall"
  69. #w.tb1 "!font arial 15 bold"
  70. #w.tb3 "!font arial 15 bold"
  71. #w.tb3 time$()
  72. ' #w.staticText1, a$
  73.  
  74. [loop1]
  75.  
  76. scan
  77. '****************
  78.  
  79. t$ = time$()
  80. 'threeQuarterHourChime
  81. if right$(t$,5) > "46:00" then threeQuarterHourChime = 0
  82. if right$(t$,2) > "10" then HourChime = 0
  83. if right$(t$,5) > "31:00" then halfHourChime = 0
  84. if right$(t$,2) > "50" then Min = 0
  85. if right$(t$,5) = "15:00" then gosub [quarterChime]'quarter
  86. if right$(t$,5) = "30:00" then gosub [halfHourChime]
  87. if right$(t$,5) = "45:00" then gosub [threeQuarterHourChime]
  88. if right$(t$,inter) = "00" then gosub [MinChime]
  89.  
  90.  
  91. a$ = time$()
  92. if b$ = right$(a$,inter) then
  93. gosub [HourChime]
  94. end if
  95. '****************
  96. [backToTheLoop]'Back To The Loop Of Time
  97. t$ = time$()
  98.  
  99.  
  100. Scan
  101. CallDLL #kernel32, "Sleep",100 As Long, ret As Void '************
  102. a$ = time$() 'update the string to be compared
  103. #w.tb3,a$
  104. if left$(set$,5) = left$(a$,5) then'00:00:00
  105. gosub [cont]
  106. end if
  107. goto [loop1]
  108.  
  109. [Alarm]
  110.  
  111. #w.tb1,"!contents? set$";' set$ = hh$+":"+mm$+":"+sec$ ****************
  112.  
  113. #w.tb1, ""
  114.  
  115.  
  116. hh$ = left$(set$,2)' get the last two charicters fom the number string on the left
  117. mm$ = right$(set$,2)' get the last two charicters fom the number string on the Right
  118. [SlipInFromSnooz]
  119. generic$ = mm$
  120. ms$ = "00"
  121. set$ = hh$+":"+mm$+":";ms$'put all the string bit together
  122. #w.tb1, set$ 'print the set string to textbox 1
  123. '[loop2]
  124. ' if left$(set$,5) = left$(a$,5) then goto [cont]'while set$ is not equil to a$ string LOOP************8
  125. ' Scan
  126. ' CallDLL #kernel32, "Sleep",100 As Long, ret As Void '************
  127. ' a$ = time$() 'update the string to be compared
  128. ' #w.tb3,a$ '***************
  129. goto [loop1]
  130.  
  131. [cont]
  132. playwave AlarmChime2$, sync 'pay wav sound and added mode
  133. confirm "Snoozzzzz";answer$ 'put a notice up so that the user can stop the wav
  134. if answer$ = "yes" then [Snooz] else [Stop]
  135. playwave "" 'end the alarm
  136. #w.tb1 "!selectall"
  137. ' goto [loop1]
  138. return
  139.  
  140.  
  141. [HourChime]'hourlychimebeg
  142. if Phour <> 1 then return
  143. if Phour = 1 and right$(t$,5) = "00:00" then goto [playwav]
  144. [playwav]
  145. scan 'HourChime$
  146. if HourChime = 0 then playwave HourChime$, sync : HourChime = 1
  147. return
  148. [MinChime]
  149. if Pmin = 1 and right$(t$,5) = "00:00"goto [HourChime]
  150. if Phour = 1 then goto [HourChime]
  151. if Pmin = 1 then
  152. if Min = 0 then
  153. playwave MinChime$, sync : Min = 1
  154. end if
  155. end if
  156. return
  157. goto [loop1]
  158. [quarterChime]
  159. playwave QuarterChime$,sync
  160. return
  161. [halfHourChime]
  162. if halfHourChime = 0 then playwave HalfChime$ , sync :halfHourChime = 1
  163. return
  164. [threeQuarterHourChime]
  165. if threeQuarterHourChime = 0 then playwave ThreeQuarterChime$ , sync : threeQuarterHourChime = 1
  166. return
  167.  
  168. [GrandTheme]
  169. MinChime$ = "grand fater clock\HourOne.wav"
  170. QuarterChime$ = "grand fater clock\HourOne.wav"
  171. HalfChime$ ="grand fater clock\HourTwo.wav"
  172. ThreeQuarterChime$ = "grand fater clock\HourThree.wav"
  173. HourChime$ = "grand fater clock\HourFour.wav"
  174.  
  175. goto [loop1]
  176. [DigitalWatch]
  177. MinChime$ ="Digital Watch\One.wav"
  178. QuarterChime$ = "Digital Watch\One.wav"
  179. HalfChime$ = "Digital Watch\Two.wav"
  180. ThreeQuarterChime$ = "Digital Watch\Three.wav"
  181. HourChime$ = "Digital Watch\Two.wav"
  182.  
  183. goto [loop1]
  184.  
  185.  
  186.  
  187.  
  188. scan
  189. [Stop]
  190. playwave ""
  191. [quit]
  192. 'if ch = 1 then close #ch
  193. 'ch = 0
  194. close#w
  195. end
  196.  
  197. [Snooz]
  198. playwave ""
  199.  
  200.  
  201. 'Take the string of the set "30" minuts
  202. 'Convert the string into a numerik value
  203. 'add 10 to 30 that equils 40
  204. 'Convert the numeric value back into a numeric string
  205. Snooze = val(generic$)
  206. Snooze = Snooze + 10
  207. mm$ = str$(Snooze)
  208. goto [SlipInFromSnooz]
  209.  
  210. [About]
  211. 'close #w
  212. button #c.button1, "Close",[AboutClose], LR, 30, 10,50,30
  213. STATICTEXT #c.s, "", 05, 5, 280,120
  214. a$ = "Alarm Clock 1.01 By Kevin van Os";Chr$(13);"For more info about this customizable Software pakage";chr$(13);"And\or others contact Kevin van Os";Chr$(13);"Tell - 082 713-5259";chr$(13);"E - Mail: kevinos@mweb.co.za"
  215. 'StyleBits #c, 0, _WS_SIZEBOX OR _WS_SYSMENU , 0, 0
  216. open "About" for Window_nf as #c
  217.  
  218. #c "trapclose [TrapCloseAbout]"
  219. #c.s, a$
  220. wait
  221. [TrapCloseAbout]
  222. close #w
  223. close #c
  224. end
  225. wait
  226. [quit2]
  227. if view = 1 then close #view2
  228. close #w
  229. end
  230.  
  231. '[ReStart]
  232. 'close#w
  233.  
  234. [Exit]
  235. close #w
  236. end
  237. [AboutClose]
  238. close #c
  239. goto [loop1]
  240. [a]
  241. close #c
  242. wait
  243. [Instructons]
  244. 'close #w
  245. button #d.button1, "Close",[InstructonsClose], LR, 30, 10,50,30
  246. STATICTEXT #d.s, "Instructons", 05, 5, 200, 120
  247. a$ = "Alarm Clock 1.01";chr$(13);" By Kevin van Os";Chr$(13);"1) Type a time you desire to set";chr$(13);"2) Click start button to set Alarm";Chr$(13);"Tell - 082 713-5259"
  248. 'StyleBits #d, 0, _WS_SIZEBOX OR _WS_SYSMENU , 0, 0
  249. open "" for Window_nf as #d
  250. #d.s, a$
  251. wait
  252. [TrapCloseInstructons]
  253. close #w
  254. close #d
  255. end
  256.  
  257. [InstructonsClose]
  258. close #d
  259. goto [loop1]
  260. '********************************************************BROWSE FOR CHIME**********************************************************************************************************
  261. '*************************************************************BROWSE FOR CHIME***************17 SEP 2011*********************************************************************************
  262. [browseForChime]
  263.  
  264. UpperLeftX = 10
  265. UpperLeftY = 10
  266. WindowWidth = 420
  267. WindowHeight = 200'300
  268. setwin = 1
  269.  
  270. ' AlarmChime$ = SeparateFile$( AlarmChime$)
  271. GROUPBOX #ch.ext1, "AlarmChimel", 140, 1, 130, 100 ' 05, 1, 100, 100
  272. GROUPBOX #ch.ext1, "HourChime", 05, 1, 130, 100 ' 170, 1, 150, 100
  273. GROUPBOX #ch.ext1, "MinutCime", 275, 1, 130, 100 ' 170, 1, 150, 100
  274. ' statictext #ch.s1,"HR", 140, 10, 20, 14
  275. ' statictext #ch.s2,"Min", 140,50,19, 15
  276.  
  277.  
  278. 'radiobutton #ch.sil, "S", [silent], [Wait], 140, 70, 25, 10
  279.  
  280. 'radiobutton #ch.min, "", [Minute], [Wait], 140, 60, 25, 20
  281. 'radiobutton #ch.Hour, "", [Hour], [Wait], 140,20, 25, 20
  282. 'radiobutton #ch.OldTheme, "", [OldTheme], [Wait], 140, 90, 25, 20
  283.  
  284. 'statictext #ch.s1, HourChime$, 15, 10, 40, 18
  285. ' statictext #ch.s1,"HOURCHIME", 20, 10, 150, 18
  286. ' statictext #ch.s2,"ALARMCHIME", 150,10, 150, 18
  287.  
  288. statictext #ch.s3,HourChime$, 20, 30, 100, 50
  289. statictext #ch.s4,AlarmChime$, 170,30, 80, 50
  290. statictext #ch.s5,AlarmChime$, 280,30, 80, 50
  291.  
  292.  
  293. button #ch.exit1, "HourChime", [HourChime2], LR, 380, 10,100,25
  294. button #ch.exit, "&OK!", [QuitY], LR, 220,30',150,5
  295. button #ch.exit1, "AlermChime", [AlarmChime2], LR, 250, 0,100,25
  296. button #ch.exit1, "MinutChime", [MinutChim], LR, 100, 10,100,25
  297.  
  298.  
  299. open "Brouse for Chime" for window_nf as #ch
  300. print #ch, "trapclose [QuitZ]"
  301.  
  302. wait
  303. [MinutChim]
  304. filedialog "Chose Chime", "*.wav", MinChime$
  305. MinChime3$ = MinChime$
  306. MinChime3$ = SeparateFile$( MinChime3$)
  307. #ch.s5, MinChime3$
  308. wait
  309. [AlarmChime2]
  310. filedialog "Chose Chime", "*.wav", AlarmChime$
  311. AlarmChime2$ = AlarmChime$
  312. '******************
  313. AlarmChime$ = SeparateFile$( AlarmChime$)
  314. '******************
  315. #ch.s4, AlarmChime$;
  316. wait
  317. [HourChime2]
  318. filedialog "Open text file", "*.wav", HourChime$
  319. '**********************************************************
  320. HourChime$ = SeparateFile$(HourChime$)
  321. #ch.s3, HourChime$;
  322. goto [loop1]
  323.  
  324. '************************************************************
  325. Function SeparateFile$(f$)
  326. fileindex=Len(f$)
  327. filelength=Len(f$)
  328. While Mid$(f$, fileindex,1)<>"\"
  329. scan
  330. fileindex=fileindex-1
  331. Wend
  332. SeparateFile$=Right$(f$,filelength-fileindex)
  333. End Function
  334. '************************************************************
  335.  
  336. wait
  337. [QuitY]
  338. close #ch
  339. ch = 0
  340. goto [loop1]
  341. [QuitZ]
  342. close #ch
  343. goto [loop1]
  344. '********************************************************************************BROWSE FOR CHIME*****************************************************************************************************
  345. '********************************************************************************CONFIGERATION*****************************************************************************************************
  346.  
  347. [setup]
  348.  
  349.  
  350. ' end
  351. goto [loop1]
  352. wait
  353.  
  354.  
  355. [silent]
  356.  
  357. MinChime$ = ""
  358. QuarterChime$ = ""
  359. HalfChime$ = ""
  360. ThreeQuarterChime$ = ""
  361. HourChime$ = ""
  362. silent = 1
  363. inter = 2
  364. b$ = "00"
  365. goto [loop1]
  366. [Minute]
  367. Phour = 0
  368. Pmin = 1
  369. silent = 0
  370. inter = 2
  371. 'MinChime$ = "Digital Watch\One.wav"
  372. 'MinChime$ = "'C:\Alarm Clock 1.04\Digital Watch\One.wav"
  373. b$ = "00"
  374. 'HourChime$ = "chimes.wav"
  375. '#ch.s3 HourChime$
  376. '#ch.s4 ""
  377.  
  378. goto [loop1]
  379.  
  380. [Hour]
  381.  
  382. Phour = 1
  383. Pmin = 0
  384. Min = 0
  385. inter = 5
  386. b$ = "00:00"
  387. goto [loop1]
  388. MinChime$ = ""
  389. 'AlarmChime$ = "Father Clock.wav"
  390. HourChime$ = "Father Clock.wav"
  391. '#ch.s3 HourChime$
  392. '#ch.s4 AlarmChime$
  393. '#ch.s4 ""
  394. goto [loop1]
  395.  
  396. [OldTheme]
  397. AlarmChime$ = ""
  398. HourChime$ = ""
  399. '#ch.s3 HourChime$
  400. '#ch.s4 AlarmChime$
  401. inter = 5
  402. b$ = "00:00"
  403. goto [loop1]
  404. [Default]
  405. Pmin = 1
  406. inter = 2
  407. b$ = "00"
  408. 'HourChime$ = "Digital Watch\One.wav"
  409. 'MinChime$ = "Digital Watch\One.wav"
  410. 'MinChime3$ = "Digital Watch\One.wav"
  411. goto [loop1]
  412.  
  413. '********KukooTheme*******************************
  414. [KukooTheme]
  415.  
  416. MinChime$ = "Kukoo chimes\One.wav"
  417. QuarterChime$ = "Kukoo chimes\One.wav"
  418. HalfChime$ = "Kukoo chimes\Two.wav"
  419. ThreeQuarterChime$ = "Kukoo chimes\Three.wav"
  420. HourChime$ = "Kukoo chimes\Four.wav"
  421.  
  422. 'MinChime$ = "Kukoo chimes\One.wav"
  423. goto [loop1]
  424. [OKcustom]
  425. [OK]'maybe
  426. close #period
  427. goto [loop1]
  428. scan
  429. [Custom]
  430. '****************************************************************************************************************************************
  431. dim hourChime$(100)
  432. dim minChime$(100)
  433. dim AlarmChime$(100)
  434. dim QuarterChime$(100)
  435. dim HalfChime$(100)
  436. dim ThreeQuarter$(100)
  437. nomainwin
  438. WindowWidth = 550
  439. WindowHeight = 300
  440. UpperLeftX=10
  441. UpperLeftY=10
  442. 'HourChime$
  443. 'MinChime$
  444. 'QuarterChime$
  445. 'HalfChime$
  446. 'ThreeQuarterChime$
  447. 'HourChime$
  448.  
  449. ComboboxColor$ = "white"
  450. combobox #custom.combobox1, hourChime$(), [combobox1DoubleClick], 74, 22, 355, 100
  451. combobox #custom.combobox2, minChime$(), [combobox2DoubleClick], 140, 52, 345, 100
  452. combobox #custom.combobox3, AlarmChime$(), [combobox5DoubleClick], 74, 82, 355, 100'74, 82, 355, 100
  453. combobox #custom.combobox4, QuarterChime$(), [combobox3DoubleClick], 145, 110, 345, 100' 145, 117, 345, 100
  454. combobox #custom.combobox5, HalfChime$(), [combobox4DoubleClick], 74,138, 360, 100' 55, 157, 360, 100
  455. combobox #custom.combobox6, ThreeQuarter$(), [combobox11DoubleClick], 145, 168, 350, 100'145, 175, 350, 100
  456.  
  457. button #custom.b1, "Browse1", btnBrowse, UL, 1, 20 'HourChime
  458. button #custom.b2, "Browse2", btnBrowse, UL, 1, 52'MinChime
  459. button #custom.b3, "Browse3", btnBrowse, UL, 1, 82'AlarmChime
  460. button #custom.b4, "Browse4", btnBrowse, UL, 1, 113'ThreeQuarterChime
  461. button #custom.b5, "Browse5", btnBrowse, UL, 1, 143'HalfHour Chime-143
  462. button #custom.b6, "Browse6", btnBrowse , UL, 1, 170' Tree Quarterhime
  463.  
  464. button #custom.b7, ">>>>", [set] , LR, 50, 10' Tree Quarterhime
  465. button #custom.b7, "View Custom Chimes", [viewChimes] , LR, 205, 10
  466.  
  467. ' button #custom.b1, "Browse1", [Browse1], UL, 1, 20 'HourChime
  468. ' button #custom.b2, "Browse2", [Browse2], UL, 1, 52'MinChime
  469. ' button #custom.b3, "Browse3", [Browse3], UL, 1, 82'AlarmChime
  470. ' button #custom.b4, "Browse", [Browse4], UL, 1, 113'ThreeQuarterChime
  471. ' button #custom.b5, "Browse", [Browse5], UL, 1, 143'HalfHour Chime-143
  472. ' button #custom.b6, "Brouse", [Browse6] , LL, 1, 113
  473. ' button #custom.b6, "Browse", [Browse6] , UL, 1, 170' Tree Quarterhime
  474.  
  475.  
  476. statictext #custom.statictext6, "Hour ", 440, 22, 70, 20
  477. statictext #custom.statictext7, "Minut ", 80, 57, 50, 20
  478. statictext #custom.statictext8, "Alarm ", 435, 78, 55, 25
  479. statictext #custom.statictext9, "Quarter ", 80, 118, 50, 20' 80, 122, 50, 20
  480. statictext #custom.statictext10, "Half Hour", 440, 143, 60, 20' 440, 155, 50, 40
  481. statictext #custom.statictext12, "Three Quarter", 80, 166, 50, 40'80, 166, 50, 40
  482.  
  483. '-----End GUI objects code
  484.  
  485. open "Customised Theme" for window_nf as #custom
  486. print #custom, "font ms_sans_serif 10"
  487. print #custom, "trapclose [custom]"
  488. ' filedialog "Open text file", "*.txt", fileName$
  489.  
  490. [main.inputLoop] 'wait here for input event
  491. wait
  492. [custom]
  493. close #custom
  494. goto [loop1]
  495.  
  496.  
  497. [combobox1DoubleClick] 'Perform action for the combobox named 'combobox1'
  498.  
  499. 'Insert your own code here
  500.  
  501. wait
  502.  
  503.  
  504. [combobox2DoubleClick] 'Perform action for the combobox named 'combobox2'
  505.  
  506. 'Insert your own code here
  507.  
  508. wait
  509.  
  510.  
  511. [combobox3DoubleClick] 'Perform action for the combobox named 'combobox3'
  512.  
  513. 'Insert your own code here
  514.  
  515. wait
  516.  
  517.  
  518. [combobox4DoubleClick] 'Perform action for the combobox named 'combobox4'
  519.  
  520. 'Insert your own code here
  521.  
  522. wait
  523.  
  524.  
  525. [combobox5DoubleClick] 'Perform action for the combobox named 'combobox5'
  526.  
  527. 'Insert your own code here
  528.  
  529. wait
  530.  
  531.  
  532. [combobox11DoubleClick] 'Perform action for the combobox named 'combobox11'
  533.  
  534. 'Insert your own code here
  535.  
  536. wait
  537.  
  538. sub btnBrowse handle$' Hear
  539.  
  540. whichBtn = val(right$(handle$,1)) 'get button number from handle
  541. ' print whichBtn
  542. filedialog "Open sound file", "*.wav", fullPath$
  543. fullPath2$ = fullPath$
  544. z = 1
  545. ' name$(z) = fullPath$
  546. z = z + 1
  547. fileName$ = SeparateFile$( fullPath$)
  548. combo$ = "#custom.combobox";whichBtn 'get combo name by number
  549.  
  550. '/////////////////////////////////////////////////////////
  551. ' HourChime$ = hourChime$(1)
  552. ' MinChime$ = minChime$(1)
  553. ' QuarterChime$ = QuarterChime$(1)
  554. ' HalfChime$ = HalfChime$(1)
  555. ' ThreeQuarterChime$ = ThreeQuarter$(1)
  556. '//////////////////////////////////////////////////////////
  557. in = 0
  558.  
  559. i = 1
  560. while in <> 1
  561. scan
  562.  
  563. 'now, the only part different would be array names
  564. select case whichBtn
  565. case 1
  566. if hourChime$(i) = "" then hourChime$(i) = fullPath$ :in = 1 : fullPath$(1) = fullPath$
  567. HourChime$ = hourChime$(i)
  568. case 2
  569. if minChime$(i) = "" then minChime$(i) = fullPath$ :in = 1 : fullPath$(2) = fullPath$
  570. MinChime$ = minChime$(i)
  571. case 3
  572. if AlarmChime$(i) = "" then AlarmChime$(i) = fullPath$ :in = 1 : fullPath$(3) = fullPath$
  573. AlarmChime$ = AlarmChime$(i)
  574. case 4
  575. if QuarterChime$(i) = "" then QuarterChime$(i) = fullPath$ :in = 1 : fullPath$(4) = fullPath$
  576. QuarterChime$ = QuarterChime$(i)
  577. case 5
  578. if HalfChime$(i) = "" then HalfChime$(i) = fullPath$ :in = 1 : fullPath$(5) = fullPath$
  579. HalfChime$ = HalfChime$(i)
  580. case 6
  581. if ThreeQuarter$(i) = "" then ThreeQuarter$(i) = fullPath$ :in = 1 : fullPath$(6) = fullPath$
  582. ThreeQuarterChime$ = ThreeQuarter$(i)
  583.  
  584. case else
  585. print "Sub works for hour and minutes as of now": exit while 'it loops forever without Exit
  586. end select
  587.  
  588. '/////////////////////////////////////////////////////////
  589. ' HourChime$ = hourChime$(1)
  590. ' MinChime$ = minChime$(1)
  591. ' QuarterChime$ = QuarterChime$(1)
  592. ' HalfChime$ = HalfChime$(1)
  593. ' ThreeQuarterChime$ = ThreeQuarter$(1)
  594. '//////////////////////////////////////////////////////////
  595. print #combo$, "reload"
  596. print #combo$, "selectindex ";1 'last added selecte
  597. 'print #combo$, "selectindex ";i-1 'last added selecte
  598. wend
  599.  
  600. end sub
  601.  
  602.  
  603. [Browse1]'HourChime
  604. filedialog "Open text file", "*.wav", dumieHourChime$
  605. '**************
  606. HourChime$ = dumieHourChime$
  607. HourChime$ = SeparateFile$(HourChime$)
  608. '**************
  609. i = 1
  610. while in <> 1
  611.  
  612. scan
  613. if hourChime$(i) = "" then hourChime$(i) = HourChime$ :in = 1
  614. i = i + 1
  615. print #custom.combobox1, "reload"
  616. 'print #custom.combobox2, MinChime$"
  617. 'print #custom.combobox2, "select MinChime$"
  618.  
  619. print #custom.combobox1, "selectindex 1"
  620. 'print #custom.combobox2, "selection? MinChime$"
  621.  
  622.  
  623. wend
  624. wait
  625.  
  626. [Browse2] 'MinChime
  627. filedialog "Open text file", "*.wav", dumieMinChime$
  628. '**************
  629. MinChime$ = dumieMinChime$
  630. ' SeparateFile$(HourChime$)
  631. MinChime$ = SeparateFile$( MinChime$)
  632. '**************
  633. i = 1
  634. in = 0
  635. while in <> 1
  636.  
  637. scan
  638. if minChime$(i) = "" then minChime$(i) = MinChime$ :in = 1
  639. i = i + 1
  640. print #custom.combobox2, "reload"
  641. 'print #custom.combobox2, MinChime$"
  642. 'print #custom.combobox2, "select MinChime$"
  643.  
  644. print #custom.combobox2, "selectindex 1"
  645. 'print #custom.combobox2, "selection? MinChime$"
  646.  
  647.  
  648. wend
  649. wait
  650.  
  651. [Browse3]
  652. filedialog "Open text file", "*.wav", HalfChime$
  653.  
  654. i = 0
  655. while in <> 1
  656. scan
  657. if minChime$(i) = "" then minChime$(i) = QuarterChime$ :in = 1:else if minChime$(i+1) = "" then minChime$(i+1) = QuarterChime$ :in = 1
  658. wend
  659.  
  660. wait
  661.  
  662. [Browse4]
  663. filedialog "Open text file", "*.wav", ThreeQuarterChime$
  664.  
  665. wait
  666.  
  667. [Browse5]
  668. filedialog "Open text file", "*.wav", HourChime$
  669.  
  670. wait
  671.  
  672. [Browse6]
  673. filedialog "Open text file", "*.wav", HourChime$
  674.  
  675.  
  676. wait
  677.  
  678.  
  679. [quit.main] 'End the program
  680. close #custom
  681. end
  682. '**********************************************************
  683. 'FileOnly$ = SeparateFile$(filename$)
  684. wait
  685.  
  686. 'function SeparateFile$(f$)
  687. ' fileindex=Len(f$)
  688. ' filelength=Len(f$)
  689. ' While Mid$(f$, fileindex,1)<>"\"
  690. ' scan
  691. ' fileindex=fileindex-1
  692. ' Wend
  693. ' SeparateFile$=Right$(f$,filelength-fileindex)
  694. 'End Function
  695. scan
  696. [GetFileContence]
  697. scan
  698. [set]'[OK2]
  699. 'AlarmChime$ = AlarmChime$(i)
  700.  
  701. HourChime$ = fullPath$(1)
  702. MinChime$ = fullPath$(2)
  703. AlarmChime$ = fullPath$(3)
  704. QuarterChime$ = fullPath$(4)
  705. HalfChime$ = fullPath$(5)
  706. ThreeQuarterChime$ = fullPath$(6)
  707.  
  708. open "Theme.txt" for output as #x
  709. #x, HourChime$
  710. #x, MinChime$
  711. #x, QuarterChime$
  712. #x, HalfChime$
  713. #x, ThreeQuarterChime$
  714. #x,""
  715. #x,""
  716. '**************************
  717. close #x
  718. close #custom
  719. goto [loop1]
  720. scan
  721. [viewChimes]
  722. '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  723. HourChime$ = fullPath$(1)
  724. MinChime$ = fullPath$(2)
  725. AlarmChime$ = fullPath$(3)
  726. QuarterChime$ = fullPath$(4)
  727. HalfChime$ = fullPath$(5)
  728. ThreeQuarterChime$ = fullPath$(6)
  729. '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  730.  
  731. '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  732. WindowWidth = 285
  733. WindowHeight = 435
  734. UpperLeftX=0
  735. UpperLeftY= 0
  736. ')))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))PART 3))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
  737. '-----Begin GUI objects code
  738.  
  739. TextboxColor$ = "white"
  740. textbox#view2.textbox1, 15, 42, 245, 25
  741. textbox#view2.textbox2, 10, 102, 245, 25
  742. textbox#view2.textbox3, 10, 157, 245, 25
  743. textbox#view2.textbox4, 10, 217, 245, 25
  744. textbox#view2.textbox5, 10, 277, 245, 25
  745. textbox#view2.textbox6, 10, 335, 245, 25
  746.  
  747. statictext#view2.statictext7, "Hour Chime", 90, 15, 70, 20
  748. statictext#view2.statictext8, "Minut Chime", 90, 72, 72, 20
  749. statictext#view2.statictext9, "Alarm Chime", 90, 132, 76, 20
  750. statictext#view2.statictext10, "Quarter Chime", 85, 192, 120, 20
  751. statictext#view2.statictext11, "Half Chime", 95, 252, 100, 20
  752.  
  753. textbox#view2.textbox12, 10, 332, 245, 25
  754.  
  755. statictext#view2.statictext13, "Three Quarter Chime", 65, 310, 150, 20
  756. button#view2.button14,"Accept ",[Accept], UL, 90, 372, 70, 25
  757.  
  758. '-----End GUI objects code
  759.  
  760. open "Veiw Chime" for dialog_nf as#view2
  761. print#view2, "font ms_sans_serif 10"
  762. view = 1
  763. print #view2.textbox1, SeparateFile$(HourChime$)
  764. print #view2.textbox2, SeparateFile$(MinChime$)
  765. print #view2.textbox3, SeparateFile$(AlarmChime$)
  766. print #view2.textbox4, SeparateFile$(QuarterChime$)
  767. print #view2.textbox5, SeparateFile$(HalfChime$)
  768. print #view2.textbox6, SeparateFile$(ThreeQuarterChime$)
  769. '**********************************************************
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778. wait
  779. [Accept]
  780. '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  781. HourChime$ = fullPath$(1)
  782. MinChime$ = fullPath$(2)
  783. AlarmChime$ = fullPath$(3)
  784. QuarterChime$ = fullPath$(4)
  785. HalfChime$ = fullPath$(5)
  786. ThreeQuarterChime$ = fullPath$(6)
  787. '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  788.  
  789. close#veiw
  790. goto [loop1]
Add Comment
Please, Sign In to add comment