home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD1251.psc / Main.bas < prev    next >
Encoding:
BASIC Source File  |  1999-10-10  |  8.2 KB  |  250 lines

  1. Attribute VB_Name = "Main"
  2. '***************************'
  3.  
  4. Type Com
  5. Reply As String
  6. BackCommand As String
  7. End Type
  8.  
  9. '***************************'
  10.  
  11. Function fnC8(ByVal p0012 As String) As Variant
  12. Dim l0014 As String 'this is a function that changes text into Alternative caps
  13. Dim l0016 As Integer
  14. Dim l0018 As Integer
  15. Dim l001A As String
  16. Dim l001C As String
  17. Let l0014$ = p0012
  18. Let l0016% = Len(l0014$)
  19. Do While l0018% <= l0016%
  20. Let l0018% = l0018% + 1
  21. Let l001A$ = Mid$(l0014$, l0018%, 1)
  22. Let l001A$ = UCase$(l001A$)
  23. Let l001C$ = l001C$ + l001A$
  24. Let l0018% = l0018% + 1
  25. Let l001A$ = Mid$(l0014$, l0018%, 1)
  26. Let l001A$ = LCase$(l001A$)
  27. Let l001C$ = l001C$ + l001A$
  28. Loop
  29. fnC8 = l001C$
  30. End Function
  31.  
  32. '***************************'
  33.  
  34. Function fn100(ByVal p0020 As String) As String
  35. Dim l0022 As String 'this is a function that changes the text to backwards
  36. Dim l0024 As Integer
  37. l0022$ = ""
  38. For l0024% = Len(p0020$) To 1 Step -1
  39. l0022$ = l0022$ + Mid$(p0020$, l0024%, 1)
  40. Next l0024%
  41. fn100$ = l0022$
  42. End Function
  43.  
  44. '***************************'
  45.  
  46. Function fn138(ByVal p002A As String) As Variant
  47. Dim l002C As String 'this is just an ascci function that changes the text into elie form
  48. Dim l002E As Integer
  49. Dim l0030 As Integer
  50. Dim l0032 As String
  51. Dim l0034 As String
  52. Dim l0036 As String
  53. Dim l0038 As Integer
  54. Let l002C$ = p002A
  55. Let l002E% = Len(l002C$)
  56. Do While l0030% <= l002E%
  57. DoEvents
  58. Let l0030% = l0030% + 1
  59. Let l0032$ = Mid$(l002C$, l0030%, 1)
  60. Let l0034$ = Mid$(l002C$, l0030%, 2)
  61. If l0034$ = "ae" Then Let l0034$ = "µ": Let l0036$ = l0036$ + l0034$: Let l0038% = 2: GoTo L1382
  62. If l0034$ = "AE" Then Let l0034$ = "╞": Let l0036$ = l0036$ + l0034$: Let l0038% = 2: GoTo L1382
  63. If l0034$ = "oe" Then Let l0034$ = "£": Let l0036$ = l0036$ + l0034$: Let l0038% = 2: GoTo L1382
  64. If l0034$ = "OE" Then Let l0034$ = "î": Let l0036$ = l0036$ + l0034$: Let l0038% = 2: GoTo L1382
  65. If l0038% > 0 Then GoTo L1382
  66. If l0032$ = "A" Then Let l0032$ = "/\"
  67. If l0032$ = "a" Then Let l0032$ = "σ"
  68. If l0032$ = "B" Then Let l0032$ = "▀"
  69. If l0032$ = "C" Then Let l0032$ = "╟"
  70. If l0032$ = "c" Then Let l0032$ = "ó"
  71. If l0032$ = "D" Then Let l0032$ = "╨"
  72. If l0032$ = "d" Then Let l0032$ = "≡"
  73. If l0032$ = "E" Then Let l0032$ = "╩"
  74. If l0032$ = "e" Then Let l0032$ = "Φ"
  75. If l0032$ = "f" Then Let l0032$ = "â"
  76. If l0032$ = "H" Then Let l0032$ = "]-["
  77. If l0032$ = "I" Then Let l0032$ = "í"
  78. If l0032$ = "i" Then Let l0032$ = "ε"
  79. If l0032$ = "k" Then Let l0032$ = "|ï"
  80. If l0032$ = "L" Then Let l0032$ = "|_"
  81. If l0032$ = "l" Then Let l0032$ = "ú"
  82. If l0032$ = "M" Then Let l0032$ = "|V|"
  83. If l0032$ = "m" Then Let l0032$ = "^^"
  84. If l0032$ = "N" Then Let l0032$ = "]\["
  85. If l0032$ = "n" Then Let l0032$ = "±"
  86. If l0032$ = "O" Then Let l0032$ = "╪"
  87. If l0032$ = "o" Then Let l0032$ = "║"
  88. If l0032$ = "P" Then Let l0032$ = "╢"
  89. If l0032$ = "p" Then Let l0032$ = "▐"
  90. If l0032$ = "R" Then Let l0032$ = "|2"
  91. If l0032$ = "r" Then Let l0032$ = "«"
  92. If l0032$ = "S" Then Let l0032$ = "º"
  93. If l0032$ = "s" Then Let l0032$ = "$"
  94. If l0032$ = "T" Then Let l0032$ = "»|»"
  95. If l0032$ = "t" Then Let l0032$ = "å"
  96. If l0032$ = "U" Then Let l0032$ = "┌"
  97. If l0032$ = "u" Then Let l0032$ = "╡"
  98. If l0032$ = "V" Then Let l0032$ = "\/"
  99. If l0032$ = "W" Then Let l0032$ = "VV"
  100. If l0032$ = "w" Then Let l0032$ = "vv"
  101. If l0032$ = "X" Then Let l0032$ = "X"
  102. If l0032$ = "x" Then Let l0032$ = "╫"
  103. If l0032$ = "Y" Then Let l0032$ = "Ñ"
  104. If l0032$ = "y" Then Let l0032$ = "²"
  105. If l0032$ = "!" Then Let l0032$ = "í"
  106. If l0032$ = "?" Then Let l0032$ = "┐"
  107. If l0032$ = "." Then Let l0032$ = "à"
  108. If l0032$ = "," Then Let l0032$ = "é"
  109. If l0032$ = "1" Then Let l0032$ = "╣"
  110. If l0032$ = "%" Then Let l0032$ = "ë"
  111. If l0032$ = "2" Then Let l0032$ = "▓"
  112. If l0032$ = "3" Then Let l0032$ = "│"
  113. If l0032$ = "_" Then Let l0032$ = "»"
  114. If l0032$ = "-" Then Let l0032$ = "ù"
  115. If l0032$ = " " Then Let l0032$ = "á"
  116. Let l0036$ = l0036$ + l0032$
  117. L1382:
  118. If l0038% > 0 Then Let l0038% = l0038% - 1
  119. DoEvents
  120. Loop
  121. fn138 = l0036$
  122. End Function
  123.  
  124. '***************************'
  125.  
  126. Function fn170(ByVal p003E As String) As Variant
  127. Dim l0040 As String 'this is a function that changes text like 'hello' to H3LL0 (hacking or number text)
  128. Dim l0042 As Integer
  129. Dim l0044 As Integer
  130. Dim l0046 As String
  131. Dim l0048 As Integer
  132. Dim l004A As String
  133. Let l0040$ = p003E
  134. Let l0042% = Len(l0040$)
  135. Do While l0044% <= l0042%
  136. DoEvents
  137. Let l0044% = l0044% + 1
  138. Let l0046$ = Mid$(l0040$, l0044%, 1)
  139. If l0048% > 0 Then GoTo L1B62
  140. If l0046$ = "A" Then Let l0046$ = "4"
  141. If l0046$ = "a" Then Let l0046$ = "4"
  142. If l0046$ = "B" Then Let l0046$ = "8"
  143. If l0046$ = "b" Then Let l0046$ = "6"
  144. If l0046$ = "C" Then Let l0046$ = "C"
  145. If l0046$ = "c" Then Let l0046$ = "C"
  146. If l0046$ = "D" Then Let l0046$ = "D"
  147. If l0046$ = "d" Then Let l0046$ = "D"
  148. If l0046$ = "E" Then Let l0046$ = "3"
  149. If l0046$ = "e" Then Let l0046$ = "3"
  150. If l0046$ = "F" Then Let l0046$ = "F"
  151. If l0046$ = "f" Then Let l0046$ = "F"
  152. If l0046$ = "H" Then Let l0046$ = "H"
  153. If l0046$ = "h" Then Let l0046$ = "H"
  154. If l0046$ = "I" Then Let l0046$ = "1"
  155. If l0046$ = "i" Then Let l0046$ = "1"
  156. If l0046$ = "J" Then Let l0046$ = "J"
  157. If l0046$ = "j" Then Let l0046$ = "J"
  158. If l0046$ = "K" Then Let l0046$ = "K"
  159. If l0046$ = "k" Then Let l0046$ = "K"
  160. If l0046$ = "L" Then Let l0046$ = "L"
  161. If l0046$ = "l" Then Let l0046$ = "L"
  162. If l0046$ = "M" Then Let l0046$ = "M"
  163. If l0046$ = "m" Then Let l0046$ = "M"
  164. If l0046$ = "N" Then Let l0046$ = "N"
  165. If l0046$ = "n" Then Let l0046$ = "N"
  166. If l0046$ = "O" Then Let l0046$ = "0"
  167. If l0046$ = "o" Then Let l0046$ = "0"
  168. If l0046$ = "P" Then Let l0046$ = "P"
  169. If l0046$ = "p" Then Let l0046$ = "P"
  170. If l0046$ = "Q" Then Let l0046$ = "Q"
  171. If l0046$ = "q" Then Let l0046$ = "Q"
  172. If l0046$ = "R" Then Let l0046$ = "2"
  173. If l0046$ = "r" Then Let l0046$ = "2"
  174. If l0046$ = "S" Then Let l0046$ = "5"
  175. If l0046$ = "s" Then Let l0046$ = "5"
  176. If l0046$ = "T" Then Let l0046$ = "7"
  177. If l0046$ = "t" Then Let l0046$ = "7"
  178. If l0046$ = "U" Then Let l0046$ = "U"
  179. If l0046$ = "u" Then Let l0046$ = "U"
  180. If l0046$ = "V" Then Let l0046$ = "V"
  181. If l0046$ = "v" Then Let l0046$ = "V"
  182. If l0046$ = "W" Then Let l0046$ = "W"
  183. If l0046$ = "w" Then Let l0046$ = "W"
  184. If l0046$ = "X" Then Let l0046$ = "X"
  185. If l0046$ = "x" Then Let l0046$ = "X"
  186. If l0046$ = "Y" Then Let l0046$ = "Y"
  187. If l0046$ = "y" Then Let l0046$ = "Y"
  188. Let l004A$ = l004A$ + l0046$
  189. L1B62:
  190. If l0048% > 0 Then Let l0048% = l0048% - 1
  191. DoEvents
  192. Loop
  193. fn170 = l004A$
  194. End Function
  195.  
  196. '***************************'
  197.  
  198. Function EchoText(Text As String, Reverse As Boolean)
  199. 'This will "echo" the text, like this:  Cool ool ol l
  200. On Error GoTo error
  201. Dim i As Long
  202. Dim endstr As String
  203. For i = 1 To Len(Text$)
  204. If Reverse = True Then
  205. endstr$ = Mid$(Text$, i, Len(Text$) - (i - 1)) & " " & endstr$
  206. Else
  207. endstr$ = endstr$ & Mid$(Text$, i, Len(Text$) - (i - 1)) & " "
  208. End If
  209. Next i
  210. endstr$ = Mid$(endstr$, 1, Len(endstr$) - 1)
  211. EchoText = endstr$
  212. Exit Function
  213. error:  MsgBox Err.Description, vbExclamation, "Error"
  214. End Function
  215.  
  216. '***************************'
  217.  
  218. Function ReplaceChars(Chars As String, Optional ReplaceChr As String, Optional ReplaceWith As String) As String
  219. Dim ChrCnt As Long
  220. If ReplaceChr = "" Then ReplaceChr = " "
  221. ChrCnt = 1
  222. Do
  223. ChrCnt = InStr(ChrCnt, Chars, ReplaceChr)
  224. If ChrCnt = 0 Then Exit Do
  225. Chars = Left$(Chars, ChrCnt - 1) & ReplaceWith & Right(Chars, Len(Chars) + 1 - Len(ReplaceChr) - ChrCnt)
  226. ChrCnt = ChrCnt + Len(ReplaceWith)
  227. Loop
  228. ReplaceChars = Chars
  229. End Function
  230.  
  231. '***************************'
  232.  
  233. Public Function GetInBetween(Text As String, Textstring1 As String, Textstring2 As String) As String
  234. If InStr(Text, Textstring1) = 0 Or InStr(Text, Textstring2) = 0 Then
  235. GetInBetween = "STRING NOT FOUND"
  236. Exit Function
  237. End If
  238. GetInBetween = Mid$(Text, InStr(Text, Textstring1) + Len(Textstring1), InStr(Text, Textstring2) - (Len(Textstring1) + InStr(Text, Textstring1)))
  239. End Function
  240.  
  241. '***************************'
  242.  
  243. Public Function GetInBetween1(Text As String, Textstring1 As String, Textstring2 As String) As Integer
  244. If InStr(Text, Textstring1) = 0 Or InStr(Text, Textstring2) = 0 Then
  245. GetInBetween1 = "0"
  246. Exit Function
  247. End If
  248. GetInBetween1 = Mid$(Text, InStr(Text, Textstring1) + Len(Textstring1), InStr(Text, Textstring2) - (Len(Textstring1) + InStr(Text, Textstring1)))
  249. End Function
  250.