ASCII Table
mIRC Pastebin
Raw Numerics
User Map
User Browser
Channel Browser
IRC Junkie - IRC News mIRC Scripts Dot Com
Team Clan X Scripting Group Site (French) Scripting Website
 30 July @ 04:48am. #mirc.net @ undernet. Welcome, Guest | Sign in   
   Forums       Screenshots       Scripts       Addons       Snippets       Misc       DLLs       Tutorials       Community    
   Submit form       Download mIRC       Servers.ini       IRC News       Newbie Tutorial       Challenges       Tools    
 › Pastebin
Back to the index

Paste: Options:
socket script pasted by Termz
Pasted 02 January @ 12:46pm
Copy to clipboard


; Simple Socket Script Creator v0.1
; Created by Chessnut
; Feel free to change this script however you want,
; but please leave the copyright as it is.
; Right click anywhere and click "Simple socket script creator" to start.
; Remember to read the Readme file.
; Enjoy.

; --- Chessnut ---->



; COMMANDS ON DIALOG INITIALISATION
alias sckinit {
  did -a sock_disp 3 %sckdispsite
  $iif(%sockdispport,did -ra sock_disp 4 %sckdispport)
  did -c sock_disp 46
  did -c sock_disp 28
}

alias retchanges { return $replace(%changes,@zeroŁ,0) }

; OPENS RETRIEVAL SOCK
alias opensockdisp { sockopen dsock %sckdisphost %sckdispport }

; WRITES DATA TO PAGE RETRIEVAL SOCKET
alias writesockdisp {
  sockwrite -nt $sockname $iif($did(sock_disp,28).state == 1,GET,POST) %sckdisppage HTTP/1.1
  sockwrite -nt $sockname Host: %sckdisphost
  $iif($did(sock_disp,40),sockwrite -nt $sockname User-Agent: $did(sock_disp,40))
  var %j = 1
  var %k = $did(sock_disp,88).lines
  while (%j < %k) {   
    if ($did(sock_disp,88) != $null) sockwrite -nt $sockname $did(sock_disp,88, [ $+ [ %j ] ] )
    inc %j
  }
  sockwrite -nt $sockname $crlf
}

; NO HTML ALIAS
alias nohtml { var %x,%y = $regsub($1-,/(<[^>]+>)/g,$null,%x) | return %x } alias -l htm { var %x,%y = $regsub($1-,/(<[^>]+>)/g,$null,%x) | return %x }

