rendered paste bodyAlias Switch {
window -pBhk0Cdoa +dLt @Switch -1 -1 1000 30
dll ktools.dll DockSwitchbar $window(@Switch).hwnd
$iif(!$hget(switch),hmake switch 100)
drawbut @Switch $rgb(101,132,167) $rgb(0,0,0) Runescape Tahoma 11 5 4
Switch.go
drawpic @Switch
window -a @Switch
}
Alias Icons { return $shortfn($scriptdirIcons\Icon Files\NeonBlue\ $+ ) }
Alias Unswitch { $iif($hget(switch),hfree switch) | window -c @switch }
Alias Drawbut {
;Syntax: /drawbut <window> <colour1> <colour2> <text> <textfont> <textsize> <x> <y>
drawrect -fnr $1 $2 1 $7 $8 $calc($width($4,$5,$6) + 20) $calc($height($4,$5,$6) + 10)
drawrect -nr $1 $3 1 $7 $8 $calc($width($4,$5,$6) + 20) $calc($height($4,$5,$6) + 10)
drawline -nr $1 $rgb(255,255,255) 1 $7 $8 $calc($calc($width($4,$5,$6) + 20) + $calc($7 - 1)) $8
drawline -nr $1 $rgb(255,255,255) 1 $7 $8 $7 $calc($calc($height($4,$5,$6) + 10) + $calc($8 - 1))
drawtext -cnr $1 $3 $5 $6 $calc($7 + 10) $calc($8 + 5) $calc($width($4,$5,$6) + 20) $calc($height($4,$5,$6) + 10) $4
}
Alias Switch.go {
var %c 1, %x 1
while (%c <= $scon(0)) {
hadd switch $scon(%c).network $scon(%c)
inc %c
}
}