All pastes #502089 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-22 10:42 UTC
rendered paste body
dialog Remote.Creator {
  title "Remote Creator"
  size -1 -1 317 228
  option dbu
  combo 1, 9 13 80 55, size drop
  box "Create A Remote", 2, 4 4 309 221
  edit "", 3, 175 23 124 60, read multi return hsbar vsbar
  text "Remote View:", 4, 212 12 42 8
  button "Choose New Event", 5, 93 13 49 10
  radio "Channel", 6, 102 39 50 10
  radio "PM (Query)", 7, 102 52 50 10
  radio "Channel/PM", 8, 102 64 66 10
  edit "", 9, 10 98 106 10, autohs
  text "", 10, 10 79 105 17
  text "", 11, 153 114 146 78
  button "Set Word", 12, 10 111 37 10
  button "Send To Clipboard", 13, 209 86 49 10
  button "Set Nick", 14, 10 160 37 10
  edit "", 15, 10 146 106 10, autohs
  text "", 16, 10 124 106 20
  button "?", 17, 146 13 7 10
  text "", 18, 9 178 106 17
  button "Exit", 19, 266 204 42 12, ok
  edit "", 20, 9 197 106 10, autohs
  button "Set Command", 21, 10 211 37 10
  box "Info/Help", 22, 146 104 159 94
  button "Skip", 23, 79 160 37 10
  text "Activate in:", 24, 98 29 47 8
}



;------------[ Dialog Events ]------------