; LOOOOOOONG DIALOG!
dialog -l sock_disp {
  title "Simple Socket Script Creator"
  size -1 -1 285 188
  option dbu
  tab "HTML Viewer", 5, 5 3 275 165
  button "View page", 2, 46 150 31 15, tab 5
  edit , 3, 37 27 69 11, result tab 5 autohs
  edit "80", 4, 38 39 19 12, result tab 5 limit 4
  box "Connection", 8, 10 18 102 68, tab 5
  text "Port:", 9, 12 40 16 8, tab 5
  text "Address:", 10, 12 29 25 8, tab 5
  box "Display", 11, 10 86 102 20, tab 5
  check "Strip HTML", 12, 13 93 37 10, tab 5
  box "Line details", 26, 10 106 102 42, tab 5
  edit "", 27, 13 115 88 11, tab 5 read autohs
  list 1, 115 20 161 119, tab 5 size vsbar
  text "Length:", 29, 13 137 37 8, tab 5
  check "Show head/headers", 41, 51 93 57 10, hide tab 5
  text "User Agent:", 39, 12 51 24 14, hide tab 5
  edit "", 40, 37 52 68 12, hide tab 5 autohs
  button "Use line", 78, 66 136 31 10, tab 5
  edit "", 101, 134 142 76 11, tab 5 autohs
  button "Next >", 102, 246 142 23 11, tab 5
  text "Search Lines:", 103, 115 141 18 14, tab 5
  text "Line Number:", 104, 13 127 78 8, tab 5
  text "Lines found:", 106, 114 157 31 8, tab 5
  edit "", 107, 148 156 25 10, tab 5 read autohs
  edit "", 108, 210 156 36 10, tab 5 autohs
  text "Go to line:", 109, 182 157 26 8, tab 5
  button "Go to", 110, 249 157 21 9, tab 5
  button "Search", 105, 214 142 28 11, tab 5
  radio "GET", 28, 60 40 20 10, hide tab 5
  radio "POST", 89, 82 40 25 10, hide tab 5
  edit "", 88, 37 65 68 18, hide tab 5 multi return autohs autovs
  text "Extra sockwrite:", 87, 12 67 24 14, hide tab 5
  button "View in Browser", 84, 81 149 26 17, tab 5 multi
  tab "Socket Writer", 6
  edit "No line selected", 13, 127 27 144 10, tab 6 read autohs
  box "Before editing", 14, 120 19 157 23, tab 6
  box "After editing", 15, 120 43 157 23, tab 6
  edit "No line selected", 16, 127 51 144 10, tab 6 read autohs
  box "Action", 22, 120 68 157 97, tab 6
  text "Items to remove (Separated by a comma)", 23, 126 96 103 8, tab 6
  check "Strip html after", 25, 129 149 48 10, tab 6
  edit "", 30, 125 124 112 10, tab 6 autohs
  edit "", 31, 125 104 112 10, tab 6 autohs
  button "Update", 32, 223 145 37 12, tab 6
  text "and", 36, 193 86 11 8, tab 6
  text "Data wanted is between", 34, 126 77 103 8, tab 6
  edit "", 33, 125 85 60 10, tab 6 autohs
  edit "", 35, 210 85 60 10, tab 6 autohs
  text "Items to replace (Separated by a comma)", 17, 126 116 103 8, tab 6
  box "Finding correct line", 62, 11 19 104 78, tab 6
  text "What phrase/string will ALWAYS be on this line?", 63, 16 29 90 14, tab 6
  edit "", 64, 16 44 84 10, tab 6 autohs
  text "What phrase/string will NEVER be on this line?", 65, 16 58 90 14, tab 6
  edit "", 66, 15 73 84 10, tab 6 autohs
  button "Next >", 70, 83 150 28 15, tab 6
  check "Strip html before", 85, 129 137 51 10, tab 6
  box "Custom Action", 86, 11 98 104 50, hide tab 6
  edit "", 92, 15 114 96 10, hide tab 6 autohs
  text "Note: Use @LINE@ to refer to the rest of the line, EG. $bytes(@LINE@,b).", 112, 15 126 98 17, hide tab 6
  text "Alias/es:", 24, 16 106 25 8, hide tab 6
  text "Note: Supports asterix (*)", 90, 16 85 77 8, tab 6
  tab "Script Creation", 37
  edit "", 42, 35 32 50 10, tab 37 autohs
  text "Remote trigger:", 43, 12 29 22 15, tab 37
  box "Input", 44, 10 20 85 29, tab 37
  box "Output", 45, 10 50 85 98, tab 37
  radio "Message channel", 46, 15 59 50 7, tab 37
  edit "", 48, 14 94 76 28, tab 37 multi return autohs autovs
  text "Output message:", 49, 15 86 46 8, tab 37
  text "NOTE: Use @RESULT@ to refer to the data found. New line means new message.", 50, 14 124 75 21, tab 37
  radio "Notice nick", 47, 15 68 50 7, tab 37
  box "Socket", 58, 98 20 70 34, tab 37
  text "Socket name:", 59, 102 28 34 8, tab 37
  edit "", 60, 101 36 50 10, tab 37 autohs
  box "Data", 72, 98 55 70 36, tab 37
  edit "", 73, 101 72 50 10, tab 37 autohs
  text "Variable to store data as:", 74, 102 64 62 8, tab 37
  button "Test/View Script", 82, 108 150 43 15, tab 37
  box "Issues in creation", 96, 171 20 102 144, tab 37
  list 97, 175 28 94 83, tab 37 size
  edit "", 98, 176 113 96 10, tab 37 read autohs
  button "Find error", 99, 205 125 37 12, tab 37
  text "Note: Errors that MUST be fixed to create the script are marked with an asterix (*).", 100, 177 140 89 21, tab 37
  radio "Echo status window", 91, 15 77 59 7, tab 37
  button "Create Script", 61, 69 150 35 15, tab 37
  tab "Testing", 38
  button "Trigger socket", 51, 37 28 45 12, tab 38
  edit "", 52, 46 44 100 10, tab 38 read autohs
  text "Line before editing:", 53, 13 42 31 14, tab 38
  text "Line after editing:", 54, 13 58 31 14, tab 38
  edit "", 55, 46 61 99 10, tab 38 read autohs
  text "Result:", 57, 14 76 25 7, tab 38
  box "Process", 67, 161 20 111 84, tab 38
  list 68, 168 29 97 69, tab 38 size vsbar
  button "View Script", 71, 51 150 31 15, tab 38
  list 56, 13 83 140 40, tab 38 size vsbar
  box "Process line info", 75, 90 141 183 24, tab 38
  edit "", 76, 96 150 170 10, tab 38 read autohs
  edit "", 77, 12 123 140 10, tab 38 read autohs
  box "Script working?", 79, 189 107 48 34, tab 38
  icon 80, 205 117 15 15, tick.png, 0, hide tab 38
  icon 81, 205 117 15 15, cross.png, 0, hide tab 38
  box "Trigger/Result", 19, 9 20 148 119, tab 38
  button "Force close socket", 83, 86 28 51 12, hide tab 38
  button "Cancel", 7, 14 150 28 15, ok cancel
  link "Help", 18, 255 5 13 8
  check "Toggle Advanced Mode", 21, 8 173 70 10
  icon 20, 244 5 8 8, sckdg_help.gif, 0
  text "Created by Chessnut Version 0.1 BETA", 69, 223 171 52 16
}

