Advertisement
Prithak

Module

Jan 16th, 2019
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. CLS
  2. SCREEN _NEWIMAGE(800, 600, 32)
  3. 'Edit this according to your knowledge
  4. Main$ = "prithak.bas"
  5. Mainfile$ = "prithak.dat"
  6. DIM mx AS INTEGER
  7. DIM my AS INTEGER
  8. DIM mb AS INTEGER
  9. DIM n$(20)
  10. IF _FILEEXISTS("project.txt") THEN
  11. OPEN "project.txt" FOR INPUT AS #1
  12. DO WHILE NOT EOF(1)
  13. X = X + 1
  14. INPUT #1, n$(X)
  15. LOOP
  16. ELSE
  17. END IF
  18. DO
  19. CLS
  20. WHILE _MOUSEINPUT
  21. mx = _MOUSEX
  22. my = _MOUSEY
  23. mb = _MOUSEBUTTON(1)
  24. k$ = UCASE$(INKEY$)
  25.  
  26. IF k$ = "Q" THEN GOSUB opens
  27. LINE (100, 0)-(100, 600), _RGB32(100, 200, 255)
  28. _PRINTSTRING (50, 0), "SUBS"
  29.  
  30. LINE (100, 600)-(75, 575), _RGB32(100, 200, 255), B
  31. _PRINTSTRING (85, 590), "+"
  32. LINE (200, 100)-(500, 200), _RGB32(100, 200, 255), B
  33. _PRINTSTRING (250, 130), Main$
  34. LINE (200, 200)-(500, 300), _RGB32(100, 200, 255), B
  35. _PRINTSTRING (250, 230), Mainfile$
  36.  
  37. IF mouseclick(200, 200, 500, 300) THEN SHELL _DONTWAIT "notepad++ " + Mainfile$
  38.  
  39. FOR i = 1 TO X
  40. Y = Y + 15
  41. _PRINTSTRING (0, Y), n$(i)
  42. LINE (0, Y)-(100, Y + 15), _RGB32(100, 200, 255), B
  43. IF mouseclick(0, Y, 100, Y + 15) THEN
  44. IF n$(i) <> "" THEN
  45. SHELL _DONTWAIT "notepad++ " + n$(i)
  46. END IF
  47. END IF
  48. NEXT i
  49. Y = 0
  50. IF mouseclick(75, 575, 100, 600) THEN
  51. INPUT "Entet the file name"; name$
  52. CLOSE #1
  53. OPEN "project.txt" FOR APPEND AS #1
  54. PRINT #1, name$
  55. CLOSE #1
  56. OPEN "project.txt" FOR INPUT AS #1
  57. X = 1
  58. DO WHILE NOT EOF(1)
  59. INPUT #1, n$(X)
  60. X = X + 1
  61.  
  62. LOOP
  63. CLOSE #1
  64. END IF
  65.  
  66. _DISPLAY
  67. WEND
  68. LOOP
  69.  
  70. opens:
  71. CLS
  72. CLOSE #1
  73. _AUTODISPLAY
  74. OPEN Main$ FOR OUTPUT AS #1
  75. PRINT #1, "PRINT " + CHR$(34) + "Made in Prithak's Module" + CHR$(34)
  76. PRINT #1, "_DELAY 2"
  77. PRINT #1, "'$include: '" + Mainfile$ + "'"
  78. FOR i = 1 TO X
  79. PRINT #1, "'$include: '" + n$(i) + "'"
  80. NEXT i
  81. CLOSE #1
  82. PRINT "Please Wait while we Compile your file..."
  83. SHELL "qb64 -x " + Main$
  84. PRINT "Perfectly Executed the Program!"
  85. SHELL LEFT$(Main$, LEN(Main$) - 4) + ".exe"
  86. _DELAY 3
  87. RETURN
  88. FUNCTION mouseclick (x1, y1, x2, y2)
  89. Mx = _MOUSEX
  90. My = _MOUSEY
  91. Mb = _MOUSEBUTTON(1)
  92.  
  93. IF Mx >= x1 AND Mx <= x2 AND My >= y1 AND My <= y2 AND Mb THEN
  94. mouseclick = -1
  95. END IF
  96. END FUNCTION
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement