Dream-Script — File Browser
Dream-Scriptv1.1a / Dream-Scriptv1.1a / Dream-Script_v1.1a / oppstatsfinal / switchbar / switchbar.ini
switchbar.ini — 30.38 KB — Download this file
[script]
n0=on *:load: { if ($version < 6.03) { echo -a * This addon was made for the latest version of mIRC (6.03) | echo -a * Please download the current mIRC version and try loading the addon again... | .timer 1 4 .unload -rs switchbar/switchbar.ini | halt } }
n1=on *:start: { .hmake newmsg 50 | .hmake switchbar 100 | if ($isfile(switchbar\switchbar.sys)) { hload -i switchbar switchbar\switchbar.sys } | .switchbar }
n2=on *:exit: { hsave -oi switchbar switchbar/switchbar.sys }
n3=on *:active:#: { mircustom SetIcon -w $window($active).hwnd $hdata(icon.channel) }
n4=on *:active:?: { mircustom SetIcon -w $window($active).hwnd $hdata(icon.query) }
n5=on *:ACTIVE:*:{
n6= if ($active == Status Window) { mircustom SetIcon -w $window($active).hwnd $hdata(icon.status) }
n7= if ($chr(61) isin $mid($active,1,40)) { mircustom SetIcon -w $window($active).hwnd $hdata(icon.DCC.Chat) }
n8= if ($chr(64) isin $mid($active,1,40)) { mircustom SetIcon -w $window($active).hwnd $hdata(icon.@windows) }
n9= if ($active = Channels List) { mircustom SetIcon -w $window($active).hwnd $hdata(icon.@chanlist) }
n10= if ($active = URL List) { mircustom SetIcon -w $window($active).hwnd $hdata(icon.@urllist) }
n11= if ($active = Notify List) { mircustom SetIcon -w $window($active).hwnd $hdata(icon.@notifylist) }
n12= if (get = $gettok($active,1,32) && $gettok($active,2,32)) { mircustom SetIcon -w $window($active).hwnd $hdata(icon.DCC.get) }
n13= if (send = $gettok($active,1,32) && $gettok($active,2,32)) { mircustom SetIcon -w $window($active).hwnd $hdata(icon.DCC.send) }
n14= .signal -n switchbar update
n15=}
n16=on *:disconnect:{ .signal -n SWITCHBAR update }
n17=on *:join:#:{ if ($nick == $me) { .signal -n SWITCHBAR update } }
n18=on *:part:#:{ if ($nick == $me) { .timer 1 50 .signal -n SWITCHBAR update } }
n19=on *:kick:#:{ if ($knick == $me) { .timer 1 50 .signal -n SWITCHBAR update } }
n20=on *:open:*:{ .timerupdate -m 1 500 .signal -n SWITCHBAR update }
n21=on *:close:*: { .timerupdate -m 1 100 .signal -n SWITCHBAR update }
n22=on *:connect:{ scid $activecid | .signal -n SWITCHBAR update }
n23=on *:filesent:*: { .signal -n SWITCHBAR update }
n24=on *:filercvd:*: { .signal -n SWITCHBAR update }
n25=on *:sendfail:*: { .signal -n SWITCHBAR update }
n26=on *:getfail:*: { .signal -n SWITCHBAR update }
n27=ctcp :*:*:*: { if ($1 == dcc) { .timer 1 1 .signal -n switchbar update | return } }
n28=on *:text:*:?: { if ($active != $nick) && ($hget(newmsg,$+($server,-,$nick)) != $true) { $iif($hdata(highlight) == $true,highlight.query) } | else { halt } }
n29=on *:text:*:#: { if ($active != $chan) && ($hget(newmsg,$+($server,-,$chan)) != $true) { $iif($hdata(highlight) == $true,highlight.chan) } | else { halt } }
n30=on *:chat:*: { if ($active != =$nick) && ($hget(newmsg,$+($server,-,=$nick)) != $true) { $iif($hdata(highlight) == $true,highlight.chat) } | else { halt } }
n31=on *:signal:SWITCHBAR: { if ($dialog(switchbar)) { if ($1- == update) { updateswitchbar } } }
n32=alias highlight.query { hadd -m newmsg $+($server,-,$nick) $true | .signal -n SWITCHBAR update }
n33=alias highlight.chan { hadd -m newmsg $+($server,-,$chan) $true | .signal -n SWITCHBAR update }
n34=alias highlight.chat { hadd -m newmsg $+($server,-,=$nick) $true | .timerupdate -m 1 50 .signal -n SWITCHBAR update }
n35=alias list { list $1- | .timerupate -m 1 1000 .signal -n switchbar update | mircustom SetIcon -w $window($active).hwnd $hdata(icon.@chanlist) }
n36=
n37=alias -l dir1 { $iif($1,return $+($scriptdir,$1)) }
n38=alias -l dlldir { $iif($1,return $dir1($+(archive\dll\,$1))) }
n39=alias -l mdx { dll $+(",$dlldir(mdx.dll),") $$1- }
n40=alias -l mircustom { dll $+(",$dlldir(mircustom.dll),") $$1- }
n41=alias -l bars { return $dlldir(bars.mdx) }
n42=alias -l views { return $dlldir(views.mdx) }
n43=alias -l ktools { dll $+(",$dlldir(ktools.dll),") $$1- }
n44=alias -l pdll { return $dlldir(Popups.dll) }
n45=alias -l popups { return $dll($pdll,$1,$2-) }
n46=alias -l icons { return $+(",switchbar\archive\icons\*.ico,") }
n47=alias -l pop tokenize 32 $dll($pdll,Popup,$1-) | if ($isid) return $1- | $iif($4- != did not select a menu item,$4-)
n48=alias -l hash.refresh { hsave -oi switchbar switchbar\switchbar.sys }
n49=
n50=alias switchbar { if (!$dialog(switchbar)) { dialog -mh switchbar switchbar } | else { dialog -c switchbar } }
n51=alias _s.editor { if (!$dialog(editor)) { dialog -md editor editor } | else { dialog -x editor editor } }
n52=alias -l hdata { return $hget(switchbar, $+ $1 $+ ) }
n53=alias -l up.case { return $upper($mid($1-,1,1)) $+ $mid($1-,2,$len($1-)) }
n54=alias query { .query $$1 | .signal -n SWITCHBAR update }
n55=alias dcc { .dcc $1- | if ($1 == Send) || ($1 == chat) { .timer -m 1 100 .signal -n SWITCHBAR update } }
n56=alias close { .close $1- | .signal -n SWITCHBAR update }
n57=alias -l multi-serv { var %x $$?"Enter Server" | server -m %x }
n58=alias dopopup {
n59= if ($1 == list) { switch.pop | pop server.pop $mouse.dx $mouse.dy }
n60= if ($1 == shift-click) { shift-click.pop | pop shift-click.pop $mouse.dx $mouse.dy | .signal -n switchbar update }
n61=}
n62=alias sbar {
n63= if ($1 = $null) { halt }
n64= if ($1 = position) { var %pos = $gettok($readini(mirc.ini,Options,n4),21,44),%pos.1 = $iif(%pos == 0 || %pos == 1,1,0) | hadd -m switchbar position %pos.1 }
n65= if ($1 = width) { return $gettok($readini(mirc.ini,options,n5),32,44) }
n66= if ($1 = height) { return $gettok($readini(mirc.ini,options,n5),24,44) }
n67= if ($1 = move) { if ($hdata(position) == 0) { mdx MoveControl switchbar 1 2 22 $sbar(width) $window(-2).h | did -h switchbar 3 | did -v switchbar 2 } | elseif ($hdata(position) == 1) { mdx MoveControl switchbar 1 17 2 $window(-2).w 25 | did -h switchbar 2 | did -v switchbar 3 } }
n68=}
n69=
n70=alias -l switchbar.edit {
n71= if ($dialog(editor)) {
n72= var %d = $dname | did -r %d 2 | did -i %d 2 1 clearicons normal
n73= did -i %d 2 1 seticon normal 0 $hdata(icon.status) | did -i %d 2 1 seticon normal 0 $hdata(icon.channel) | did -i %d 2 1 seticon normal 0 $hdata(icon.query) | did -i %d 2 1 seticon normal 0 $hdata(icon.@windows) | did -i %d 2 1 seticon normal 0 $hdata(icon.DCC.send) | did -i %d 2 1 seticon normal 0 $hdata(icon.DCC.get) | did -i %d 2 1 seticon normal 0 $hdata(icon.DCC.chat) | did -i %d 2 1 seticon normal 0 $hdata(icon.@chanlist) | did -i %d 2 1 seticon normal 0 $hdata(icon.@urllist) | did -i %d 2 1 seticon normal 0 $hdata(icon.@notifylist) | did -i %d 2 1 seticon normal 0 $hdata(highlight.chan) | did -i %d 2 1 seticon normal 0 $hdata(highlight.query) | did -i %d 2 1 seticon normal 0 $hdata(highlight.chat) | did -i %d 2 1 seticon normal 0 $hdata(icon.fserv)
n74= did -a %d 2 + 1 1 Status $chr(9) $hdata(icon.status) | did -a %d 2 + 2 2 Channel $chr(9) $hdata(icon.channel) | did -a %d 2 + 3 3 Query $chr(9) $hdata(icon.query) | did -a %d 2 + 14 14 FServ $chr(9) $hdata(icon.fserv) | did -a %d 2 + 5 5 DCC.Send $chr(9) $hdata(icon.DCC.send) | did -a %d 2 + 6 6 DCC.Get $chr(9) $hdata(icon.DCC.get) | did -a %d 2 + 7 7 DCC.Chat $chr(9) $hdata(icon.DCC.chat) | did -a %d 2 + 4 4 @Windows $chr(9) $hdata(icon.@windows) | did -a %d 2 + 8 8 @Chanlist $chr(9) $hdata(icon.@chanlist) | did -a %d 2 + 10 10 @Notifylist $chr(9) $hdata(icon.@notifylist) | did -a %d 2 + 9 9 @URLlist $chr(9) $hdata(icon.@urllist) | did -a %d 2 + 11 11 Highlight.chan $chr(9) $hdata(highlight.chan)
n75= did -a %d 2 + 12 12 Highlight.query $chr(9) $hdata(highlight.query) | did -a %d 2 + 13 13 Highlight.chat $chr(9) $hdata(highlight.chat)
n76= }
n77=}
n78=
n79=alias -l load.preview.switch {
n80= if ($dialog(editor)) {
n81= var %d = $dname | did -r %d 16 | mdx SetColor %d 16 background reset | did -i %d 16 1 setbkg none | mdx SetControlMDX %d 16 toolbar $iif($hdata(flat.buttons) == $true,flat) list nodivider arrows > $bars
n82= if ($hdata(custom.font) == $true) { mdx SetFont %d 16 $+(+,$iif($hdata(font.style) == italic || $hdata(font.style) == bold/italic,i),$iif($hdata(font.underline) == $true,u),$iif($hdata(font.strikeout) == $true,s)) $+(-,$hdata(font.size)) $iif($hdata(font.style) == Bold || $hdata(font.style) == Bold/Italic,900,90) $hdata(font) }
n83= if ($hdata(background) == $true) { if ($hdata(background.col) == $true) { mdx SetColor %d 16 background $hdata(background.color) } | if ($hdata(background.image) == $true) { did -i %d 16 1 setbkg $hdata(background.image.style) $hdata(background.image.file) } }
n84= did -i %d 16 1 bmpsize 16 16 | if ($hdata(autosize) != $true) did -i %d 16 1 bwidth $hdata(button.size) $hdata(button.size)
n85= did -i %d 16 1 setimage +nhd 0 icon small 10, $+ $hdata(switch.server) | did -i %d 16 1 setimage +nhd 0 icon small $hdata(icon.status) | did -i %d 16 1 setimage +nhd 0 icon small $hdata(icon.channel) | did -i %d 16 1 setimage +nhd 0 icon small $hdata(icon.query) | did -i %d 16 1 setimage +nhd 0 icon small $hdata(icon.@windows) | did -i %d 16 1 setimage +nhd 0 icon small $hdata(highlight.chan)
n86= did -a %d 16 +W 12 1 | did -a %d 16 +cg $+ $iif($hdata(autosize) == $true,a,W $hdata(button.size)) 2 Status | did -a %d 16 $+(+cg,$iif($hdata(highlight) == $true && $hdata(highlight.type) == button,i),$iif($hdata(autosize) == $true,a,W $hdata(button.size))) $iif($hdata(highlight) == $true && $hdata(highlight.type) == icon,6,3) Channel | did -a %d 16 +cg $+ $iif($hdata(autosize) == $true,a,W $hdata(button.size)) 4 Jynx | did -a %d 16 +cg $+ $iif($hdata(autosize) == $true,a,W $hdata(button.size)) 5 @Window
n87= }
n88=}
n89=
n90=dialog editor {
n91= title "Switchbar Editor [_S.Editor]"
n92= size -1 -1 176 128
n93= option dbu
n94= icon archive\icons\config2.ico, 0
n95= box "", 14, 1 111 175 4
n96= list 16, 2 99 171 0, size
n97= button "&Apply", 17, 113 117 30 10
n98= button "&Close", 18, 145 117 30 10, cancel
n99= tab "Icons", 21, 1 0 173 95
n100= list 2, 6 19 164 61, group tab 21 size
n101= box "", 1, 4 14 168 68, group tab 21
n102= text "", 5, 7 84 51 8, tab 21
n103= edit "", 6, 60 83 101 10, disable tab 21 autohs
n104= button "!", 20, 162 83 9 9, tab 21
n105= tab "Options", 22
n106= box "", 3, 4 14 168 79, tab 22
n107= check "Query(s)", 24, 15 37 32 8, tab 22 flat
n108= radio "Show All Features...", 4, 6 19 72 8, tab 22 flat
n109= radio "Show Select Features ...", 29, 6 27 73 8, tab 22 flat
n110= check "Dcc Chat(s)", 25, 15 48 39 8, tab 22 flat
n111= check "Active Transfers", 26, 15 59 51 8, tab 22 flat
n112= check "@Windows", 28, 15 70 38 8, tab 22 flat
n113= check "Chan/Notify/Url List", 30, 15 80 63 8, tab 22 flat
n114= check "Highlight", 7, 85 20 35 8, tab 22 flat
n115= check "Auto-Size", 10, 85 30 35 8, tab 22 flat
n116= text "Size:", 12, 98 38 27 8, tab 22 right
n117= edit "", 13, 126 37 44 10, tab 22 autohs center
n118= check "Flat Buttons", 11, 85 47 40 8, tab 22 flat
n119= box "", 33, 81 19 1 70, tab 22
n120= edit "", 15, 126 57 44 10, tab 22 center
n121= text "Size:", 27, 96 69 29 8, tab 22 right
n122= edit "", 31, 126 68 13 10, tab 22 center
n123= check "Custom Font", 32, 85 58 40 8, tab 22 flat
n124= check "Underline", 50, 94 80 34 8, tab 22 flat
n125= check "Strikeout", 9, 133 79 36 10, tab 22 flat
n126= combo 49, 139 68 31 27, drop tab 22
n127= combo 8, 126 19 44 24, drop tab 22
n128= tab "Background", 23
n129= box "", 35, 4 14 168 79, tab 23
n130= check "Use Background", 36, 7 20 57 8, tab 23 flat
n131= radio "Colour", 37, 15 30 30 8, tab 23 flat
n132= list 39, 121 39 48 17, tab 23 size
n133= list 40, 28 39 93 9, tab 23 size
n134= list 41, 28 48 93 9, tab 23 size
n135= text "R", 43, 20 40 7 8, tab 23 center
n136= edit "", 46, 121 56 48 10, disable tab 23 center
n137= radio "Image (Only Works On The Top/Bottom Of Mirc Window)", 38, 15 70 145 8, tab 23 flat
n138= edit "", 47, 20 79 73 10, disable tab 23
n139= button "&Browse", 48, 94 79 31 9, tab 23
n140= text "G", 44, 20 49 7 8, tab 23 center
n141= text "B", 45, 20 58 7 8, tab 23 center
n142= list 42, 28 57 93 9, tab 23 size
n143= combo 34, 128 79 41 50, tab 23 sort drop
n144=}
n145=
n146=on *:dialog:editor:*:*:{
n147= var %d = $dname
n148= if ($devent == init) {
n149= mdx SetMircVersion $version | mdx MarkDialog %d | mdx SetControlMDX %d 2 ListView report oneclick rowselect > $views | mdx SetBorderStyle %d 2 staticedge | mdx SetBorderStyle %d 16,40,41,42 windowedge | mdx SetFont %d 1,2,4,6,7,8,9,10,11,12,13,14,15,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,50 +a Default -10 90 Tahoma | mdx SetFont %d 3,5,46 +a Default -10 900 Tahoma
n150= mdx SetControlMDX %d 40,41,42 TrackBar > $bars | did -i %d 40,41,42 1 params 0 0 255 1 1 * * 10 | did -i %d 2 1 headerdims 110 200 | did -i %d 2 1 headertext Window $chr(9) Icon Path | didtok %d 34 32 Center Stretch Tile | didtok %d 8 32 Button Icon | didtok %d 49 44 Regular,Italic,Bold,Bold/Italic | if (!$hget(switchbar)) .hmake switchbar 50 | if ($isfile(switchbar\switchbar.sys)) { hload -i switchbar switchbar\switchbar.sys } | switchbar.edit | load.preview.switch
n151= }
n152= if ($devent == sclick) {
n153= if ($did == 2) { did -ra $dname 5 $gettok($did(2).seltext,6,32) : | did -ra $dname 6 $hdata($+(icon.,$gettok($did(2).seltext,6,32))) }
n154= if ($did == 4) { if ($did(4).state == 1) { var %x switchbar | hadd -m %x show.all $true | hadd -m %x show.query $true | hadd -m %x show.chat $true | hadd -m %x show.transfers $true | hadd -m %x show.@window $true | hadd -m %x show.chan-not-url $true | did -bc %d 24,25,26,28,30 } }
n155= if ($did == 7) { if ($did(7).state == 1) { hadd -m switchbar highlight $true } | else { hdel switchbar highlight } }
n156= if ($did == 8) { if ($did(8).seltext == button) { hadd -m switchbar highlight.type button } | else { hadd -m switchbar highlight.type icon } }
n157= if ($did == 9) { if ($did(9).state == 1) { hadd -m switchbar font.strikeout $true } | else { hdel switchbar font.strikeout } }
n158= if ($did == 10) { if ($did(10).state == 1) { hadd -m switchbar autosize $true | did -b %d 12,13 } | else { hdel switchbar autosize | did -e %d 12,13 } }
n159= if ($did == 11) { if ($did(11).state == 1) { hadd -m switchbar flat.buttons $true } | else { hdel switchbar flat.buttons } | mdx SetMDXStyle %d 16 toolbar $iif($hdata(flat.buttons) == $true,flat) list nodivider arrows }
n160= if ($did == 16) { if ($did(16).sel == 2) { load.preview.switch } }
n161= if ($did == 17) { hash.refresh | load.preview.switch | switchbar.edit | dialog -c switchbar switchbar | dialog -m switchbar switchbar }
n162= if ($did == 18) { hash.refresh }
n163= if ($did == 20) { var %icon.type $icons , %icon.location = $file="Choose An Icon" %icon.type | if ($right(%icon.location,4) == .ico) { did -ra %d 6 $remove(%icon.location,$mircdir) | hadd -m switchbar $+(icon.,$gettok($did(5).text,1,$asc(:))) $remove(%icon.location,$mircdir) } | switchbar.edit | load.preview.switch }
n164= if ($did == 22) {
n165= if ($hdata(show.query) == $true) { did -c %d 24 } | if ($hdata(show.chat) == $true) { did -c %d 25 } | if ($hdata(show.transfers) == $true) { did -c %d 26 } | if ($hdata(show.@window) == $true) { did -c %d 28 } | if ($hdata(show.chan-not-url) == $true) { did -c %d 30 } | if ($hdata(show.all)) { did -c %d 4 | did -bc %d 24,25,26,28,30 } | elseif ($hget(swithbar,show.all) != $true) { did -c %d 29 }
n166= if ($hdata(highlight) != $null) { did -c %d 7 } | if ($hdata(highlight.type) == button) { did -c editor 8 1 } | if ($hdata(highlight.type)) { did -c editor 8 2 } | if ($hdata(autosize) == $true) { did -c %d 10 | did -b %d 12,13 } | if ($hdata(flat.buttons) == $true) { did -c %d 11 } | if ($hdata(button.size) != $null) { did -ra %d 13 $hdata(button.size) } | if ($hdata(custom.font) == $true) { did -c %d 32 } | else { did -b %d 15,31,27,50,49,9 } | if ($hdata(font) != $null) { did -ra %d 15 $hdata(font) } | if ($hdata(font.size) != $null) { did -ra %d 31 $hdata(font.size) }
n167= if ($hdata(font.style) != $null) { var %x = $hdata(font.style) | if (%x == regular) { did -c %d 49 1 } | if (%x == italic) { did -c %d 49 2 } | if (%x == bold) { did -c %d 49 3 } | if (%x == bold/italic) { did -c %d 49 4 } } | if ($hdata(font.underline) == $true) { did -c %d 50 } | if ($hdata(font.strikeout) == $true) { did -c %d 9 }
n168= }
n169= if ($did == 23) {
n170= if ($hdata(background) == $true) { did -c %d 36 } | if ($hdata(background.col) == $true) { did -c %d 37 } | if ($hdata(background.image) == $true) { did -c %d 38 } | if ($hdata(background.color) != $null) { did -ra %d 46 $hdata(background.color) } | mdx SetColor %d 39 background $hdata(background.color)
n171= if (center isin $hdata(background.image.style)) { did -c %d 34 1 } | elseif (stretch isin $hdata(background.image.style)) { did -c %d 34 2 } | elseif (tile isin $hdata(background.image.style)) { did -c %d 34 3 } | else { did -c %d 34 0 } | if ($hdata(background.image.file) != $null) { did -ra %d 47 $hdata(background.image.file) }
n172= }
n173= if ($did == 24) { if ($did(24).state == 1) { hadd -m switchbar show.query $true } | else { hdel switchbar show.query } }
n174= if ($did == 25) { if ($did(25).state == 1) { hadd -m switchbar show.chat $true } | else { hdel switchbar show.chat } }
n175= if ($did == 26) { if ($did(26).state == 1) { hadd -m switchbar show.transfers $true } | else { hdel switchbar show.transfers } }
n176= if ($did == 28) { if ($did(28).state == 1) { hadd -m switchbar show.@window $true } | else { hdel switchbar show.@window } }
n177= if ($did == 29) { hdel switchbar show.all | did -e %d 24,25,26,28,30 }
n178= if ($did == 30) { if ($did(30).state == 1) { hadd -m switchbar show.chan-not-url $true } | else { hdel switchbar show.chan-not-url } }
n179= if ($did == 32) { if ($did(32).state == 1) { hadd -m switchbar custom.font $true | did -e %d 15,31,27,50,49,9 } | else { hdel switchbar custom.font | did -b %d 15,31,27,50,49,9 } }
n180= if ($did == 34) { hadd -m switchbar background.image.style $did(34).seltext }
n181= if ($did == 36) { if ($did(36).state == 1) { hadd -m switchbar background $true } | else { hdel switchbar background } }
n182= if ($did == 37) { if ($did(37).state == 1) { hadd -m switchbar background.col $true | hdel switchbar background.image } | else { hdel switchbar background.col } }
n183= if ($did == 38) { if ($did(38).state == 1) { hadd -m switchbar background.image $true | hdel switchbar background.col } | else { hdel switchbar background.image } }
n184= if ($did == 40) || ($did == 41) || ($did == 42) {
n185= var %colorsel = $rgb($gettok($did(40,1),1,32),$gettok($did(41,1),1,32),$gettok($did(42,1),1,32))
n186= mdx SetColor %d 39 background $rgb($gettok($did(40,1),1,32),$gettok($did(41,1),1,32),$gettok($did(42,1),1,32))
n187= did -ra %d 46 $gettok($did(40,1),1,32) $+ , $+ $gettok($did(41,1),1,32) $+ , $+ $gettok($did(42,1),1,32)
n188= hadd -m switchbar background.color $rgb($gettok($did(40,1),1,32) $+ , $+ $gettok($did(41,1),1,32) $+ , $+ $gettok($did(42,1),1,32))
n189= }
n190= if ($did == 48) { var %file.type *.bmp , %file.location = $file="Choose A Background Image..." %file.type | if ($right(%file.location,4) == .bmp) { did -ra %d 47 $remove(%file.location,$mircdir) | hadd -m switchbar background.image.file $remove(%file.location,$mircdir) } }
n191= if ($did == 49) { hadd -m switchbar font.style $did(49).seltext }
n192= if ($did == 50) { if ($did(50).state == 1) { hadd -m switchbar font.underline $true } | else { hdel switchbar font.underline } }
n193= }
n194= if ($devent == edit) {
n195= if ($did == 13) { hadd -m switchbar button.size $did(13).text }
n196= if ($did == 15) { hadd -m switchbar font $did(15).text }
n197= if ($did == 31) { hadd -m switchbar font.size $did(31).text }
n198= }
n199=}
n200=
n201=dialog switchbar {
n202= size 0 0 $window(-2).w $window(-2).h
n203= title "switchbar"
n204= list 1,1 2 $window(-2).w 16 ,size
n205= list 2,1 3 $calc($sbar(width) - 4) 8 ,size
n206= list 3,2 2 13 16 ,size
n207=}
n208=
n209=on *:dialog:switchbar:*:*: {
n210= if ($devent == init) {
n211= mdx SetMircVersion $version | mdx MarkDialog $dname | mdx SetControlMDX switchbar 1 toolbar $iif($hdata(flat.buttons) == $true,flat) nodivider list wrap > $bars | mdx SetControlMDX switchbar 2 toolbar arrows $iif($hdata(flat.buttons) == $true,flat) nodivider > $bars | mdx SetControlMDX switchbar 3 toolbar list arrows $iif($hdata(flat.buttons) == $true,flat) nodivider > $bars
n212= if ($hdata(custom.font) == $true) { mdx SetFont switchbar 1 $+(+,$iif($hdata(font.style) == italic || $hdata(font.style) == bold/italic,i),$iif($hdata(font.underline) == $true,u),$iif($hdata(font.strikeout) == $true,s)) $+(-,$hdata(font.size)) $iif($hdata(font.style) == Bold || $hdata(font.style) == Bold/Italic,900,90) $hdata(font) } | mdx SetDialog switchbar style tool | mdx SetBorderStyle switchbar 1,2,3,4 windowedge
n213= if ($hdata(background) == $true) { if ($hdata(background.col) == $true) { mdx SetDialog switchbar bgcolor $hdata(background.color) | mdx SetColor switchbar 1,2,3 background $hdata(background.color) } | if ($hdata(background.image) == $true) { did -i switchbar 1,2,3 1 setbkg $hdata(background.image.style) $hdata(background.image.file) } } | ktools DockSwitchbar $dialog(switchbar).hwnd
n214= did -i switchbar 1 1 bmpsize 16 16 | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(icon.status) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(icon.channel) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(icon.query) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(icon.@windows) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(icon.DCC.chat) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(icon.DCC.send) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(icon.DCC.get) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(highlight.chan) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(highlight.query) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(highlight.chat)
n215= did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(icon.@chanlist) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(icon.@urllist) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(icon.@notifylist) | did -i switchbar 1 1 setimage +nhd 0 icon small $hdata(icon.fserv) | did -i switchbar 1 1 bwidth $hdata(button.size) $hdata(button.size)
n216= did -i switchbar 2 1 bmpsize 8 8 | did -i switchbar 2 1 pad 4 10 | did -i switchbar 2 1 setimage +nhd 0 icon small 15, $+ $hdata(switch.server) | did -a switchbar 2 +W $calc($sbar(width) - 4) 1 $chr(9) Server List
n217= did -i switchbar 3 1 bmpsize 16 16 | did -i switchbar 3 1 setimage +nhd 0 icon small 10, $+ $hdata(switch.server) | did -a switchbar 3 +W 12 1 Server $chr(9) Server List
n218= .scid $activecid window $iif(x !isin $gettok(%t,1,32),-a,-n) "status window"
n219= .signal -n switchbar update
n220= .timer 0 10 .signal -n switcbar update
n221= }
n222= if ($devent == sclick) {
n223= var %t = $did(1).seltext,%window = $gettok(%t,5-,32),%window.x = $gettok(%t,6-,32),%cid1 = $gettok(%t,6,32),%window2 = $iif($numtok(%window,32) > 1,$+(",$iif(channels isin %t || notify isin %t || url isin %t,%window.x,%window),"),$iif(channels isin %t || notify isin %t || url isin %t,%window.x,%window))
n224= if ($did == 1) { if ($mouse.key != 4) { if ($did(1).sel == 2) { .scid $activecid window $iif(x isin $gettok(%t,1,32),-n,-a) %window2 } | else { scid $activecid window $iif(x isin $gettok(%t,1,32),-n,-a) %window2 | hdel newmsg $+($server,-,%window2) } | .signal switchbar update } | else { $dopopup(shift-click) } }
n225= if ($did == 2) || ($did == 3) { if ($did(2).sel = 2) || ($did(3).sel = 2) { $dopopup(list) | .signal -n switchbar update } }
n226= }
n227=}
n228=
n229=alias updateswitchbar {
n230= did -r switchbar 1 | sbar position | sbar move | scid $activecid
n231= mdx SetMDXStyle switchbar 1 toolbar $iif($hdata(flat.buttons) == $true,flat) list nodivider arrows
n232= if ($hdata(position) == 0) { did -i switchbar 1 1 bwidth $calc($sbar(width) - 4) $calc($sbar(width) - 4) }
n233= if ($hdata(position) == 1) { did -i switchbar 1 1 bwidth $hdata(button.size) $hdata(button.size) }
n234= did -a switchbar 1 $+(+,$iif($hdata(position) == 0,w),$iif($active = Status Window && $window($active).state != minimized,x),$iif($hdata(autosize) == $true,a)) 1 $iif($server,$up.case($network),Disconnected) $chr(9) Status Window
n235= if ($window(Channels List)) && ($window(Channels List).cid == $cid) { if ($hdata(show.chan-not-url) == $true) { did -a switchbar 1 $+(+,$iif($hdata(position) == 0,w),$iif($active = $window(Channels List) && $window($active).state != minimized,x),$iif($hdata(autosize) == $true,a)) 11 $window(Channels List) $chr(9) Channels List } }
n236= if ($chan(0)) { haltdef }
n237= var %x = 1 | while (%x <= $chan(0)) { if ($chan(%x).cid == $cid) { did -a switchbar 1 $+(+,$iif($hdata(position) == 0,w),$iif($active == $chan(%x) && $window($active).state != minimized,x),$iif($hdata(highlight) == $true && $hdata(highlight.type) == button && $hget(newmsg,$+($server,-,$chan(%x))) == $true,i),$iif($hdata(autosize) == $true,a)) $iif($hdata(highlight) == $true && $hdata(highlight.type) == icon && $hget(newmsg,$+($server,-,$chan(%x))) == $true,8,2) $chan(%x) $chr(9) $chan(%x) | inc %x } }
n238= if ($query(0)) { haltdef }
n239= if ($hdata(show.query) == $true) { var %x = 1 | while (%x <= $query(0)) { if ($query(%x).cid == $cid) { did -a switchbar 1 $+(+,$iif($hdata(position) == 0,w),$iif($active == $query(%x) && $window($active).state != minimized,x),$iif($hdata(highlight) == $true && $hdata(highlight.type) == button && $hget(newmsg,$+($server,-,$query(%x))) == $true,i),$iif($hdata(autosize) == $true,a)) $iif($hdata(highlight) == $true && $hdata(highlight.type) == icon && $hget(newmsg,$+($server,-,$query(%x))) == $true,9,3) $query(%x) $chr(9) $query(%x) | inc %x } } }
n240= if ($fserv(0)) { haltdef }
n241= if ($hdata(show.transfers) == $true) { var %x = 1 | while (%x <= $fserv(0)) { if ($fserv(%x).cid == $cid) { did -a switchbar 1 $+(+,$iif($hdata(position) == 0,w),$iif($active == $+(=,$fserv(%x)) && $window($active).state != minimized,x),$iif($hdata(autosize) == $true,a)) 14 $fserv(%x) $chr(9) $+(=,$fserv(%x)) | inc %x } } }
n242= if ($chat(0)) { haltdef }
n243= if ($hdata(show.chat) == $true) { var %x = 1 | while (%x <= $chat(0)) { if ($chat(%x).cid == $cid) { did -a switchbar 1 $+(+,$iif($hdata(position) == 0,w),$iif($active == $+(=,$chat(%x)) && $window($active).state != minimized,x),$iif($hdata(highlight) == $true && $hdata(highlight.type) == button && $hget(newmsg,$+($server,-,=,$chat(%x))) == $true,i),$iif($hdata(autosize) == $true,a)) $iif($hdata(highlight) == $true && $hdata(highlight.type) == icon && $hget(newmsg,$+($server,-,=,$chat(%x))) == $true,10,5) $chat(%x) $chr(9) $+(=,$chat(%x)) | inc %x } } }
n244= if ($get(0)) { haltdef }
n245= if ($hdata(show.transfers) == $true) { var %x = 1 | while (%x <= $get(0)) { if ($get(%x).cid == $cid) { did -a switchbar 1 $+(+,$iif($hdata(position) == 0,w),$iif($active == Get $get(%x) $get(%x).file && $window($active).state != minimized,x),$iif($hdata(autosize) == $true,a)) 6 $get(%x) $chr(9) Get $get(%x) $get(%x).file | inc %x } } }
n246= if ($send(0)) { haltdef }
n247= if ($hdata(show.transfers) == $true) { var %x = 1 | while (%x <= $send(0)) { if ($send(%x).cid == $cid) { did -a switchbar 1 $+(+,$iif($hdata(position) == 0,w),$iif($active == Send $send(%x) $send(%x).file && $window($active).state != minimized,x),$iif($hdata(autosize) == $true,a)) 7 $send(%x) $chr(9) Send $send(%x) $send(%x).file | inc %x } } }
n248= scid -r
n249= if ($window(0)) || ($window(Url List)) || ($window(Notify List)) { haltdef }
n250= if ($hdata(show.@window) == $true) { var %x = 1 | while (%x <= $window(0)) { if ($window(%c).state != hidden) { did -a switchbar 1 $+(+,$iif($hdata(position) == 0,w),$iif($active = $window(%x) && $window($active).state != minimized,x),$iif($hdata(autosize) == $true,a)) 4 $window(%x) $chr(9) $window(%x) } | inc %x } }
n251= if ($window(Notify List)) { if ($hdata(show.chan-not-url) == $true) { did -a switchbar 1 $+(+,$iif($hdata(position) == 0,w),$iif($active = $window(Notify List) && $window($active).state != minimized,x),$iif($hdata(autosize) == $true,a)) 13 $window(Notify List) $chr(9) Notify List } }
n252= if ($window(URL List)) { if ($hdata(show.chan-not-url) == $true) { did -a switchbar 1 $+(+,$iif($hdata(position) == 0,w),$iif($active = $window(URL List) && $window($active).state != minimized,x),$iif($hdata(autosize) == $true,a)) 12 $window(URL List) $chr(9) URL List } }
n253=}
n254=
n255=alias shift-click.pop {
n256= var %t = $did(1).seltext,%window = $gettok(%t,5-,32),%window.x = $gettok(%t,6-,32),%cid1 = $gettok(%t,6,32),%window2 = $iif($numtok(%window,32) > 1,$+(",$iif(channels isin %t || notify isin %t || url isin %t,%window.x,%window),"),$iif(channels isin %t || notify isin %t || url isin %t,%window.x,%window))
n257= popups New shift-click.pop 16 16
n258= popups LoadImg shift-click.pop icon small $hdata(icon.close) | popups LoadImg shift-click.pop icon small $hdata(icon.maximize) | popups LoadImg shift-click.pop icon small $hdata(icon.minimize) | popups LoadImg shift-click.pop icon small $hdata(icon.restore)
n259= popups AddItem shift-click.pop end $iif($window($remove(%window2,")).state == normal,+d) 4 Restore $cr window -r %window2 | popups AddItem shift-click.pop end $iif($window($remove(%window2,")).state == minimized,+d) 3 Minimize $cr window -n %window2 | popups AddItem shift-click.pop end $iif($window($remove(%window2,")).state == maximized,+d) 2 Maximize $cr window -x %window2 | popups AddItem shift-click.pop end + | popups AddItem shift-click.pop end + 1 Close $cr window -c %window2
n260=}
n261=
n262=alias switch.pop {
n263= popups New server.pop 16 16 | popups LoadImg server.pop icon small $hdata(icon.true) | popups LoadImg server.pop icon small $hdata(icon.false)
n264= var %c = 1 | while %c <= $scon(0) { popups AddItem server.pop end $+(+,$iif($scon(%c) == $activecid && $scon(0) > 1,D)) 1 $iif($scon(%c).network && $scon(%c).server,$up.case($scon(%c).network),$iif($scon(%c).server,$scon(%c).server,Disconnected)) $cr scon %c window -a "Status Window" | inc %c }
n265= popups AddItem server.pop end + | popups AddItem server.pop end + 2 New Server... $cr multi-serv
n266=}
n267=
n268=menu channel,nicklist,menubar,status,query {
n269= .OPPStats v3.2
n270= ..Switchbar
n271= ...$iif($dialog(switchbar),Close,Open): /switchbar
n272= ...Switch Editor: /_s.editor
n273= ...ReadMe:/run readme.txt
n274= ...-
n275= ...Unload: /unload -rs switchbar\switchbar.ini
n276=}