ON *:DIALOG:remote.creator:*:*: {

  ;------------[ Edit ]------------
  if ($devent == edit) {

    if ($did == 20) {
      if (!$did(20)) { did -b $xrem 21 }
      if ($did(20)) { did -e $xrem 21 }
    }
    if ($did == 15) {
      if (!$did(15)) { did -b $xrem 14 }
      if ($did(15)) { did -e $xrem 14 }
    }
    if ($did == 9) {
      if (!$did(9)) { did -b $xrem 12 }
      if ($did(9)) { did -e $xrem 12 }
    }
  }
  ;------------[ Init ]------------

  if ($devent == Init) {
    did -b $xrem 5,6-9,12-15,17,20,21
    did -a $xrem 1 On Action Event
    did -a $xrem 1 On Input Event
    did -a $xrem 1 On Mode Event
    did -a $xrem 1 On Nick Event
    did -a $xrem 1 On Notice Event
    did -a $xrem 1 On Op Event
    did -a $xrem 1 On Deop Event
    did -a $xrem 1 On Voice Event
    did -a $xrem 1 On Devoice Event
    did -a $xrem 1 On Halfop Event
    did -a $xrem 1 On Dehalfop Event
    did -a $xrem 1 On Text Event
    did -a $xrem 1 On Join Event
    did -a $xrem 1 On Part Event
    did -a $xrem 1 On Quit Event
    did -a $xrem 1 On Ban Event
    did -a $xrem 1 On Unban Event
    did -a $xrem 1 On Kick Event
    did -a $xrem 1 On Topic Event
    did -b $xrem 23
  }


  ;------------[ Sclick ]------------

  if ($devent == Sclick) {

    if ($did == 1) {

      did -e $xrem 5,6,7,8,17
      did -b $xrem 1

      if ($wrd == Action) {
        did -ra $xrem 3 on *:ACTION:*:
        did -a $xrem 10 Word for Script to activate on:
        did -a $xrem 11 text matches if text contains only this word $crlf text* matches if text starts with this word $crlf *text matches if text ends with this word $crlf *text* matches if text contains this word anywhere $crlf $crlf The On Action event triggers when someone uses '/me'
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == Input) {
        did -ra $xrem 3 on *:INPUT:
        did -a $xrem 10 Word for Script to activate on:
        did -a $xrem 11 text matches if text contains only this word $crlf text* matches if text starts with this word $crlf *text matches if text ends with this word $crlf *text* matches if text contains this word anywhere $crlf $crlf The on INPUT event triggers when you enter text in an editbox and press enter.
      }
      if ($wrd == Mode) {
        did -ra $xrem 3 on *:MODE:
        did -b $xrem 7,8
        did -a $xrem 10 Word for Script to activate on:
        did -a $xrem 11 text matches if text contains only this word $crlf text* matches if text starts with this word $crlf *text matches if text ends with this word $crlf *text* matches if text contains this word anywhere $crlf $crlf NOTE: use the mode, example: +m = m , +s = s , $crlf -s = -s $crlf $crlf The on MODE event triggers when a user changes a channel mode.
        did -a $xrem 16 set a specific nick for script to activate on, if you would like for this script to activate for everyone, please choose "Skip"
      }
      if ($wrd == Nick) {
        did -ra $xrem 3 On *:NICK: $chr(123)
        did -b $xrem 6-9
        did -c $xrem 6
        did -e $xrem 15,23
        did -a $xrem 11 The on NICK event triggers when a user changes nickname while on the same channel as you.
        did -a $xrem 16 set a specific nick for script to activate on, if you would like for this script to activate for everyone, please choose "Skip"
      }
      if ($wrd == Notice) {
        did -ra $xrem 3 On *:NOTICE:*:
        did -e $xrem 6-8
        did -a $xrem 11 text matches if text contains only this word $crlf text* matches if text starts with this word $crlf *text matches if text ends with this word $crlf *text* matches if text contains this word anywhere $crlf $crlf The on NOTICE event triggers when someone uses a '/notice'.
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }

      if ($wrd == Op) {
        did -ra $xrem 3 On *:OP:#: $chr(123)
        did -b $xrem 6-8
        did -c $xrem 6
        did -e $xrem 15,23
        did -a $xrem 11 The on OP events trigger when a user on a channel is opped.
        did -a $xrem 16 set a specific nick for script to activate on, if you would like for this script to activate for everyone, please choose "Skip"
      }
      if ($wrd == Deop) {
        did -ra $xrem 3 On *:DEOP:#: $chr(123)
        did -b $xrem 6-8
        did -a $xrem 11 The on DEOP events trigger when a user on a channel is deopped.
        did -e $xrem 15,23
        did -c $xrem 6
        did -a $xrem 16 set a specific nick for script to activate on, if you would like for this script to activate for everyone, please choose "Skip"
      }
      if ($wrd == Dehalfop) {
        did -ra $xrem 3 On *:DEHELP:#: $chr(123)
        did -b $xrem 6-8
        did -a $xrem 11 The on DEHELP events trigger when a user on a channel is dehalfopped.
        did -e $xrem 15,23
        did -c $xrem 6
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == halfop) {
        did -ra $xrem 3 On *:HELP:#: $chr(123)
        did -b $xrem 6-8
        did -a $xrem 11 The on HELP events trigger when a user on a channel is halfopped.
        did -e $xrem 15,23
        did -c $xrem 6
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == Voice) {
        did -ra $xrem 3 On *:VOICE:#: $chr(123)
        did -b $xrem 6-8
        did -c $xrem 6
        did -a $xrem 11 The on VOICE events trigger when a user on a channel is voice.
        did -e $xrem 15,23
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == devoice) {
        did -ra $xrem 3 On *:DEVOICE:#: $chr(123)
        did -b $xrem 6-8
        did -c $xrem 6
        did -a $xrem 11 The on DEVOICE events trigger when a user on a channel is devoiced.
        did -e $xrem 15,23
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == Text) {
        did -ra $xrem 3 On *:TEXT:*:
        did -e $xrem 6-8
        did -a $xrem 11 text matches if text contains only this word $crlf text* matches if text starts with this word $crlf *text matches if text ends with this word $crlf *text* matches if text contains this word anywhere $crlf $crlf The on TEXT event triggers when you receive private and/or channel messages.
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == Join) {
        did -ra $xrem 3 On *:JOIN:#: $chr(123)
        did -b $xrem 6-8
        did -c $xrem 6
        did -a $xrem 11 The on JOIN events trigger when a user joins a channel.
        did -e $xrem 15,23
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == part) {
        did -ra $xrem 3 On *:PART:#: $chr(123)
        did -b $xrem 6-8
        did -c $xrem 6
        did -a $xrem 11 The on JOIN events trigger when a user parts a channel.
        did -e $xrem 15,23
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == Quit) {
        did -ra $xrem 3 On *:QUIT: $chr(123)
        did -b $xrem 6-8
        did -a $xrem 11 The on QUIT event triggers when a user quits IRC while on the same channel as you.
        did -e $xrem 15,23
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == BAN) {
        did -ra $xrem 3 On *:BAN:#: $chr(123)
        did -b $xrem 6-8
        did -c $xrem 6
        did -a $xrem 11 The on BAN events trigger when a user on a channel is banned.
        did -e $xrem 15,23
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == Unban) {
        did -ra $xrem 3 On *:UNBAN:#: $chr(123)
        did -b $xrem 6-8
        did -c $xrem 6
        did -a $xrem 11 The on UNBAN events trigger when a user on a channel is unbanned.
        did -e $xrem 15,23
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == Kick) {
        did -ra $xrem 3 On *:KICK:#: $chr(123)
        did -b $xrem 6-8
        did -c $xrem 6
        did -a $xrem 11 The on KICK event triggers when a user is kicked from a channel.
        did -e $xrem 15,23
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
      if ($wrd == topic) {
        did -ra $xrem 3 On *:TOPIC:#: $chr(123)
        did -b $xrem 6-8
        did -c $xrem 6
        did -a $xrem 11 The on TOPIC event triggers when a user changes a channel topic.
        did -e $xrem 9
        did -a $xrem 10 set a specific topic for the script to activate on.
        did -a $xrem 16 Set a specific nick for the script to activate on, if you want this script to work for everyone, click on 'Skip'
      }
    }

    ;------------[ Did - 6 ]------------

    if ($did == 6) {
      did -a $xrem 3 #: $chr(123) | did -b $xrem 6-8 | did -e $xrem 9
      if ($wrd == Nick) {
        did -b $xrem 9
        did -e $xrem 15
      }
    }

    ;------------[ Did - 7 ]------------

    if ($did == 7) { did -a $xrem 3 ?: $chr(123) | did -b $xrem 6-8 | did -e $xrem 9 }


    ;------------[ Did - 8 ]------------

    if ($did == 8) { did -a $xrem 3 *: $chr(123) | did -b $xrem 6-8 | did -e $xrem 9 }


    ;------------[ Did - 12 ]------------


    if ($did == 12) {
      did -a $xrem 3 $crlf if ( $+ $did($xrem,9) iswm $!1- $+ ) $chr(123)
      did -b $xrem 9,12
      did -e $xrem 15,23
    }

    ;------------[ Did - 14 ]------------

    if ($did == 14) {
      did -a $xrem 3 $crlf if ( $+ $!nick == $did($xrem,15) $+ ) $chr(123)
      did -b $xrem 14,15,23
      did -e $xrem 20
      did -a $xrem 11 $crlf Set a command to do, Example 'msg $!nick Hi' $crlf $crlf use $chr(124) as a separator if you would like to perform more than one command. $crlf $crlf Example: $crlf msg $!nick Hi $chr(124) msg $!chan $!nick just joined the channel.
    }

    ;------------[ Did - 13 ]------------

    if ($did == 13) {
      var %x = 0
      clipboard
      while (%x < $did($xrem,3).lines) {
        inc %x
        clipboard -a $crlf $did($xrem,3,%x)
      }
    }

    ;------------[ Did - 21 ]------------

    if ($did == 21) {
      %xbrackets = $did($xrem,3).lines
      did -b $xrem 20,21
      did -a $xrem 3 $crlf $did($xrem,20) $str($crlf $chr(125),%xbrackets)
      did -e $xrem 13
      did -a $xrem 11 You will have to load this into Remotes (ALT + R) for this script to activate.
    }

    ;------------[ Did - 23 ]------------
    if ($did == 23) {
      did -e $xrem 20
      did -b $xrem 14,15,23
    }

    ;------------[ Did - 17 ]------------

    if ($did == 17) {
      help ON $wrd
    }

    ;------------[ Did - 5 ]------------

    if ($did == 5) {
      did -u $xrem 6-8
      did -e $xrem 1,6,7,8
      did -b $xrem 5,6,7,8,9,12,14,15,17,20,23
      did -r $xrem 3,9,10,11,15,20
    }
  }
}




;------------[ Aliases ]------------

alias xrem { return Remote.Creator }
alias wrd { return $gettok($did($dname,1),2,32) }
alias remote.creator { dialog -mdro Remote.Creator Remote.creator }
Menu Channel,Status,Menubar {
  Remote Creator:remote.creator
}