Author Topic: _blink on and _blink off not working  (Read 3768 times)

0 Members and 1 Guest are viewing this topic.

Offline badger

  • Forum Regular
  • Posts: 148
    • View Profile
_blink on and _blink off not working
« on: October 23, 2020, 01:38:08 pm »
Hello

I thought this was the correct usage of the _blink command.  Can someone tell me what i am doing wrong here

Thanks in advance
Badger

Code: QB64: [Select]
  1. sprintserrors:
  2. IF se = "" THEN se = "INVALID RESPONSE"
  3. itemp = LEN(se)
  4. itemp1 = 40 - (itemp / 2)
  5. COLOR 16, 7
  6. LOCATE 25, itemp1: _BLINK ON: PRINT se;
  7. idelay = 1.5
  8. CALL Delay(1.5)
  9. iflag2 = 1
  10.  

Offline badger

  • Forum Regular
  • Posts: 148
    • View Profile
Re: _blink on and _blink off not working
« Reply #1 on: October 23, 2020, 02:11:20 pm »
Hello

if you need more info please state what you need.

Badger

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: _blink on and _blink off not working
« Reply #2 on: October 23, 2020, 02:32:09 pm »
Had to change se to string in snippet and correct your use of _DELAY
You were using BLINK correctly just all the other crud... :)
Code: QB64: [Select]
  1. GOSUB sprintserrors
  2. sprintserrors:
  3. IF se$ = "" THEN se$ = "INVALID RESPONSE"
  4. itemp = LEN(se$)
  5. itemp1 = 40 - (itemp / 2)
  6. COLOR 16, 7
  7. LOCATE 25, itemp1
  8. PRINT se$;
  9. 'idelay = 1.5
  10. 'CALL Delay(1.5)
  11. _DELAY 1.5
  12. iflag2 = 1
  13.  
  14.  
  15.  

FellippeHeitor

  • Guest
Re: _blink on and _blink off not working
« Reply #3 on: October 23, 2020, 02:32:22 pm »
In the default SCREEN 0, colors 17-31 blink. With _BLINK OFF they will stop blinking and background colors will become more intense.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: _blink on and _blink off not working
« Reply #4 on: October 23, 2020, 02:40:24 pm »
Hey Fellippe, the code I fixed up seems to be blinking OK with colors as given?

Offline badger

  • Forum Regular
  • Posts: 148
    • View Profile
Re: _blink on and _blink off not working
« Reply #5 on: October 23, 2020, 02:45:03 pm »
Hello

Again this day keeps getting better and better. s is defined as a string to any veriable that stats with s is a string. I have changed the program a bit i will post the whole thing if you run the program just type something in bigger than the prompt space and it will trigger the error that is the problem. I am using $color:32 and have did away with the screen 0.

here is the whole program. again please excuse the use of rem statements.

will need to create a directory in your user directory to be able to run the program or fine the gosub that calls the directory check routings ...

badger

