code:
KiXtart
KiXtart Version = 4.21
KiXforms Version = 2.3.0.41
KiXGolf Script = kixgolf_pxmagic.kix

Computer
OS = Windows XP Home Edition
CPU = Intel(R) Celeron(R) CPU 2.00GHz
Speed = 1993 MHz
Memory = 382 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: PxMagic - Read & Display PxM Images
Processing Start = 2003/10/19 08:27:08.328
Processing End = 2003/10/19 09:10:53.015
Duration = 0000/00/00 00:43:44.687
# Images = 8
KiXGolf Score PxMagic = 39
KiXGolf Score PxMRead = 167
KiXGolf Score PxMDisplay = 266
KiXGolf Score Total = 472

Thank you for participating in KiXtart Golf!

I have included my two best approaches. The second approach is currentlu commented out.

; begin PxMagic 
;
;!
Function PxMagic($)
PxMRead($)
EndFunction
;!
; end PxMagix


; begin PxMRead 
;
;!
;Reader #2 - runs with displayer #2 CURRENT WINNING CODE
Function PxMRead($)
dim $h
open (1, $)
do
for each $ in split(join(split(split(READLINE(1),"#")[0]," ")))
if $
$h=$h+" "+$
endif
next
until @error
close(1)
PxMDisplay(split($h))
EndFunction


;Reader #1 - runs with displayer #1
;Function PxMRead($)
; dim $o
; open (1, $)
; $ = createobject("VBscript.RegExp")
; $.Global = 1
; $.Pattern = 'P|\s+|#.*|$'
; do
; $o = $.replace($o+READLINE(1)," ")
; until @error
; close(1)
; PxMDisplay(split($o))
;EndFunction
;!
; end PxMRead


; begin PxMDisplay 

;!
;Display 2 - runs with Reader #2 CURRENT WINNING CODE
Function PxMDisplay($)
dim $a, $f, $w, $h, $y, $z

$a = CreateObject("Kixtart.Form")
;$a.ClientSize = $[2],$[3] ; Use this line for properly sized forms
$a.Size = 700,700 ;Comment out if using ClientSize above
$a.Show

$y = 5
$f = 255/$[4]
if $[1]="P1"
$y = 4
$f = 255
endif

$z = $[1]="P3"

for $h=1 to $[3]
for $w=1 to $[2]
$a.PSet($w, $h, $f*(65536*$[$y+2*$z]+256*$[$y+$z]+$[$y]))
$y = 1 + $y + 2*$z
next
next
sleep 10

;Uncomment the lines below to keep the form on the screen
;until closed manually.

;While $a.Visible
; $y=Execute($a.DoEvents)
;Loop
EndFunction


;Display 1 - runs with Reader #1
;Function PxMDisplay($)
; dim $a, $f, $w, $h, $y, $z
;
; $a = CreateObject("Kixtart.Form")
; ;$a.ClientSize = $[2],$[3] ; Use this line for properly sized forms
; $a.Size = 700,700 ;Comment out if using ClientSize above
; $a.Show
;
; $y = 5
; $f = 255/$[4]
; if $[1]=1
; $y = 4
; $f = 255
; endif
;
; $z = $[1]=3
;
; for $h=1 to $[3]
; for $w=1 to $[2]
; $a.PSet($w, $h, $f*(65536*$[$y+2*$z]+256*$[$y+$z]+$[$y]))
; $y = 1 + $y + 2*$z
; next
; next
; sleep 10
;
; ;Uncomment the lines below to keep the form on the screen
; ;until closed manually.
;
; ;While $a.Visible
; ; $y=Execute($a.DoEvents)
; ;Loop
;EndFunction

;!
; end PxMDisplay


[ 19. October 2003, 15:24: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/