Post by milfredo on Apr 20, 2020 0:23:31 GMT -5
I have been Ill for quite some time, but bouncing back a bit, so getting back to programming. I am having troube with the following code when it's supposed to print in a graphics window. Should be printing nased off of the x and y positions. But All I can do is get it to parin all in one column. Please help. I know the place command as you'll see it here is not right.
Thank You.
'-----Begin code for #Pace
nomainwin
WindowWidth = 1100
WindowHeight = 600
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
'-----Begin GUI objects code
button #Pace.button1,"Close",[closepace], UL, 445, 522, 75, 25
'-----End GUI objects code
open "Pace Pressure" for graphics_nsb as #Pace
print #Pace, "down;fill buttonface; flush"
print #Pace, "color black; backcolor buttonface"
print #Pace, "font ms_sans_serif 10 Bold"
print #Pace.button1, "!font ms_sans_serif 10 Bold"
print #Pace, "trapclose [quit.Pace]"
print #Pace, "down"
Y1 = 175
Y2 = 175
Y3 = 175
Y4 = 175
X1 = 20
X2 = 260
X3 = 510
X4 = 775
print #Pace, "color Blue"
print #Pace, "font ms_sans_serif 14 Bold"
print #Pace, "place 375 50 "
print #Pace, "\Pace Pressure Map";
print #Pace, "place 50 100 "
print #Pace, "color Red"
print #Pace, "\Speed";
print #Pace, "color darkred"
print #Pace, "place 270 100 "
print #Pace, "\Early-Presser";
print #Pace, "place 500 100 "
print #Pace, "color Black"
print #Pace, "\Late-Sustained";
print #Pace, "place 800 100 "
print #Pace, "\Big Closer";
print #Pace, "font ms_sans_serif 10 Bold"
print #Pace, "color Black"
for v = 0 to ps-1
if nameofhorse$(srt(v,0)) = "" then
goto [noname]
ELSE
pacenumber = holder(srt(v,0),69)
gosub [getpacenumber]
print #Pace,"Place "; lenth; depth;
print #Pace, "\"; holder(srt(v,0),69);" ";TracSaddle$(srt(v,0)); ". "; nameofhorse$(srt(v,0))
END if
[noname]
next v
print #Pace, "flush"
[Pace.inputLoop] 'wait here for input event
wait
[closepace] 'Perform action for the button named 'button1'
Goto [quit.Pace] 'Insert your own code here
wait
[quit.Pace] 'End the program
print #Pace, "discard"
close #Pace
goto [top.inputLoop]
y = 160
[getpacenumber]
test = 0
SELECT CASE
CASE (pacenumber > 0) and (pacenumber < 3)
lenth = X1
depth = Y1
Y1 = Y1+30
CASE (pacenumber > 2) and (pacenumber < 4)
lenth = X2
depth = Y2
Y2 = Y2+30
CASE (pacenumber > 3) and (pacenumber < 6)
lenth = X3
depth = Y3
Y3 = Y3+30
CASE (pacenumber > 6) and (pacenumber < 200)
lenth = X4
depth = Y4
Y4 = Y4+30
END SELECT
Return
Thank You.