Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.62 KB | None | 0 0
  1.  
  2. alias csc { dialog -md typec typec }
  3. #color on
  4. dialog typec {
  5. title "Color by Videl"
  6. size -1 -1 140 140
  7. option dbu
  8. box "Color 1", 1, 70 90 30 25
  9. box "Color 2", 2, 105 90 30 25
  10. check "Single Color", 3, 5 90 41 7
  11. check "Color w/ BG", 4, 5 100 40 7
  12. check "Random Color", 5, 5 110 45 7
  13. check "Alternating Color w/ BG", 6, 5 130 65 7
  14. check "Alternating Color", 7, 5 120 50 7
  15. combo 8, 74 99 23 50, size drop
  16. combo 9, 109 99 23 50, size drop
  17. button "Set", 10, 90 130 20 9, ok
  18. button "Cancel", 11, 115 130 20 9, cancel
  19. check "Bold", 12, 74 118 20 7
  20. text "This is a color script by videl. Select the type of color you would like to use and then choose the appropriate color for your use, using the chart below. Click set to enable it. Enjoy!" 13, 5 1 130 27
  21. text "0 white 8 yellow", 16, 5 31 50 7
  22. text "1 black 9 lightgreen", 17, 5 38 60 7
  23. text "2 blue 10 cyan", 18, 5 45 50 7
  24. text "3 green 11 lightcyan", 19, 5 52 60 7
  25. text "4 lightred 12 lightblue", 20, 5 59 60 7
  26. text "5 brown 13 pink", 21, 5 66 50 7
  27. text "6 purple 14 grey", 22, 5 73 50 7
  28. text "7 orange 15 lightgrey", 23, 5 80 60 7
  29. link "gokus.nimbus@hotmail.com", 25, 66 80 69 7
  30. text "You can find me on irc as Videl or email me at:", 26, 66 65 70 15
  31. text "Thanks for using my color script <3", 27, 66 33 70 20
  32. text "?????????????????????????????????????????????", 28, 3 27 135 4
  33. }
  34. on *:dialog:typec:init:0:{
  35. var %f 0
  36. while (%f <= 15) {
  37. if ($len(%f) < 2) {
  38. did -a typec 8,9 $+(0,%f)
  39. inc %f
  40. }
  41. else {
  42. did -a typec 8,9 %f
  43. inc %f
  44. }
  45. }
  46. }
  47. on *:dialog:typec:sclick:3:{
  48. if ($did(typec,3).state == 1) {
  49. did -b typec 4,5,6,7,9
  50. }
  51. else {
  52. did -eu typec 3,4,5,6,7,8,9
  53. }
  54. }
  55. on *:dialog:typec:sclick:4:{
  56. if ($did(typec,4).state == 1) {
  57. did -b typec 3,5,6,7
  58. }
  59. else {
  60. did -eu typec 3,4,5,6,7,8,9
  61. }
  62. }
  63. on *:dialog:typec:sclick:5:{
  64. if ($did(typec,5).state == 1) {
  65. did -b typec 3,4,6,7,8,9
  66. }
  67. else {
  68. did -eu typec 3,4,5,6,7,8,9
  69. }
  70. }
  71. on *:dialog:typec:sclick:6:{
  72. if ($did(typec,6).state == 1) {
  73. did -b typec 3,4,5,7
  74. }
  75. else {
  76. did -eu typec 3,4,5,6,7,8,9
  77. }
  78. }
  79. on *:dialog:typec:sclick:7:{
  80. if ($did(typec,7).state == 1) {
  81. did -b typec 3,4,5,6
  82. }
  83. else {
  84. did -eu typec 3,4,5,6,7,8,9
  85. }
  86. }
  87. on *:dialog:typec:sclick:11:{
  88. .disable #color
  89. }
  90. on *:dialog:typec:sclick:10:{
  91. unset %sc | unset %bg1 | unset %bg2 | unset %ab1 | unset %ab2 | unset %a1 | unset %a2 | unset %bold
  92. set %bold $did(12).state
  93. if ($did(3).state == 1) && ($did(12).state == 0) {
  94. .enable #single
  95. set %sc $did(8).seltext
  96. }
  97. if ($did(3).state == 1) && ($did(12).state == 1) {
  98. .enable #bs
  99. set %sc $did(8).seltext
  100. }
  101. if ($did(4).state == 1) && ($did(12).state == 0) {
  102. .enable #cwb
  103. set %bg1 $did(8).seltext
  104. set %bg2 $did(9).seltext
  105. }
  106. if ($did(4).state == 1) && ($did(12).state == 1) {
  107. .enable #withbb
  108. set %bg1 $did(8).seltext
  109. set %bg2 $did(9).seltext
  110. }
  111. if ($did(5).state == 1) && ($did(12).state == 0) {
  112. .enable #r
  113. }
  114. if ($did(5).state == 1) && ($did(12).state == 1) {
  115. .enable #randomb
  116. }
  117. if ($did(6).state == 1) && ($did(12).state == 0) {
  118. .enable #acb
  119. set %ab1 $did(8).seltext
  120. set %ab2 $did(9).seltext
  121. }
  122. if ($did(6).state == 1) && ($did(12).state == 1) {
  123. .enable #backaltb
  124. set %ab1 $did(8).seltext
  125. set %ab2 $did(9).seltext
  126. }
  127. if ($did(7).state == 1) && ($did(12).state == 0) {
  128. .enable #ac
  129. set %a1 $did(8).seltext
  130. set %a2 $did(9).seltext
  131. }
  132. if ($did(7).state == 1) && ($did(12).state == 1) {
  133. .enable #altb
  134. set %a1 $did(8).seltext
  135. set %a2 $did(9).seltext
  136. }
  137. }
  138. #color end
  139. #cwb on
  140. ;color w/ background
  141. on *:input:*:{
  142. if (/* !iswm $1) && (!$ctrlenter) {
  143. var %x =  $+ %bg1
  144. var %z = %bg2
  145. say %x $+ , $+ %z $+ $1-
  146. halt
  147. }
  148. }
  149. #cwb end
  150. #r off
  151. ;random color
  152. on *:input:*: {
  153. var %r = $r(1,15)
  154. if (/* !iswm $1) && (!$ctrlenter) && ($len(%r) < 2) {
  155. var %c = $+(0,,,%r)
  156. say $+($chr(3),%c,$1-)
  157. halt
  158. }
  159. elseif (/* !iswm $1) && (!$ctrlenter) {
  160. say $+($chr(3),%r,$1-)
  161. halt
  162. }
  163. }
  164. #r end
  165. #single on
  166. ;single color
  167. on *:input:*:{
  168. if (/* !iswm $1) && (!$ctrlenter) {
  169. say $+(,%sc,$1-,)
  170. halt
  171. }
  172. }
  173. #single end
  174. #ac off
  175. ;alternating color
  176. alias ctalker {
  177. var %x
  178. .echo -q $regsub($1,/(.)(.?)/g, $+ %a1 $+ \1 $+ %a2 $+ \2,%x)
  179. return %x
  180. }
  181. on *:input:*:{
  182. if (/* !iswm $1) && (!$ctrlenter) && (!$inpaste) {
  183. say $$ctalker($1-)
  184. halt
  185. }
  186. }
  187. #ac end
  188. #acb off
  189. ;alternating color w/ background
  190. alias ctalker {
  191. var %x =  $+ %ab1 $+ , $+ %ab2 $+ \1 $+ %ab2 $+ , $+ %ab1 $+ \2
  192. .echo -q $regsub($1,/(.)(.?)/g,%x,%x)
  193. return %x
  194. }
  195. on *:input:*:{
  196. if (/* !iswm $1) && (!$ctrlenter) && (!$inpaste) {
  197. say $$ctalker($1-)
  198. halt
  199. }
  200. }
  201. #acb end
  202. #withbb off
  203. ;Bold color w/ background
  204. on *:input:*:{
  205. if (/* !iswm $1) && (!$ctrlenter) {
  206. var %x =  $+ %bg1
  207. var %z = %bg2
  208. say %x $+ , $+ %z $+ $1-
  209. halt
  210. }
  211. }
  212. #withbb end
  213. #randomb off
  214. ;Bold random color
  215. on *:input:*: {
  216. var %r = $r(1,6)
  217. if (/* !iswm $1) && (!$ctrlenter) && ($len(%r) < 2) {
  218. var %c = $+(0,,,%r)
  219. say  $+ %c $+ $1-
  220. halt
  221. }
  222. elseif (/* !iswm $1) && (!$ctrlenter) {
  223. say  $+ %r $+ $1-
  224. halt
  225. }
  226. }
  227. #randomb end
  228. #bs off
  229. ;Bold single color
  230. on *:input:*:{
  231. if (/* !iswm $1) && (!$ctrlenter) {
  232. say $+(,%sc,$1-,)
  233. halt
  234. }
  235. }
  236. #bs end
  237. #altb off
  238. ;Bold alternating color
  239. alias ctalker {
  240. var %x
  241. .echo -q $regsub($1,/(.)(.?)/g, $+ %a1 $+ \1 $+ %a2 $+ \2,%x)
  242. return %x
  243. }
  244. on *:input:*:{
  245. if (/* !iswm $1) && (!$ctrlenter) && (!$inpaste) {
  246. say $$ctalker($1-)
  247. halt
  248. }
  249. }
  250. #altb end
  251. #backaltb off
  252. ;Bold alternating color w/ background
  253. alias ctalker {
  254. var %x =  $+ %ab1 $+ , $+ %ab2 $+ \1 $+ %ab2 $+ , $+ %ab1 $+ \2
  255. .echo -q $regsub($1,/(.)(.?)/g,%x,%x)
  256. return %x
  257. }
  258. on *:input:*:{
  259. if (/* !iswm $1) && (!$ctrlenter) && (!$inpaste) {
  260. say $$ctalker($1-)
  261. halt
  262. }
  263. }
  264. #backaltb end
  265.  
  266. menu * {
  267. Videl's Color
  268. .Change Options: .enable #color | csc
  269. $iif($group(#color) == on,$style(1)) Color On: .enable #color
  270. $iif($group(#color) == off,$style(1)) Color Off: .disable #color #single #cwb #r #acb #ac #bs #withbb #randomb #backaltb #altb | echo -a *Color Script Disabled | unset %sc | unset %bg1 | unset %bg2 | unset %ab1 | unset %ab2 | unset %a1 | unset %a2 | unset %bold
  271. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement