All pastes #973162 Raw Edit

Something

public text v1 · immutable
·published 2008-04-05 23:12 UTC
rendered paste body
menu * {
  Colours
  .Script is $iif(%colours1 == True,ON,OFF)
  ..Put it $iif(%Colours1 != $null,OFF,ON):$iif(%Colours1 != $null,/unset %colours1,/set %colours1 True)
  ..Colour Number ( $+ $iif(%Colourscolors != $null,$remove(%Colourscolors,$chr(3)),None) $+ ):/var %clr = $?="Enter The Desired Colour Number In Here" | $iif(%clr isnum 1-15,/omg %clr,/echo -a %clr Is an invalid colour number. Use 1 to 15.)
  $iif(%Colours1 == true,Text Fixing,)
  ..Text Fixing is $iif(%Coloursfix == 0,OFF,ON):$iif(%Coloursfix == 0,/set %coloursfix 1,/set %coloursfix 0)
  ..Dot Settings is $iif(%Coloursdots == 0,OFF,ON):$iif(%Coloursdots == 0,/set %coloursdots 1,/set %coloursdots 0)
  $iif(%Colours1 == true,Underline is $iif(%Coloursunderline != $null,ON,OFF),)
  ..Put it $iif(%Coloursunderline != $null,OFF,ON):$iif(%Coloursunderline != $null,/unset %coloursunderline,/set %coloursunderline )
  $iif(%Colours1 == true,Bold is $iif(%Coloursbold != $null,ON,OFF),)
  ..Put it $iif(%Coloursbold != $null,OFF,ON):$iif(%Coloursbold != $null,/unset %coloursbold,/set %coloursbold )
  .Main Panel:/Colours
}
alias omg {
  if ($1 == 1) {
    unset %colourscolors
    //echo -at 1 Set as main colour.
  }
  else {
    /set %Colourscolors  $+ $1
    //echo -at  $+ $+($chr(3),$1) $+ $remove(%colourscolors,$chr(3)) $+  Set as main colour.
  }
}

