SMF Script 8 — File Browser
SMFScript8v8.13 / SMFScript8v8.13 / system / schemes.mrc
schemes.mrc — 8.49 KB — Download this file
alias col.sets.main col.sets.make | dialog -mn Schemes Schemes | did -ac Schemes 4 Script's Current | .timerSCHEME 0 1 col.sets.dlg.chk | :loop | inc %col.sets.fnd.num | set %col.sets.fnd $findfile($mircdir,*.smf,%col.sets.fnd.num) | if (%col.sets.fnd) { if ($readini %col.sets.fnd file info = scheme) did -a Schemes 4 $remove($nopath(%col.sets.fnd),.smf) | goto loop } | set %scheme.file Script's Current | unset %col.sets.fn* | .remove colsets.bmp
dialog Schemes {
title "Color Schemes"
size -1 -1 425 420
button "Cancel" 1, 270 390 69 23, cancel
icon 2,13 38 399 339,colsets.bmp
text "Scheme:" 3,13 13 41 13
combo 4,65 10 268 300,drop,default
button "Save As.." 5, 342 9 69 23
button "OK" 6, 195 390 69 23
button "Apply" 7, 344 390 69 23
}
on *:dialog:schemes:sclick:*:{
if ($did = 4) { if ($did(4,$did(4).sel) = Script's Current) { col.sets.make | did -g schemes 2 colsets.bmp | .remove colsets.bmp | set %scheme.file Script's Current | return } | set %col.sets.tmp $did(4,$did(4).sel) $+ .smf | set %scheme.file $findfile($mircdir,%col.sets.tmp,1) | if (%scheme.file = $null) { echo $colour(info) -a ERROR file not found | unset %col.set* | return } | if ($readini %scheme.file file info != scheme) { echo $colour(info) -a ERROR: not a scheme file | unset %scheme.file | return } | set %scheme.file $qts(%scheme.file) | set %col.sets.cont $readini %scheme.file file cont | col.sets.make file | unset %col.sets.* | did -g schemes 2 colsets.bmp | .remove colsets.bmp }
if ($did = 5) { if ($did(4,$did(4).sel) = Script's Current) .timer 1 0 col.sets.sav.cur | else .timer 1 0 set %scheme.file.tmp $$!dir="Save As.." $mircdir*.smf $chr(124) col.sets.copy } | if ($did = 6) { col.sets.ld | dialog -c Schemes } | if ($did = 7) col.sets.ld
}
alias col.sets.dlg.chk if ($dialog(Schemes) = $null) { .timerSCHEME off | unset %scheme.file }
alias col.sets.copy copy -o %scheme.file $qts(%scheme.file.tmp) | unset %scheme.file.tmp
alias col.sets.make {
if ($1 = $null) set %col.use crnt | else set %col.use $1 | window -ph +b @BLAH 100 10 395 335 | drawrect -f @blah $color(background) 1 0 0 301 315 | drawrect -f @blah $color(listbox) 1 303 0 89 315 | drawrect -f @blah $color(editbox) 1 0 317 392 15 | drawline @blah 1 1 0 316 393 316 | drawline @blah 1 1 302 0 302 316 | drawtext @blah $color(action) 5 2 Action Text | drawtext @blah $color(ctcp) 5 17 CTCP Text | drawtext @blah $color(Highlight) 5 32 Highlight Text | drawtext @blah $color(Info) 5 47 Info Text | drawtext @blah $color(Info2) 5 62 Info 2 Text | drawtext @blah $color(Invite) 5 77 Invite Text | drawtext @blah $color(Join) 5 92 Join Text | drawtext @blah $color(Kick) 5 107 Kick Text | drawtext @blah $color(Mode) 5 122 Mode Text
drawtext @blah $color(Nick) 5 137 Nick Text | drawtext @blah $color(Normal) 5 152 Normal Text | drawtext @blah $color(Notice) 5 167 Notice Text | drawtext @blah $color(Notify) 5 182 Notify Text | drawtext @blah $color(Other) 5 197 Other Text | drawtext @blah $color(Own) 5 212 Own Text | drawtext @blah $color(Part) 5 227 Part Text | drawtext @blah $color(Quit) 5 242 Quit Text | drawtext @blah $color(Topic) 5 257 Topic Text | drawtext @blah $color(Wallops) 5 272 Wallops Text | drawtext @blah $color(Whois) 5 287 Whois Text | drawtext @blah $color(Listbox Text) 305 2 Listbox Text | drawtext @blah $color(Editbox Text) 5 317 Editbox Text | drawsave @blah colsets.bmp | window -c @blah | unset %col.use
}
alias color {
if (%col.use = crnt) return $colour($1-)
if (%col.use = file) {
if ($1- = background) return $gettok(%col.sets.cont,1,44) | if ($1- = listbox) return $gettok(%col.sets.cont,2,44) | if ($1- = editbox) return $gettok(%col.sets.cont,3,44) | if ($1- = action) return $gettok(%col.sets.cont,4,44) | if ($1- = ctcp) return $gettok(%col.sets.cont,5,44) | if ($1- = Highlight) return $gettok(%col.sets.cont,6,44) | if ($1- = Info) return $gettok(%col.sets.cont,7,44) | if ($1- = Info2) return $gettok(%col.sets.cont,8,44) | if ($1- = Invite) return $gettok(%col.sets.cont,9,44) | if ($1- = Join) return $gettok(%col.sets.cont,10,44) | if ($1- = Kick) return $gettok(%col.sets.cont,11,44) | if ($1- = Mode) return $gettok(%col.sets.cont,12,44) | if ($1- = Nick) return $gettok(%col.sets.cont,13,44)
if ($1- = Normal) return $gettok(%col.sets.cont,14,44) | if ($1- = Notice) return $gettok(%col.sets.cont,15,44) | if ($1- = Notify) return $gettok(%col.sets.cont,16,44) | if ($1- = Other) return $gettok(%col.sets.cont,17,44) | if ($1- = Own) return $gettok(%col.sets.cont,18,44) | if ($1- = Part) return $gettok(%col.sets.cont,19,44) | if ($1- = Quit) return $gettok(%col.sets.cont,20,44) | if ($1- = Topic) return $gettok(%col.sets.cont,21,44) | if ($1- = Wallops) return $gettok(%col.sets.cont,22,44) | if ($1- = Whois) return $gettok(%col.sets.cont,23,44) | if ($1- = Listbox Text) return $gettok(%col.sets.cont,24,44) | if ($1- = Editbox Text) return $gettok(%col.sets.cont,25,44)
}
}
alias col.sets.sav.cur {
set %scheme.file $$dir="Select A File" $mircdir*.smf | if (.smf !isin %scheme.file) set %scheme.file %scheme.file $+ .smf | set %scheme.file $qts(%scheme.file) | writeini %scheme.file File Info Scheme | set %scheme.file.tmp $?="Scheme Name" | if (%scheme.file.tmp) { writeini %scheme.file File Name %scheme.file.tmp | unset %scheme.file.tmp } | else { unset %scheme.fil* | return } | set %col.sets.tmp $colour(background) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(listbox) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(editbox) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(action) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(ctcp)
set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Highlight) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Info) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Info2) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Invite) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Join) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Kick) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Mode) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Nick) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Normal) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Notice) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Notify)
set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Other) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Own) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Part) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Quit) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Topic) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Wallops) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Whois) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Listbox Text) | set %col.sets.tmp %col.sets.tmp $+ $chr(44) $+ $colour(Editbox Text) | writeini %scheme.file File Cont %col.sets.tmp | unset %col.sets.*
}
alias col.sets.ld {
if (%scheme.file = $null) { set %scheme.file $$dir="Select A File" $mircdir*.smf | set %scheme.file $qts(%scheme.file) | if ($readini %scheme.file file info != scheme) { echo $colour(info) -a ERROR: Not a scheme file | unset %scheme.file | return } } | if (%scheme.file = Script's Current) return | if ($isfile($remove(%scheme.file,")) != $true) { echo $colour(info) -a ERROR: File not found. | return } | set %col.sets.cont $readini %scheme.file file cont | colour background $gettok(%col.sets.cont,1,44) | colour listbox $gettok(%col.sets.cont,2,44) | colour editbox $gettok(%col.sets.cont,3,44) | colour action $gettok(%col.sets.cont,4,44) | colour ctcp $gettok(%col.sets.cont,5,44)
colour Highlight $gettok(%col.sets.cont,6,44) | colour Info $gettok(%col.sets.cont,7,44) | colour Info2 $gettok(%col.sets.cont,8,44) | colour Invite $gettok(%col.sets.cont,9,44) | colour Join $gettok(%col.sets.cont,10,44) | colour Kick $gettok(%col.sets.cont,11,44) | colour Mode $gettok(%col.sets.cont,12,44) | colour Nick $gettok(%col.sets.cont,13,44) | colour Normal $gettok(%col.sets.cont,14,44) | colour Notice $gettok(%col.sets.cont,15,44) | colour Notify $gettok(%col.sets.cont,16,44) | colour Other $gettok(%col.sets.cont,17,44) | colour Own $gettok(%col.sets.cont,18,44) | colour Part $gettok(%col.sets.cont,19,44) | colour Quit $gettok(%col.sets.cont,20,44)
colour Topic $gettok(%col.sets.cont,21,44) | colour Wallops $gettok(%col.sets.cont,22,44) | colour Whois $gettok(%col.sets.cont,23,44) | colour Listbox Text $gettok(%col.sets.cont,24,44) | colour Editbox Text $gettok(%col.sets.cont,25,44) | unset %col.sets.*
}