Jooel's code trimmed down to 347 by changing:
$a=asc(ucase($))
if $a>64 & $a<91

to

$a=lCase($)
if $a>` & $a<}




; begin Top Secret
;
;!
Function a($l,$b,$c,$d)
/*
1) the block length
2) the permutation
3) the message to be encoded or decoded
4) a parameter denoting encoding (E) or decoding (D)
*/

dim $i,$o[($c^)],$g,$,$r,$k
for $i=0 to ($c^)
$=substr($c,$i+1,1)
$a=lcase($)
if $a>` & $a<}
$g=$g+1
$k=$k+$
$r=$r+" "+$i
EndIf
$o[$i]=$
if $g=$l | $i=($c^)
for each $a in split($b,",")
if $i+$a-$g-1<($c^)
$=$+" "+$a
EndIf
Next
$=split($)
for $a=1 to $g
$o[split($r)[iif($d=E,$a,$[$a])]]=substr($k,iif($d=E,$[$a],$a),1)
Next
redim $r,$g,$k
$a=join($o,'')
EndFunction
;!
;!
; end Top Secret





KiXtart
KiXtart Version = 4.52
KiXGolf Script = kixgolf_ts.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium Model 13
Speed = 2261 MHz
Memory = 1024 MB

KiXGolf Scoring Engine
Scoring Engine = 3.3

KiXtart Golf Score
Tournament = Top Secret
Processing Start = 2007/08/10 11:00:43.296
Processing End = 2007/08/10 11:00:43.328
Duration = 0000/00/00 00:00:00.031
KiXGolf Result = Solution passed all 18 tests
KiXGolf Score = 347

Thank you for participating in KiXtart Golf!


Edited by DrillSergeant (2007-08-10 11:16 AM)
Edit Reason: added score
_________________________
The Code is out there