alias Colours /dialog -m Colours Colours
dialog Colours {
  title "Louis Text Style V1.1"
  size -1 -1 100 100
  option dbu
  check      "Activated", 14, 5 2 30 10
  check        "Bold", 15, 5 12 20 10
  check   "Underline", 16, 5 22 50 10
  check    "Fix Text", 17, 45 2 50 10
  check    "Add Dots", 133, 45 12 50 10
  text  "Colours", 1337, 5 35 20 10, nowrap
  radio     "2", 22, 5 42 20 10
  radio     "3", 23, 25 42 20 10
  radio     "4", 24, 45 42 20 10
  radio     "5", 25, 65 42 20 10
  radio     "6", 26, 85 42 20 10
  radio     "7", 27, 5 52 20 10
  radio     "8", 28, 25 52 20 10
  radio     "9", 29, 45 52 20 10
  radio     "10", 30, 65 52 20 10
  radio     "11", 31, 85 52 20 10
  radio     "12", 32, 5 62 20 10
  radio     "13", 33, 25 62 20 10
  radio     "14", 34, 45 62 20 10
  radio     "15", 35, 65 62 20 10
  radio "Normal", 21, 5 72 40 10
  button   "Ok!", 20, 85 90 13 8, ok
}
on *:dialog:Colours:sclick:14:{
  if ($did(14).state == 1) {
    set %Colours1 True
  }
  elseif ($did(14).state == 0) {
    unset %Colours1
  }
}
on *:dialog:Colours:init:*:{
  if (%Colours1 != $null) { did -c $dname 14 }
  if (%Coloursunderline != $null) { did -c $dname 16 }
  if (%Coloursbold != $null) { did -c $dname 15 }
  if (%Colourscolors != $null) { did -c $dname $calc($replace(%Colourscolors,,) + 20) && did -c $dname 23  }
  if (%Coloursfix == 1) { did -c $dname 17 }
  if (%Coloursdots == 1) { did -c $dname 133 }
}
on *:dialog:Colours:sclick:133:{
  if ($did(133).state == 1) {
    set %Coloursdots 1
  }
  elseif ($did(133).state == 0) {
  set %Coloursdots 0 }
}
on *:dialog:Colours:sclick:15:{
  if ($did(15).state == 1) {
    set %Coloursbold 
  }
  elseif ($did(15).state == 0) {
  unset %Coloursbold }
}
on *:dialog:Colours:sclick:17:{
  if ($did(17).state == 1) {
    set %Coloursfix 1
  }
  elseif ($did(17).state == 0) {
  set %Coloursfix 0 }
}
on *:dialog:Colours:sclick:16:{
  if ($did(16).state == 1) {
    set %Coloursunderline 
  } 
  elseif ($did(16).state == 0) {
    unset %Coloursunderline
  }
}
on *:dialog:Colours:sclick:22:{
  if ($did(22).state == 1) {
    set %Colourscolors 2
  }
  elseif ($did(22).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:23:{
  if ($did(23).state == 1) {
    set %Colourscolors 3
  }
  elseif ($did(23).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:24:{
  if ($did(24).state == 1) {
    set %Colourscolors 4
  }
  elseif ($did(24).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:25:{
  if ($did(25).state == 1) {
    set %Colourscolors 5
  }
  elseif ($did(25).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:26:{
  if ($did(26).state == 1) {
    set %Colourscolors 6
  }
  elseif ($did(26).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:27:{
  if ($did(27).state == 1) {
    set %Colourscolors 7
  }
  elseif ($did(27).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:28:{
  if ($did(28).state == 1) {
    set %Colourscolors 8
  }
  elseif ($did(28).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:29:{
  if ($did(29).state == 1) {
    set %Colourscolors 9
  }
  elseif ($did(29).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:30:{
  if ($did(30).state == 1) {
    set %Colourscolors 10
  }
  elseif ($did(30).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:31:{
  if ($did(31).state == 1) {
    set %Colourscolors 11
  }
  elseif ($did(31).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:32:{
  if ($did(32).state == 1) {
    set %Colourscolors 12
  }
  elseif ($did(32).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:33:{
  if ($did(33).state == 1) {
    set %Colourscolors 13
  } 
  elseif ($did(33).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:34:{
  if ($did(34).state == 1) {
    set %Colourscolors 14
  }
  elseif ($did(34).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:35:{
  if ($did(35).state == 1) {
    set %Colourscolors 15
  }
  elseif ($did(35).state == 0) {
    unset %Colourscolors
  }
}
on *:dialog:Colours:sclick:21:{
  if ($did(21).state == 1) {
    unset %Colourscolors
  }
  elseif ($did(21).state == 0) {
    unset %Colourscolors
  }
}
on *:input:*:{
  if (%Colours1 == true) {
    if ($left($1,1) == ! || $left($1,1) == @ ) { msg $active $1- | halt }
    if ($left($1,1) == / ) { $$$1- | halt }
    else {
      if (%Coloursfix == 1) {
        msg $active %Coloursunderline $+ %Coloursbold $+ %Colourscolors $+ $upper($left($1-,1)) $+ $right($1-,-1) $+ $iif(%coloursdots == 1,$iif($right($1-,1) != $chr(46) && $right($1-,1) != $chr(33) && $right($1-,1) != $chr(63),$chr(46),),)
        halt
      }
      if (%Coloursfix == 0) {
        msg $active %Coloursunderline $+ %Coloursbold $+ %Colourscolors $+ $1-
        halt
      }
    }
  }
}
on *:LOAD:{
  /set %Colours1 true
  /set %coloursdots 1
  /set %coloursfix 1
  echo -at Script Loaded Correctly. Type /Colours OR The Menus By Rightclicking Anywhere In The mIRC Window.
}