menu * {
  Simple Socket Creator:/dialog -md sock_disp sock_disp
}

; OPEN SOCKET (VIEW PAGE)
on *:dialog:sock_disp:sclick:2:{
  did -r sock_disp 27
  set %sckdispsite $did(3)
  set %sckdisphost $remove($left($remove($did(3),http://),$pos($remove($did(3),http://),/,1)),/)
  set %sckdisppage $remove($did(sock_disp,3),http://,%sckdisphost)
  set %sckdispport $did(sock_disp,4)
  if (!%sckdisphost) {
    set %sckdisphost %sckdisppage
    set %sckdisppage /
  }
  did -r sock_disp 1
  if ($did(12).state == 1) { did -bc sock_disp 85 }
  else { did -eu sock_disp 85 }
  sockclose dsock
  $opensockdisp
}

on *:SOCKOPEN:dsock: {
  $writesockdisp
  set %showheaders $did(sock_disp,41).state
}

on *:SOCKREAD:dsock: {
  if ($sockerr) {
    did -r sock_disp 1 Add value
    halt
    echo Quoteror
  }
  else {
    var %Quote
    sockread %Quote
    if (%Quote != $null) {
      if (%showheaders == 0) {
        if (*</head>* iswm %Quote) set %showheaders 1
      }
      if (%showheaders == 1) {
        if ($did(sock_disp,12).state == 1) {
          $iif($len(%Quote) < 850,did -a sock_disp 1 $nohtml(%Quote),did -a sock_disp 1 !!@@ LINE TOO LONG @@!!)   
        }
        else {
          $iif($len(%Quote) < 850,did -a sock_disp 1 %Quote,did -a sock_disp 1 !!@@ LINE TOO LONG @@!!)
        }
      }
    }
  }
}

; INITILISATION COMMANDS
on *:DIALOG:sock_disp:INIT:0: {
  $sckinit
}

; DOUBLE CLICK ON PAGE LIST
on *:dialog:sock_disp:dclick:1:{
  did -ar sock_disp 13,16 $did(1).seltext
  did -fu sock_disp 6
}

; SINGLE CLICK ON PAGE LIST
on *:dialog:sock_disp:sclick:1:{
  did -ar sock_disp 27 $did(1).seltext
  did -ar sock_disp 29 Length: $len($did(1).seltext)
  did -ar sock_disp 104 Line Number: $did(1).sel
}

; SEARCH PAGE LIST
on *:dialog:sock_disp:sclick:105:{
  unset %resline
  unset %foundline.*
  var %i $did(1).lines
  var %c 0
  set %resline 1
  while (%c <= %i) {
    if ($+(*,$did(101),*) iswm $did(1,%c)) {
      set %foundline. [ $+ [ %resline ] ] %c
      inc %resline
    }
    inc %c
  }
  if (%foundline.1) did -c sock_disp 1 %foundline.1
  did -ar sock_disp 107 $calc(%resline - 1)
  set %nextimes 1
  did -ar sock_disp 27 $did(1).seltext
  did -ar sock_disp 29 Length: $len($did(1).seltext)
  did -ar sock_disp 104 Line Number: $did(1).sel
}

; SEARCH PAGE LIST --> NEXT
on *:dialog:sock_disp:sclick:102:{
  if (%nextimes == $calc(%resline - 1)) set %nextimes 0
  inc %nextimes
  did -c sock_disp 1 %foundline. [ $+ [ $calc(%nextimes) ] ]
  did -ar sock_disp 27 $did(1).seltext
  did -ar sock_disp 29 Length: $len($did(1).seltext)
  did -ar sock_disp 104 Line Number: $did(1).sel
}

; SEARCH PAGE LIST --> GOTO
on *:dialog:sock_disp:sclick:110:{
  did -c sock_disp 1 $did(108)
  did -ar sock_disp 27 $did(1).seltext
  did -ar sock_disp 29 Length: $len($did(1).seltext)
  did -ar sock_disp 104 Line Number: $did(1).sel

}

; UPDATE CHANGES
on *:dialog:sock_disp:sclick:32:{
  did -ar sock_disp 16 $did(13)
  set %changes $chr(37) $+ Quote
  if ($did(85).state == 1) { did -ar sock_disp 16 $nohtml($did(16)) | set %changes $chr(36) $+ nohtml( $+ %changes $+ ) }
  noop $regex($did(16),/ $+ $did(33) $+ (.*?) $+ $did(35) $+ /Si)
  if ($regml(1)) { did -ar sock_disp 16 $regml(1) }
  tokenize 44 $did(31)
  if ($did(31) != $null) { did -ar sock_disp 16 $remove($did(16),$1,$2,$3,$4,$5,$6,$7,$8,$9,$10) | set %changes $chr(36) $+ remove( $+ %changes $+ $iif($1,$chr(44) $+ $1) $+ $iif($2,$chr(44) $+ $2) $+ $iif($3,$chr(44) $+ $3) $+ $iif($4,$chr(44) $+ $4) $+ $iif($5,$chr(44) $+ $5) $+ $iif($6,$chr(44) $+ $6) $+ $iif($7,$chr(44) $+ $7) $+ $iif($8,$chr(44) $+ $8) $+ $iif($9,$chr(44) $+ $9) $+ $iif($10,$chr(44) $+ $10) $+ $iif($11,$chr(44) $+ $11) $+ $iif($12,$chr(44) $+ $12) $+ ) }
  tokenize 44 $did(30)
  if ($did(30) != $null) { did -ar sock_disp 16 $replace(16),$1,$2,$3,$4,$5,$6,$7,$8,$9,$10) | set %changes $chr(36) $+ replace( $+ %changes $+ $iif($1,$chr(44) $+ $1) $+ $iif($2,$chr(44) $+ $2) $+ $iif($3,$chr(44) $+ $3) $+ $iif($4,$chr(44) $+ $4) $+ $iif($5,$chr(44) $+ $5) $+ $iif($6,$chr(44) $+ $6) $+ $iif($7,$chr(44) $+ $7) $+ $iif($8,$chr(44) $+ $8) $+ $iif($9,$chr(44) $+ $9) $+ $iif($10,$chr(44) $+ $10) $+ $iif($11,$chr(44) $+ $11) $+ $iif($12,$chr(44) $+ $12) $+ ) }
  if ($did(25).state == 1) { did -ar sock_disp 16 $nohtml($did(16)) | set %changes $chr(36) $+ nohtml( $+ %changes $+ ) }
  if ($did(92) != $null) { did -ar sock_disp 16 $eval($replace($did(92),@LINE@,$did(16)),2) | set %changes $replace($did(92),@LINE@,%changes) }


}

; TOGGLE ADVANCED MODE
on *:dialog:sock_disp:sclick:21:{
  did $iif($did(21).state == 0,-h,-v) sock_disp 40,39,41,24,92,112,28,83,86-89
}

; SCRIPT CREATE
on *:dialog:sock_disp:sclick:61:{
  unset %sckerror
  did -r sock_disp 97
  did -r sock_disp 98
  if ($did(13) == $null) { did -a sock_disp 97 * You have not opened a socket to choose a line from | set %sckerror yes }
  if ($did(13) == $null || $did(13) == No line selected) { did -a sock_disp 97 * You have not selected a line within the socket! | set %sckerror yes }
  if ($did(64) == $null) { did -a sock_disp 97 * Must specify value ALWAYS on a line | set %sckerror yes }
  if ($did(42) == $null) { did -a sock_disp 97 No trigger defined. Used !trigger | did -a sock_disp 42 !trigger }
  if ($did(48) == $null) { did -a sock_disp 97 No output message: Used Result: @RESULT@ | did -a sock_disp 48 Result: @RESULT@ }
  if ($did(60) == $null) { did -a sock_disp 60 socket $+ $rand(100,100000) | did -a sock_disp 97 No socket defined: Used socket: $did(60) }
  if ($did(73) == $null) { did -a sock_disp 97 No variable defined. Value will be unset after. }
  if ($left($did(73),1) != $chr(37) && $did(73) != $null) { did -ar sock_disp 73 $chr(37) $+ $did(73) | did -a sock_disp 97 Corrected invalid variable - added $chr(37) $+ . }
  if (%sckerror != yes) {
    write -c sctcreate.txt $chr(59) $did(42) script created using Chessnut's Simple Socket Script Creator
    write sctcreate.txt $crlf
    write sctcreate.txt on *:text: $+ $did(42) $+ *:#: $chr(123)
    write sctcreate.txt if ( $+ $chr(36) $+ sock( $+ $did(60) $+ )) .sockclose $did(60)
    write sctcreate.txt set $chr(37) $+ chan $chr(36) $+ chan
    write sctcreate.txt set $chr(37) $+ nick $chr(36) $+ nick
    write sctcreate.txt sockopen $did(60) %sckdisphost %sckdispport
    write sctcreate.txt $chr(125)
    write sctcreate.txt on *:SOCKOPEN: $+ $did(60) $+ : $chr(123)
    write sctcreate.txt sockwrite -nt $chr(36) $+ sockname $iif($did(sock_disp,28).state == 1,GET,POST) %sckdisppage HTTP/1.1
    write sctcreate.txt sockwrite -nt $chr(36) $+ sockname Host: %sckdisphost
    $iif($did(40),write sctcreate.txt sockwrite -nt $chr(36) $+ sockname User-Agent: $did(40))
    var %j = 1
    var %k = $did(88).lines
    while (%j <= %k) {   
      if ($did(sock_disp,88) != $null) write sctcreate.txt sockwrite -nt $chr(36) $+ sockname $did(88, [ $+ [ %j ] ] )
      inc %j
    } 
    write sctcreate.txt sockwrite -nt $chr(36) $+ sockname $chr(36) $+ crlf
    write sctcreate.txt $chr(125)
    write sctcreate.txt on *:SOCKREAD: $+ $did(60) $+ : $chr(123)
    write sctcreate.txt if ( $+ $chr(36) $+ sockerr) $chr(123)
    write sctcreate.txt msg $chr(37) $+ chan Socket Error: $chr(36) $+ sockname $chr(36) $+ + . Error code: $chr(36) $+ sockerr Please inform $chr(36) $+ me of this error message.
    write sctcreate.txt halt
    write sctcreate.txt $chr(125)
    write sctcreate.txt else $chr(123)
    write sctcreate.txt var $chr(37) $+ Quote
    write sctcreate.txt sockread $chr(37) $+ Quote
    write sctcreate.txt if (* $+ $did(64) $+ * iswm $chr(37) $+ Quote $iif($did(66) != $null,&& * $+ $did(66) $+ * !iswm $chr(37) $+ Quote $+ ,$+ ) ) $chr(123)
    $iif($did(33) != $null || $did(35) != $null,write sctcreate.txt noop $chr(36) $+ regex( $+ $chr(37) $+ Quote $+ $chr(44) $+ / $+ $did(33) $+ (.*?) $+ $did(35) $+ /Si))
    $iif($did(33) != $null || $did(35) != $null,set %changes $replace(%changes,$+($chr(37),Quote),$+($chr(36),regml(1))))
    $iif($did(33) != $null || $did(35) != $null,write sctcreate.txt $iif($did(73) == $null,var $+($chr(37),tempvar),set $did(73)) $replace(%changes,@zeroŁ,0),write sctcreate.txt $iif($did(73) == $null,var $+($chr(37),tempvar), set $did(73)) $replace(%changes,@zeroŁ,0))
    var %i = 1
    var %c = $did(48).lines
    while (%i <= %c) { 
      if ($did(46).state == 1) {
        write sctcreate.txt msg $chr(37) $+ chan $replace($did(48, [ $+ [ %i ] ] ),@RESULT@,$iif($did(73) == $null,$+($chr(37),tempvar), $did(73)))
      }
      if ($did(47).state == 1) {
        write sctcreate.txt notice $chr(37) $+ nick $replace($did(48, [ $+ [ %i ] ] ),@RESULT@,$iif($did(73) == $null,$+($chr(37),tempvar), $did(73)))
      }
      if ($did(91).state == 1) {
        write sctcreate.txt echo -s $replace($did(48, [ $+ [ %i ] ] ),@RESULT@,$iif($did(73) == $null,$+($chr(37),tempvar), $did(73)))
      } 
      inc %i
    } 
    write sctcreate.txt unset $chr(37) $+ chan
    write sctcreate.txt unset $chr(37) $+ nick
    write sctcreate.txt sockclose $did(60)
    write sctcreate.txt $chr(125)
    write sctcreate.txt $chr(125)
    write sctcreate.txt $chr(125)
    did -a sock_disp 97 SCRIPT CREATED SUCCESSFULLY.
  }
  else {
    did -a sock_disp 97 SCRIPT NOT CREATED.
  }
}

; SELECT CREATION LINE
on *:dialog:sock_disp:sclick:97:{
  did -ar sock_disp 98 $did(97).seltext
}

; FIND ERROR
on *:dialog:sock_disp:sclick:99:{
  if ($did(98) == $null) halt
  if (*opened a socket to choose* iswm $did(98)) || (*not selected a line* iswm $did(98)) { did -f sock_disp 5 | did -f sock_disp 2 }
  if (*value ALWAYS on a line* iswm $did(98)) { did -f sock_disp 6 | did -f sock_disp 64 }
  if (*No trigger* iswm $did(98)) { did -f sock_disp 42 }
  if (*No output* iswm $did(98)) { did -f sock_disp 48 }
  if (*No socket* iswm $did(98)) { did -f sock_disp 60 }
  if (*No variable* iswm $did(98)) { did -f sock_disp 73 }
  if (*invalid variable* iswm $did(98)) { did -f sock_disp 73 }
}

; SCRIPT TEST
on *:dialog:sock_disp:sclick:51:{
  did -h sock_disp 80
  did -h sock_disp 81
  did -r sock_disp 76,55,52
  did -r sock_disp 68 Script initialised
  if ($sock(testsock)) .sockclose testsock
  set %reponce 1
  unset %testvalue
  sockopen testsock %sckdisphost %sckdispport
}

on *:SOCKOPEN:testsock: {
  did -a sock_disp 68 Socket opened successfully
  sockwrite -nt $sockname $iif($did(sock_disp,28).state == 1,GET,POST) %sckdisppage HTTP/1.1
  sockwrite -nt $sockname Host: %sckdisphost
  $iif($did(sock_disp,40),sockwrite -nt $sockname User-Agent: $did(sock_disp,40))
  var %j = 1
  var %k = $did(sock_disp,88).lines
  while (%j <= %k) {   
    sockwrite -nt $sockname $did(sock_disp,88, [ $+ [ %j ] ] )
    inc %j
  }
  sockwrite -nt $sockname $crlf
  did -a sock_disp 68 Written data to socket: Host: %sckdisphost $+ , Page: %sckdisppage
}

on *:SOCKREAD:testsock: {
  if ($sockerr) {
    did -a sock_disp 68 SOCKET ERROR: $sockerr
    $iif(%testvalue != $null,did -v sock_disp 80,did -v sock_disp 81)
    halt
  }
  else {
    if (%reponce == 1) {
      did -a sock_disp 68 Socket read without errors.
      set %reponce 0
    }
    var %Quote
    sockread %Quote
    if (* $+ $did(sock_disp,64) $+ * iswm %Quote && $iif($did(sock_disp,66) != $null, * $+ $did(sock_disp,66) $+ *,sopdf324905pwreo3259435jjdsfmz) !iswm %Quote) {
      did -a sock_disp 68 Line found: %Quote
      did -ra sock_disp 52 %Quote
      did -ra sock_disp 55 %Quote
      set %changes $chr(37) $+ Quote
      if ($did(sock_disp,85).state == 1) { did -ar sock_disp 55 $nohtml($did(sock_disp,55)) | set %changes $chr(36) $+ nohtml( $+ %changes $+ ) }
      noop $regex($did(sock_disp,55),/ $+ $did(sock_disp,33) $+ (.*?) $+ $did(sock_disp,35) $+ /Si)
      if ($regml(1)) { did -ar sock_disp 55 $regml(1) }
      tokenize 44 $replace($did(sock_disp,31),0,@zeroŁ)
      if ($did(sock_disp,31) != $null) { did -ar sock_disp 55 $remove($did(sock_disp,16),$1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14) | set %changes $chr(36) $+ remove( $+ %changes $+ $iif($1,$chr(44) $+ $1) $+ $iif($2,$chr(44) $+ $2) $+ $iif($3,$chr(44) $+ $3) $+ $iif($4,$chr(44) $+ $4) $+ $iif($5,$chr(44) $+ $5) $+ $iif($6,$chr(44) $+ $6) $+ $iif($7,$chr(44) $+ $7) $+ $iif($8,$chr(44) $+ $8) $+ $iif($9,$chr(44) $+ $9) $+ $iif($10,$chr(44) $+ $10) $+ $iif($11,$chr(44) $+ $11) $+ $iif($12,$chr(44) $+ $12) $+ $iif($13,$chr(44) $+ $13) $+ $iif($14,$chr(44) $+ $14) $+ ) }
      tokenize 44 $replace($did(sock_disp,30),0,@zeroŁ)
      if ($did(sock_disp,30) != $null) { did -ar sock_disp 55 $replace($did(sock_disp,16),$1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14) | set %changes $chr(36) $+ replace( $+ %changes $+ $iif($1,$chr(44) $+ $1) $+ $iif($2,$chr(44) $+ $2) $+ $iif($3,$chr(44) $+ $3) $+ $iif($4,$chr(44) $+ $4) $+ $iif($5,$chr(44) $+ $5) $+ $iif($6,$chr(44) $+ $6) $+ $iif($7,$chr(44) $+ $7) $+ $iif($8,$chr(44) $+ $8) $+ $iif($9,$chr(44) $+ $9) $+ $iif($10,$chr(44) $+ $10) $+ $iif($11,$chr(44) $+ $11) $+ $iif($12,$chr(44) $+ $12) $+ $iif($13,$chr(44) $+ $13) $+ $iif($14,$chr(44) $+ $14) $+ ) }
      if ($did(sock_disp,25).state == 1) { did -ar sock_disp 55 $nohtml($did(sock_disp,16)) | set %changes $chr(36) $+ nohtml( $+ %changes $+ ) }
      if ($did(sock_disp,92) != $null) { did -ar sock_disp 55 $eval($replace($did(sock_disp,92),@LINE@,$did(sock_disp,55)),2) | set %changes $replace($did(sock_disp,92),@LINE@,%changes) }
      set %testvalue $eval($retchanges,2)
      did -ra sock_disp 55 %testvalue
      did -a sock_disp 68 $iif(%testvalue != $null,Data found: %testvalue,DATA NOT FOUND)
      $iif(%testvalue != $null,did -v sock_disp 80,did -v sock_disp 81)

      var %i = 1
      var %c = $did(sock_disp,48).lines
      while (%i <= %c) {   
        did -a sock_disp 56 $iif($did(sock_disp,91).state == 1,$chr(124) ECHO $chr(124) $+ >,< $+ $me $+ >) $replace($did(sock_disp,48, [ $+ [ %i ] ] ),@RESULT@,%testvalue)
        inc %i
      } 
      unset %reponce     
      sockclose testsock
    }
  }
}

on *:SOCKCLOSE:testsock: {
  did -a sock_disp 68 Socket closed successfully
  $iif(%testvalue != $null,did -v sock_disp 80,did -v sock_disp 81)

}

; TEST LINE SELECT
on *:dialog:sock_disp:sclick:68:{
  did -ar sock_disp 76 $did(68).seltext
}

; FAKE CHAT WINDOW SELECT
on *:dialog:sock_disp:sclick:56:{
  did -ar sock_disp 77 $did(56).seltext
}


; "USE LINE" BUTTON CLICK
on *:dialog:sock_disp:sclick:78:{
  did -ar sock_disp 13,16 $did(1).seltext
  did -fu sock_disp 6
}

;NEXT CLICK
on *:dialog:sock_disp:sclick:70:{
  did -fu sock_disp 37
}


; VIEW SCRIPT CLICK
on *:dialog:sock_disp:sclick:71:{
  run notepad.exe sctcreate.txt
}

; TO TEST CLICK
on *:dialog:sock_disp:sclick:82:{
  did -fu sock_disp 38
}


; VIEW IN BROWSER
on *:dialog:sock_disp:sclick:84:{
  if ($left($did(3),7) != http:// && $did(3) != $null) did -ar sock_disp 3 http:// $+ $did(3)
  $iif($did(3),run $did(3))
}

; SOCKCLOSE CLICK
on *:dialog:sock_disp:sclick:83:{
  if ($sock(testsock)) { .sockclose testsock | did -a sock_disp 68 Socket forced closed by user. }
}

; SOCKCLOSE CLICK
on *:dialog:sock_disp:sclick:18:{
  run SockCreator_readme.txt
}

Contacts & Credits  /  Contributers  /  Terms and Conditions  /  Our Logos  /  Statistics  /  Report Abuse  /  Our History  /  Advertise
Link to us:

Copyright © mIRC Scripting Network 1999-2010.
If you have found a bug, please send a pmsg to wiggle or tye (pmsg).
Page compiled in 0.316s.
44 visitors online (2 registered / 42 guests).
Using GZIP Compression.
You just ate 13.46 kb of our traffic.