Code: QB64: [Select]
  1. REM ***************************************************************************
  2. REM **** Program Bridal Store *************************************************
  3. REM ***************************************************************************
  4. REM ***************************************************************************
  5. REM **** Author Philip King  **************************************************
  6. REM ***************************************************************************
  7. REM ***************************************************************************
  8. REM ***************************************************************************
  9. REM **** Includes go here *****************************************************
  10. REM ***************************************************************************
  11.  
  12. REM ***************************************************************************
  13.  
  14. REM ***************************************************************************
  15. REM **** the variable ifilenum is an important variable it is the number ******
  16. REM **** that opens the random file. It will only change value by the *********
  17. REM **** main menu choice this is key so please dont change the value *********
  18. REM **** of the variable ifilenum in anyway ***********************************
  19. REM ***************************************************************************
  20.  
  21.  
  22. REM ***************************************************************************
  23. REM **** Sreen statements here ************************************************
  24. REM ***************************************************************************
  25. SCREEN _NEWIMAGE(640, 400, 32)
  26. REM ***************************************************************************
  27.  
  28. REM ***************************************************************************
  29. REM **** defines for quick use data types *************************************
  30. REM ***************************************************************************
  31. REM ***************************************************************************
  32.  
  33. REM ***************************************************************************
  34. REM **** Listing of subs and funtions *****************************************
  35. REM ***************************************************************************
  36.  
  37. REM ***************************************************************************
  38.  
  39. REM ***************************************************************************
  40. REM **** arrays decleared here ************************************************
  41. REM ***************************************************************************
  42. imenu = 4
  43. DIM SHARED smenu(imenu) AS STRING
  44. REM ***************************************************************************
  45.  
  46. REM ***************************************************************************
  47. REM **** arrays set to data here **********************************************
  48. REM ***************************************************************************
  49. smenu(1) = "1) Edit Customer Info": smenu(2) = "3) Edit Inventory Data "
  50. smenu(3) = "2) Edit Sales ": smenu(4) = "4) System Maintenance "
  51. REM ***************************************************************************
  52.  
  53. REM ***************************************************************************
  54. REM **** variables declares go here *******************************************
  55. REM ***************************************************************************
  56. CONST null = ""
  57. DIM SHARED zrecordnum
  58. DIM SHARED lrecordlen
  59. DIM shomedir AS STRING
  60. shomedir = _CWD$
  61. REM ***************************************************************************
  62.  
  63. REM ***************************************************************************
  64. REM **** customer info record type ********************************************
  65. REM ***************************************************************************
  66. TYPE customer
  67.     id AS STRING * 10
  68.     sfirst_name AS STRING * 25
  69.     slast_name AS STRING * 25
  70.     saddress AS STRING * 30
  71.     scity AS STRING * 25
  72.     sstate AS STRING * 2
  73.     szip AS STRING * 5
  74.     sphone AS STRING * 10
  75.     sdesc AS STRING * 10
  76.     sfiller AS STRING * 114
  77. REM ***************************************************************************
  78.  
  79. REM ***************************************************************************
  80. REM **** inventory record type ************************************************
  81. REM ***************************************************************************
  82. TYPE inventory
  83.     id AS STRING * 10
  84.     sdesc AS STRING * 10
  85.     sdate_bought AS STRING * 8
  86.     sdate_sold AS STRING * 8
  87.     scost AS STRING * 15
  88.     sretail AS STRING * 15
  89.     ssize AS STRING * 2
  90.     ssold AS STRING * 1
  91.     squanity AS STRING * 2
  92.     sfiller AS STRING * 57
  93. REM ***************************************************************************
  94.  
  95. REM ***************************************************************************
  96. REM **** system data file record **********************************************
  97. REM ***************************************************************************
  98. TYPE systemdat
  99.     sdata0 AS STRING * 64 '   data path for customer discription files
  100.     sdata1 AS STRING * 64 '   data path for inventory discription files
  101.     sdata2 AS STRING * 64 '   data path for pos discription files
  102.     sdbpath AS STRING * 64 '  data path for database files
  103. REM ***************************************************************************
  104.  
  105. REM ***************************************************************************
  106. REM **** point of sale type ***************************************************
  107. REM ***************************************************************************
  108. TYPE sposlposid
  109.     sposid AS STRING * 10
  110. REM ***************************************************************************
  111. DIM SHARED scustinforec AS customer
  112. DIM SHARED systemrec AS systemdat
  113. DIM SHARED sinventoryrec AS inventory
  114. linventorylen = LEN(sinventoryrec)
  115. lcustreclen = LEN(scustinforec)
  116. lsystemreclen = LEN(systemrec)
  117. REM ***************************************************************************
  118.  
  119. REM ***************************************************************************
  120. REM **** metadata commands ****************************************************
  121. REM ***************************************************************************
  122. $VERSIONINFO:CompanyName=Joyces Bridal
  123. $VERSIONINFO:ProductName=Joyce Bridal
  124. $VERSIONINFO:ProductVersion=1.0
  125. $VERSIONINFO:LegalCopyright=10/8/2020
  126. '$VERSIONINFO:
  127. REM ***************************************************************************
  128.  
  129. GOSUB dircheck
  130. REM ***************************************************************************
  131.  
  132. REM ***************************************************************************
  133. REM **** opening screen *******************************************************
  134. REM ***************************************************************************
  135. 'SCREEN 12
  136. 'DIM irow AS INTEGER, icnt AS INTEGER, icstart AS SINGLE, icend AS SINGLE
  137. 'DIM ixrot AS INTEGER, iyrot AS INTEGER, iscale AS INTEGER
  138. '_FULLSCREEN 'full screen optional
  139. 'icstart = 0: icend = 8 * ATN(1)
  140. 'ixrot = 6: iyrot = 60: iscale = 4
  141. 'irow = 1
  142. 'CIRCLE (320, 240), 15, 9: PAINT STEP(0, 0), 9
  143. 'DO
  144. '    FOR i = icstart TO icend STEP .04
  145. 'x = 300 + (iscale * 40 - (irow * ixrot)) * COS(i)
  146. 'y = 200 + (iscale * 40 - (irow * iyrot)) * SIN(i)
  147. 'icnt = icnt + 1
  148. 'COLOR 7: _PRINTSTRING (x, y), "Joyce's Bridal", 0 'display
  149. '        IF icnt = LEN(text$) * 8 THEN icnt = 0: EXIT DO
  150. '_DISPLAY
  151. 'COLOR 0: _PRINTSTRING (x, y), "Joyce's Bridal", 0 'erase
  152. ' _DELAY 0.06
  153. '    NEXT
  154. 'LOOP UNTIL INKEY$ = CHR$(27) 'escape key exit
  155. 'COLOR 15
  156. 'REM ***************************************************************************
  157.  
  158. REM ***************************************************************************
  159. REM **** go to main program start *********************************************
  160. REM ***************************************************************************
  161. GOTO main
  162. REM ***************************************************************************
  163.  
  164. REM ***************************************************************************
  165. REM **** main menu loop *******************************************************
  166. REM ***************************************************************************
  167. menuloop:
  168. GOSUB systemheader
  169. GOSUB printmain
  170. GOSUB mainmenuchoice
  171. IF sr = "" OR sr = CHR$(13) THEN GOTO menuloop
  172. IF sr = "X" THEN END
  173. IF sr = "1" THEN
  174.     CLS
  175.     GOSUB scustinforec_null
  176.     sunit = "Customer Information Maintenance"
  177.     GOSUB systemheader
  178.     GOSUB s0
  179. IF sr = "3" THEN
  180.     CLS
  181.     GOSUB inventoryrec_null
  182.     sunit = "Inventory Information Maintenance"
  183.     GOSUB systemheader
  184.     GOSUB inv0
  185.  
  186. IF sr = "4" THEN
  187.     GOSUB systemdat_null
  188.     sunit = "System Information Maintenance"
  189.     GOSUB systemheader
  190.     GOSUB sys0
  191. REM ***************************************************************************
  192.  
  193. REM ***************************************************************************
  194. REM **** fix computer svc to show no [] in print ******************************
  195. REM ***************************************************************************
  196. svcfix:
  197. svc = _OS$
  198. itemp = LEN(svc)
  199. FOR ix = 1 TO itemp
  200.     IF MID$(svc, ix, 1) = "[" THEN
  201.         MID$(svc, ix, 1) = " "
  202.     END IF
  203.     IF MID$(svc, ix, 1) = "]" THEN
  204.         MID$(svc, ix, 1) = " "
  205.     END IF
  206. NEXT ix
  207. stemp = LTRIM$(LEFT$(svc, 2)) + LCASE$(MID$(svc, 3, 7)) + LTRIM$(MID$(svc, 9, 4)) + " " + MID$(svc, 13, 1)
  208. stemp = stemp + RTRIM$(LCASE$(RIGHT$(svc, 3)))
  209. svc = stemp
  210. REM ***************************************************************************
  211.  
  212. REM ***************************************************************************
  213. REM **** Sytem Header *********************************************************
  214. REM ***************************************************************************
  215. systemheader:
  216. COLOR White, Blue
  217. LOCATE 1, 1: PRINT CHR$(201): LOCATE 1, 80: PRINT CHR$(187)
  218. LOCATE 1, 2: PRINT STRING$(78, 205):
  219. FOR ix = 2 TO 7
  220.     LOCATE ix, 1: PRINT CHR$(186)
  221.     LOCATE ix, 80: PRINT CHR$(186)
  222. NEXT ix
  223. LOCATE 7, 2: PRINT STRING$(78, 205)
  224. LOCATE 7, 1: PRINT CHR$(200): LOCATE 7, 80: PRINT CHR$(188)
  225. LOCATE 4, 30: PRINT "Main System Menu"
  226. LOCATE 4, 63: PRINT "Date ": LOCATE 4, 68: PRINT DATE$
  227. GOSUB svcfix
  228. LOCATE 4, 4: PRINT svc
  229. iten = LEN(sunit)
  230. LOCATE 6, (40 - (iten \ 2)): PRINT sunit
  231.  
  232. REM ***************************************************************************
  233.  
  234. REM ***************************************************************************
  235. REM **** printes in system erros **********************************************
  236. REM ***************************************************************************
  237. sprintserrors:
  238.  
  239. IF se = "" THEN se = "INVALID RESPONSE"
  240. itemp = LEN(se)
  241. itemp1 = 40 - (itemp / 2)
  242. COLOR Yellow, Black
  243. LOCATE 25, itemp1: _BLINK ON: PRINT se;
  244. CALL Delay(1.5)
  245. iflag2 = 1
  246. COLOR White, Blue
  247. REM ***************************************************************************
  248.  
  249. REM ***************************************************************************
  250. REM **** numeric input sub ****************************************************
  251. REM ***************************************************************************
  252. snumeric:
  253. ftemp = VAL(sr)
  254. IF ftemp < ilow OR ftemp > ihigh THEN
  255.     se = "INPUT OUT OF BOUNDS"
  256.     GOSUB sprintserrors
  257. REM ***************************************************************************
  258.  
  259. REM ***************************************************************************
  260. REM **** alpha input sub ******************************************************
  261. REM ***************************************************************************
  262. salphainput:
  263. iflag2 = 0
  264. ilength1 = LEN(sr)
  265. ilength2 = LEN(saction) + 2
  266. LOCATE 23, 1: PRINT saction; '               prints action menu
  267. LOCATE 23, ilength2 '                        set prompt one space after action menu print
  268. COLOR Yellow, Black: PRINT SPC(ib); '        changes color and prints ib spaces to screen for input lenght
  269. LOCATE 23, ilength2 '                        sets curser at the begining of input space from previouse line
  270. LINE INPUT sr: sr = UCASE$(sr) '             inputs data from user changes it to upper case
  271. IF LEN(sr) > ib THEN
  272.     se = "INVALID INPUT LENGTH"
  273.     GOSUB sprintserrors
  274.     sr = ""
  275.     iflag2 = 1
  276.     SELECT CASE ifilenum
  277.         CASE 0: GOSUB systemheader
  278.             GOSUB printmain
  279.         CASE 1: GOSUB systemheader
  280.             GOSUB s0
  281.         CASE 3: GOSUB systemheader
  282.             GOSUB inv1
  283.     END SELECT
  284.     GOTO salphainput
  285. IF sr = "X" AND iflag1 = 1 THEN iflag1 = 0
  286. IF iflag1 = 1 AND VAL(sr) < ilow AND VAL(sr) > ihigh THEN GOSUB snumeric
  287. COLOR White, Blue
  288. REM ***************************************************************************
  289.  
  290. REM ***************************************************************************
  291. REM **** main menu to the screen **********************************************
  292. REM ***************************************************************************
  293. printmain:
  294. ifilenum = 0
  295. COLOR White, Blue
  296. FOR ix = 11 TO imenu
  297.     READ smenu(ix): LOCATE ix, 20: PRINT smenu(ix)
  298. NEXT ix
  299. LOCATE 11, 15: PRINT smenu(1)
  300. LOCATE 11, 40: PRINT smenu(2)
  301. LOCATE 13, 15: PRINT smenu(3)
  302. LOCATE 13, 40: PRINT smenu(4)
  303. REM ***************************************************************************
  304.  
  305. REM ***************************************************************************
  306. REM **** menu prompts start here **********************************************
  307. REM ***************************************************************************
  308. mainmenuchoice:
  309. ib = 1
  310. ihigh = 99
  311. ilow = 1
  312. saction = "Choose Menu Option or X to Quit "
  313. GOSUB salphainput
  314. REM ***************************************************************************
  315.  
  316. REM ***************************************************************************
  317. REM **** clean up the prompt area *********************************************
  318. REM ***************************************************************************
  319. clearprompt:
  320. LOCATE 23, 1: PRINT STRING$(79, 32)
  321. REM ***************************************************************************
  322.  
  323. REM ***************************************************************************
  324. REM **** set custinforrec variables to zero or null ***************************
  325. REM ***************************************************************************
  326. scustinforec_null:
  327. scustinforec.id = null
  328. scustinforec.sfirst_name = null
  329. scustinforec.slast_name = null
  330. scustinforec.saddress = null
  331. scustinforec.scity = null
  332. scustinforec.sstate = null
  333. scustinforec.szip = null
  334. scustinforec.sphone = null
  335. REM ***************************************************************************
  336.  
  337. REM ***************************************************************************
  338. REM **** set inventoryrec variables to zero or null ***************************
  339. REM ***************************************************************************
  340. inventoryrec_null:
  341. sinventory.id = null
  342. sinventory.sdesc = null
  343. sinventory.sdate_bought = null
  344. sinventory.sdate_sold = null
  345. sinventory.scost = null
  346. sinventory.fretail = null
  347. sinventory.ssize = null
  348. sinventory.ssold = null
  349. REM ***************************************************************************
  350. REM **** set systemrec variagles to zero or null*******************************
  351. REM ***************************************************************************
  352. systemdat_null:
  353. systemdat.sspath = null
  354. systemdat.sdata1 = null
  355. systemdat.sdata2 = null
  356. systemdat.sdata3 = null
  357. REM ***************************************************************************
  358.  
  359. REM ***************************************************************************
  360. REM **** opens random files ***************************************************
  361. REM ***************************************************************************
  362. randomfiles:
  363. sdbpath = shomedir + "\data\db\"
  364. OPEN sdbpath + "jbridal.db" FOR RANDOM AS #1 LEN = lcustreclen
  365. OPEN sdbpath + "system.db" FOR RANDOM AS #4 LEN = lsystemreclen
  366. OPEN sdbpath + "inventory.db" FOR RANDOM AS #3 LEN = linventorylen
  367. zsystemrecnum = LOF(4) / lsystemreclen
  368. REM ***************************************************************************
  369.  
  370. REM ***************************************************************************
  371. REM **** inserts record into random file **************************************
  372. REM ***************************************************************************
  373. insertrec:
  374. SELECT CASE ifilenum
  375.     CASE 1
  376.         PUT #1, zcustrecnum, scustinforec
  377.     CASE 3
  378.  
  379.         PUT #3, zinventorynum, sinventoryrec
  380. REM ***************************************************************************
  381.  
  382. REM ***************************************************************************
  383. REM **** get last file index for indexing *************************************
  384. REM ***************************************************************************
  385.  
  386. autoindex:
  387. zinventorynum = 0
  388. SELECT CASE ifilenum
  389.     CASE 1:
  390.         zcustrecnum = LOF(1) / lcustreclen
  391.         zcustrecnum = zcustrecnum + 1
  392.         sindex = LTRIM$(STR$(zcustrecnum))
  393.         IF LEN(sindex) < 9 THEN
  394.             sindex = STRING$(9 - LEN(sindex), 48) + sindex
  395.             scustinforec.id = sindex
  396.         END IF
  397.     CASE 3:
  398.         zinventorynum = LOF(3) / linventorylen
  399.         zinventorynum = zinventorynum + 1
  400.         sindex = LTRIM$(STR$(zinventorynum))
  401.         IF LEN(sindex) < 9 THEN
  402.             sindex = STRING$(9 - LEN(sindex), 48) + sindex
  403.             sinventoryrec.id = sindex
  404.  
  405.         END IF
  406.  
  407.  
  408. REM ***************************************************************************
  409.  
  410. REM ***************************************************************************
  411. REM **** shell for notepad for description files by inventory number **********
  412. REM ***************************************************************************
  413. descinput:
  414. sdbtemp = LTRIM$(RTRIM$(sdata)) + LTRIM$(RTRIM$(sdesc)) + ".txt"
  415. ifileexists = _FILEEXISTS(sdbtemp)
  416. IF ifileexists = -1 THEN
  417.     SHELL "wordpad " + CHR$(34) + sdbtemp + CHR$(34)
  418.     OPEN sdbtemp FOR OUTPUT AS #6
  419.     PRINT #6, "Type in your stuff. Save the file and exit."
  420.     CLOSE #6
  421.     SHELL "wordpad " + CHR$(34) + sdbtemp + CHR$(34)
  422. REM ***************************************************************************
  423.  
  424. REM ***************************************************************************
  425. REM **** main modual **********************************************************
  426. REM ***************************************************************************
  427. main:
  428. GOSUB randomfiles
  429. 'SCREEN _NEWIMAGE(640, 400, 32)
  430. '$COLOR:32
  431. COLOR LightCyan, MidnightBlue
  432. iflag2 = 0
  433. iflag3 = 0
  434. REM ***************************************************************************
  435. mainloop:
  436. GOSUB menuloop:
  437.     CASE "1":
  438.         sdata = shomedir + "\data\custdesc\"
  439.         ifilenum = 1
  440.         GOSUB scustinforec_null
  441.         GOSUB autoindex
  442.         GOSUB s1
  443.         GOTO mainloop
  444.     CASE "2"
  445.         sdata = shomedir + "\data\posdesc\"
  446.         'IF sr = "2" THEN
  447.         'ifilenum = 2
  448.         'GOSUB inventoryrec_null
  449.         'GOSUB inv1
  450.         'GOTO mainloop
  451.         'END IF
  452.  
  453.     CASE "3":
  454.         sdata = shomedir + "\data\invdesc\"
  455.         ifilenum = 3
  456.         GOSUB inventoryrec_null
  457.         GOSUB autoindex
  458.         sinventoryrec.scost = "0.00"
  459.         sinventoryrec.sretail = "0.00"
  460.         GOSUB inv1
  461.         GOTO mainloop
  462.  
  463.     CASE "4":
  464.         'sdb =  shomedir + "\data\custdesc"
  465.         'ifilenum = 4
  466.         ' GOSUB systemdat_null
  467.         ' GOSUB sys1
  468.         ' GOTO mainloop
  469.  
  470. REM ***************************************************************************
  471.  
  472. REM ***************************************************************************
  473. REM **** check for statup directories *****************************************
  474. REM ***************************************************************************
  475. dircheck:
  476.     CASE -1:
  477.         GOTO dirchk1
  478.     CASE 0:
  479.         BEEP
  480.         CLS
  481.         LOCATE 12, 27
  482.         PRINT "Home Director Does not Exists"
  483.         LOCATE 13, 23: PRINT "Please Create Jbridal in Your Home dir"
  484.         LOCATE 14, 30: PRINT "And Rerun The program"
  485.         LOCATE 16, 32: PRINT "Enter to continue"
  486.         LINE INPUT st
  487.         CLOSE
  488.         END
  489.  
  490. dirchk1:
  491.  
  492. iflag = _DIREXISTS(shomedir + "\data")
  493. IF iflag = 0 THEN MKDIR shomedir + "\data"
  494.  
  495. iflag = _DIREXISTS(shomedir + "\data\db")
  496. IF iflag = 0 THEN MKDIR shomedir + "\data\db"
  497.  
  498. iflag = _DIREXISTS(shomedir + "\data\custdesc")
  499. IF iflag = 0 THEN MKDIR shomedir + "\data\custdesc"
  500.  
  501. iflag = _DIREXISTS(shomedir + "\data\invdesc")
  502. IF iflag = 0 THEN MKDIR shomedir + "\data\invdesc"
  503.  
  504. iflag = _DIREXISTS(shomedir + "\data\posdesc")
  505. IF iflag = 0 THEN MKDIR shomedir + "\data\posdesc"
  506. REM ***************************************************************************
  507. REM ***************************************************************************
  508. REM **** system utilities data entry ******************************************
  509. REM ***************************************************************************
  510. sys0:
  511. LOCATE 10, 1: PRINT "Customer Discription File Path  ";: PRINT systemdat.sdata0 = _CWD$
  512. LOCATE 11, 1: PRINT "Inventory Discription File Path ";: PRINT systemdat.sdata1
  513. LOCATE 12, 1: PRINT "Pos Discription File Path       ";: PRINT systemdat.sdata2
  514. LOCATE 13, 1: PRINT "Enter Path For Databases        ";: PRINT systemdat.sdbpath
  515. REM ***************************************************************************
  516. sys1:
  517. saction = "Customer Disc File Path "
  518. ib = 64
  519. ilow = 1
  520. ihigh = 1
  521. iflag1 = 0
  522. GOSUB clearprompt
  523. GOSUB salphainput
  524. IF sr = "" THEN GOTO sys1
  525. IF sr = CHR$(88) THEN RETURN 'X
  526. systemdat.sdata0 = sr
  527. GOSUB sys0
  528. GOTO sys2
  529. REM ***************************************************************************
  530.  
  531. sys2:
  532. saction = "Inventory Disc File Path "
  533. ib = 64
  534. ilow = 1
  535. ihigh = 1
  536. iflag1 = 0
  537. GOSUB clearprompt
  538. GOSUB salphainput
  539. IF sr = "" THEN GOTO sys2
  540. IF sr = CHR$(88) THEN RETURN 'X
  541. systemdat.sdata1 = sr
  542. GOSUB sys0
  543. GOTO sys2
  544. REM ***************************************************************************
  545. sys3:
  546. saction = "POS Disc File Path "
  547. ib = 64
  548. ilow = 1
  549. ihigh = 1
  550. iflag1 = 0
  551. GOSUB clearprompt
  552. GOSUB salphainput
  553. IF sr = "" THEN GOTO sys3
  554. IF sr = CHR$(88) THEN RETURN 'X
  555. systemdat.sdata2 = sr
  556. GOSUB sys0
  557. GOTO sys4
  558. REM ***************************************************************************
  559. sys4:
  560. saction = "Enter Database File Path "
  561. ib = 64
  562. ilow = 1
  563. ihigh = 1
  564. iflag1 = 0
  565. GOSUB clearprompt
  566. GOSUB salphainput
  567. IF sr = "" THEN GOTO sys3
  568. IF sr = CHR$(88) THEN RETURN 'X
  569. systemdat.sdbpath = sr
  570. GOSUB sys0
  571. GOTO sys4
  572. REM ***************************************************************************
  573.  
  574. REM ***************************************************************************
  575. REM ***************************************************************************
  576. REM **** inventory input modual ***********************************************
  577. REM ***************************************************************************
  578. inv0:
  579. LOCATE 10, 1: PRINT "Inventory Number         ";: PRINT sinventoryrec.id
  580. LOCATE 11, 1: PRINT "Description File Name    ";: PRINT sinventoryrec.sdesc
  581. LOCATE 12, 1: PRINT "Date Purchased           ";
  582. PRINT LEFT$(sinventoryrec.sdate_bought, 2) + "/";
  583. PRINT MID$(sinventoryrec.sdate_bought, 3, 2) + "/";
  584. PRINT RIGHT$(sinventoryrec.sdate_bought, 4)
  585. LOCATE 13, 1: PRINT "Date Sold                ";
  586. PRINT LEFT$(sinventoryrec.sdate_sold, 2) + "/";
  587. PRINT MID$(sinventoryrec.sdate_sold, 3, 2) + "/";
  588. PRINT RIGHT$(sinventoryrec.sdate_sold, 4)
  589.  
  590. LOCATE 14, 1: PRINT "Coste of Item            ";: PRINT sinventoryrec.scost
  591. LOCATE 15, 1: PRINT "Retail Price             ";: PRINT sinventoryrec.sretail
  592. LOCATE 16, 1: PRINT "Size Of Item             ";: PRINT sinventoryrec.ssize
  593. LOCATE 17, 1: PRINT "Remove for Inventory Y/N ";: PRINT sinventoryrec.ssold
  594. LOCATE 18, 1: PRINT "Enter Quanity of Item    ";: PRINT sinventoryrec.squanity
  595. REM ***************************************************************************
  596. inv1:
  597. GOSUB inv0
  598. GOTO inv2
  599. REM ***************************************************************************
  600. inv2:
  601. saction = "Enter D for Default, Type Name, X to Exit - To Backup "
  602. ib = 8
  603. ilow = 1
  604. ihigh = 999999999
  605. iflag1 = 0
  606. GOSUB clearprompt
  607. GOSUB salphainput
  608.     CASE CHR$(88): RETURN 'X
  609.         'CASE CHR$(45): GOTO inv2 '-
  610.     CASE "":
  611.         sinventoryrec.sdesc = sinventoryrec.id
  612.         sdesc = sinventoryrec.id
  613.         GOSUB descinput
  614.         GOSUB inv0
  615.         GOTO inv3
  616.  
  617.     CASE CHR$(68): 'D for using the sinventoryrec.id as the file name
  618.         sinventoryrec.sdesc = sinventoryrec.id
  619.         sdesc = sinventoryrec.id
  620.         GOSUB descinput
  621.         GOSUB inv0
  622.         GOTO inv3
  623.     CASE ELSE
  624.         sinventoryrec.sdesc = sr
  625.         sdesc = sr
  626.         GOSUB descinput
  627.         GOSUB inv0
  628.         GOTO inv3
  629. REM ***************************************************************************
  630. inv3:
  631. saction = "Enter Date Bought X to Exit - To Backup "
  632. ib = 8
  633. ilow = 1
  634. ihigh = 999999999
  635. iflag1 = 0
  636. GOSUB clearprompt
  637. GOSUB salphainput
  638.     CASE CHR$(88): RETURN 'X
  639.     CASE CHR$(45): GOTO inv2 '-
  640.     CASE "": GOTO inv4 ' key or ""
  641.     CASE ELSE
  642.         sinventoryrec.sdate_bought = sr
  643.         GOSUB inv0
  644.         GOTO inv4
  645.  
  646. REM ***************************************************************************
  647. inv4:
  648. saction = "Enter Date Sold X to Exit - To Backup "
  649. ib = 8
  650. ilow = 1
  651. ihigh = 999999999
  652. iflag1 = 0
  653. GOSUB clearprompt
  654. GOSUB salphainput
  655.     CASE CHR$(88): RETURN 'X
  656.     CASE CHR$(45): GOTO inv2 '-
  657.     CASE "": GOTO inv5 ' ""
  658.     CASE ELSE
  659.         GOSUB inventoryrec_null
  660.         sinventoryrec.sdate_sold = sr
  661.         GOSUB inv0
  662.         GOTO inv5
  663.  
  664. REM ***************************************************************************
  665. inv5:
  666. saction = "Enter Cost X to Exit - To Backup "
  667. ib = 15
  668. ilow = 1
  669. ihigh = 999999999
  670. iflag1 = 0
  671.  
  672. GOSUB clearprompt
  673. GOSUB salphainput
  674.     CASE CHR$(88): RETURN 'X
  675.     CASE CHR$(45): GOTO inv4 '-
  676.     CASE "": GOTO inv6 '  ""
  677.     CASE ELSE
  678.         GOSUB inventoryrec_null
  679.         sinventoryrec.scost = sr
  680.         GOSUB inv0
  681.         GOTO inv6
  682. REM ***************************************************************************
  683. inv6:
  684. saction = "Enter Retail Price X to Exit - To Backup "
  685. ib = 15
  686. ilow = 1
  687. ihigh = 999999999
  688. iflag1 = 0
  689. GOSUB clearprompt
  690. GOSUB salphainput
  691.     CASE CHR$(88): RETURN 'X
  692.     CASE CHR$(45): GOTO inv5 '-
  693.     CASE "": GOTO inv7 '  ""
  694.     CASE ELSE
  695.         GOSUB inventoryrec_null
  696.         sinventoryrec.sretail = sr
  697.         GOSUB inv0
  698.         GOTO inv7
  699.  
  700. REM ***************************************************************************
  701. inv7:
  702. saction = "Enter Dress Size X to Exit - To Backup "
  703. ib = 2
  704. ilow = 1
  705. ihigh = 999999999
  706. iflag1 = 0
  707. GOSUB clearprompt
  708. GOSUB salphainput
  709.     CASE CHR$(88): RETURN 'X
  710.     CASE CHR$(45): GOTO inv6 '-
  711.     CASE "": GOTO inv8 ' ""
  712.     CASE ELSE
  713.         GOSUB inventoryrec_null
  714.         sinventoryrec.ssize = sr
  715.         GOSUB inv0
  716.         GOTO inv8
  717. REM ***************************************************************************
  718. inv8:
  719. saction = "Did Dress Sale Y/N X to Exit - To Backup "
  720. ib = 1
  721. ilow = 1
  722. ihigh = 999999999
  723. iflag1 = 0
  724. GOSUB clearprompt
  725. GOSUB salphainput
  726.     CASE CHR$(88): RETURN 'X
  727.     CASE CHR$(45): GOTO inv7 '-
  728.     CASE "": GOTO inv8
  729.     CASE ELSE
  730.         GOSUB inventoryrec_null
  731.         sinventoryrec.ssold = sr
  732.         GOSUB inv0
  733.         GOTO inv9
  734. REM ***************************************************************************
  735. inv9:
  736. saction = "Enter Quanity of Inventory X to Exit - To Backup "
  737. ib = 4
  738. ilow = 1
  739. ihigh = 999999999
  740. iflag1 = 0
  741. GOSUB clearprompt
  742. GOSUB salphainput
  743.     CASE CHR$(88): RETURN 'X
  744.     CASE CHR$(45): GOTO inv8 '-
  745.     CASE "": GOTO puttorecord ' ""
  746.     CASE ELSE
  747.         GOSUB inventoryrec_null
  748.         sinventoryrec.squanity = sr
  749.         GOSUB inv0
  750.         GOTO puttorecord
  751. REM ***************************************************************************
  752. REM ***************************************************************************
  753. REM ***************************************************************************
  754. REM **** customer input modual ************************************************
  755. REM ***************************************************************************
  756. s0:
  757. LOCATE 10, 1: PRINT "Customer ID           ";: PRINT scustinforec.id
  758. LOCATE 11, 1: PRINT "Customer First Name   ";: PRINT scustinforec.sfirst_name
  759. LOCATE 12, 1: PRINT "customer Last Name    ";: PRINT scustinforec.slast_name
  760. LOCATE 13, 1: PRINT "Customer Address      ";: PRINT scustinforec.saddress
  761. LOCATE 14, 1: PRINT "Customer City         ";: PRINT scustinforec.scity
  762. LOCATE 15, 1: PRINT "customer State        ";: PRINT scustinforec.sstate
  763. LOCATE 16, 1: PRINT "customer Zip          ";: PRINT scustinforec.szip
  764. LOCATE 17, 1: PRINT "Customer Phone Number ";
  765. PRINT "(" + LEFT$(scustinforec.sphone, 3) + ")-"; MID$(scustinforec.sphone, 4, 3) + "-"; RIGHT$(scustinforec.sphone, 4)
  766. LOCATE 18, 1: PRINT "Description File Name ";: PRINT scustinforec.sdesc
  767. REM ***************************************************************************
  768.  
  769. s1:
  770. scustinforec.sdesc = scustinforec.id
  771. GOTO s2
  772. REM ***************************************************************************
  773.  
  774. s2:
  775. saction = "Enter First Name X to Exit - To Backup "
  776. ib = 25
  777. ilow = 99
  778. ihigh = 99
  779. iflag1 = 0
  780. GOSUB clearprompt
  781. GOSUB salphainput
  782.     CASE "": GOTO s4
  783.     CASE CHR$(88): RETURN 'X
  784.     CASE CHR$(45): GOTO s2 '-
  785.     CASE ELSE
  786.         scustinforec.sfirst_name = sr
  787.         GOSUB s0
  788.         GOTO s3
  789.  
  790.  
  791.  
  792. REM ***************************************************************************
  793. s3:
  794. saction = "Enter Last Name X to Exit - To Back up "
  795. ib = 25
  796. ilow = 99
  797. ihigh = 99
  798. iflag1 = 0
  799. GOSUB clearprompt
  800. GOSUB salphainput
  801.     CASE "": GOTO s4
  802.     CASE CHR$(88): RETURN 'X
  803.     CASE CHR$(45): GOTO s2 '-
  804.     CASE ELSE
  805.         scustinforec.slast_name = sr
  806.         GOSUB s0
  807.         GOTO s4
  808. REM ***************************************************************************
  809.  
  810. s4:
  811. saction = "Enter Address X to Exit - To Back up "
  812. ib = 30
  813. ilow = 99
  814. ihigh = 99
  815. iflag1 = 0
  816. GOSUB clearprompt
  817. GOSUB salphainput
  818.     CASE "": GOTO s5
  819.     CASE CHR$(88): RETURN 'X
  820.     CASE CHR$(45): GOTO s3 '-
  821.     CASE ELSE
  822.         scustinforec.saddress = sr
  823.         GOSUB s0
  824.         GOTO s5
  825. REM ***************************************************************************
  826.  
  827. s5:
  828. saction = "Enter City Name X to Exit - To Back up "
  829. ib = 25
  830. ilow = 99
  831. ihigh = 99
  832. iflag1 = 0
  833. GOSUB clearprompt
  834. GOSUB salphainput
  835.     CASE "": GOTO s6
  836.     CASE CHR$(88): RETURN 'X
  837.     CASE CHR$(45): GOTO s4 '-
  838.     CASE ELSE
  839.         scustinforec.scity = sr
  840.         GOSUB s0
  841.         GOTO s6
  842. REM ***************************************************************************
  843. s6:
  844. saction = "Enter State X to Exit - To Back up "
  845. ib = 2
  846. ilow = 99
  847. ihigh = 99
  848. iflag1 = 0
  849. GOSUB clearprompt
  850. GOSUB salphainput
  851.     CASE "": GOTO s7
  852.     CASE CHR$(88): RETURN 'X
  853.     CASE CHR$(45): GOTO s5 '-
  854.     CASE ELSE
  855.         scustinforec.sstate = sr
  856.         GOSUB s0
  857.         GOTO s7
  858. REM ***************************************************************************
  859.  
  860. s7:
  861. saction = "Enter Zip Code Name X to Exit - To Back up "
  862. ib = 5
  863. ilow = 99
  864. ihigh = 99
  865. iflag1 = 0
  866. GOSUB clearprompt
  867. GOSUB salphainput
  868.     CASE "": GOTO s8
  869.     CASE CHR$(88): RETURN 'X
  870.     CASE CHR$(45): GOTO s6 '-
  871.     CASE ELSE
  872.         scustinforec.szip = sr
  873.         GOSUB s0
  874.         GOTO s8
  875. REM ***************************************************************************
  876. s8:
  877. saction = "Enter Phone Number X to Exit - To Back up "
  878. ib = 10
  879. ilow = 99
  880. ihigh = 99
  881. iflag1 = 0
  882. GOSUB clearprompt
  883. GOSUB salphainput
  884.     CASE CHR$(88): RETURN 'X
  885.     CASE CHR$(45): GOTO s7 '-
  886.     CASE CHR$(68): GOTO s9
  887.     CASE CHR$(0): GOTO s0
  888.     CASE ELSE
  889.         scustinforec.sphone = sr
  890.         GOSUB s0
  891.         GOTO s9
  892. REM ***************************************************************************
  893. REM ***************************************************************************
  894. s9:
  895. saction = "Enter Description File Name D or Enter - To Back up "
  896. ib = 10
  897. ilow = 99
  898. ihigh = 99
  899. iflag1 = 0
  900. GOSUB clearprompt
  901. GOSUB salphainput
  902.     CASE CHR$(88): RETURN 'X
  903.     CASE CHR$(45): GOTO inv1 '-
  904.     CASE "":
  905.         scustinforec.sdesc = scustinforec.id
  906.         sdesc = scustinforec.id
  907.         GOSUB descinput
  908.         GOSUB s0
  909.         GOTO puttorecord
  910.  
  911.     CASE CHR$(68): 'D for using the sinventoryrec.id as the file name
  912.         scustinforec.sdesc = scustinforec.id
  913.         sdesc = scustinforec.id
  914.         GOSUB descinput
  915.         GOSUB s0
  916.         GOTO puttorecord
  917.  
  918.     CASE ELSE
  919.         scustinforec.sdesc = sr
  920.         sdesc = sr
  921.         GOSUB descinput
  922.         GOSUB s0
  923.         GOTO puttorecord
  924.  
  925. REM ***************************************************************************
  926. REM **** ask if you want to put data to record ********************************
  927. REM ***************************************************************************
  928. puttorecord:
  929. saction = "Commit Data to File Y/N"
  930. ib = 1
  931. ilow = 99
  932. ihigh = 99
  933. iflag1 = 0
  934. GOSUB clearprompt
  935. GOSUB salphainput
  936.     CASE "Y":
  937.         GOSUB insertrec
  938.  
  939.     CASE "N":
  940.         RETURN
  941. REM ***************************************************************************
  942.  
  943. REM ***************************************************************************
  944. REM **** delay loop ***********************************************************
  945. REM ***************************************************************************
  946. SUB Delay (dlay!)
  947.     start! = TIMER
  948.     DO WHILE start! + dlay! >= TIMER
  949.         IF start! > TIMER THEN start! = start! - 86400
  950.     LOOP
  951. REM ***************************************************************************
  952.  

Offline badger

  • Forum Regular
  • Posts: 148
    • View Profile
Re: _blink on and _blink off not working
« Reply #6 on: October 23, 2020, 02:49:03 pm »
Hello

I could have typed that better. You need to create a directory in your home directory call jbridal or rem out the gosub that calls the directory check routines. line 138


Badger