Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
BTW, here is the code I was using. It's interesting to see how similar the Read UDFs were...
code:
KiXtart KiXtart Version = 4.21 KiXforms Version = 2.3.0.42 KiXGolf Script = kixgolf_pxmagic.kix
Computer OS = Windows 2000 Professional CPU = Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz Speed = 1998 MHz Memory = 254 MB
KiXGolf Scoring Engine Scoring Engine = 3.0.3
KiXtart Golf Score Tournament = KiXtart Golf: PxMagic - Read & Display PxM Images Processing Start = 2003/10/17 16:50:24.372 Processing End = 2003/10/17 16:50:33.415 Duration = 0000/00/00 00:00:09.042 # Images = 2 KiXGolf Score PxMagic = 86 KiXGolf Score PxMRead = 169 KiXGolf Score PxMDisplay = 293 KiXGolf Score Total = 548 Thank you for participating in KiXtart Golf!
; begin PxMagic ; ;! Function PxMagic($) $=Split(PxMRead($)) PxMDisplay(Iif($[0]=P1,3,4),$,&FFFFFF) EndFunction ;! ;! ; end PxMagix
; begin PxMRead ; ;! Function PxMRead($) $=Open(1,$) $=' ' Do $=$+Join(Split(Split(ReadLine(1),#)[0],' '))+' ' Until @ERROR For Each $ in Split($) If $ $PxMRead=$PxMRead+$+' ' EndIf Next $=Close(1) EndFunction ;! ;! ; end PxMRead
; begin PxMDisplay ; ;! Function PxMDisplay($b,$,$w) Dim $f,$x,$y,$a,$c,$d $f=CreateObject(kixtart.form) ;$f.ClientSize = $[1],$[2] $f.Show For $a = $b to ubound($)-1 $d=$[$a] If $x=$[1] $x=0 $y=$y+1 EndIf $c=Iif($d=0,$w,0) If $b=4 $c=Iif($d=0,$w,$f.RGB($d,$d,$d)) EndIf If $[0]=P3 $c=$f.RGB($d,$[$a+1],$[$a+2]) $a=$a+2 EndIf $f.PSet($x,$y,$c) $x=$x+1 Next
Sleep 10
EndFunction ;! ;! ; end PxMDisplay
|