Post by regoroxford on Mar 15, 2023 10:45:03 GMT -5
I can't get the mouse to show anything but errors in freeform structured program.
'Form created with the help of Freeform 3 v07-15-08
'Generated on Mar 14, 2023 at 21:17:03
[setup.2.Window]
'-----Begin code for #2
'nomainwin
WindowWidth = 1305
WindowHeight = 590
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
'-----Begin GUI objects code
groupbox #2.groupbox1, "", 190, 32, 165, 410
groupbox #2.groupbox2, "", 510, 32, 160, 410
statictext #2.statictext16, "System 1", 220, 62, 105, 40
statictext #2.statictext17, "System 2", 550, 62, 105, 40
statictext #2.statictext24, "Purge Time", 15, 132, 127, 40
statictext #2.statictext25, "Dry Purge Time", 5, 202, 170, 40
statictext #2.statictext26, "Desorb Time", 25, 282, 109, 40
statictext #2.statictext27, "Bake Time", 30, 362, 150, 40
TextboxColor$ = "cyan"
textbox #2.textbox1.1, 210, 122, 125, 40
textbox #2.textbox1.2, 210, 192, 125, 40
textbox #2.textbox1.3, 210, 272, 125, 40
textbox #2.textbox1.4, 210, 352, 125, 40
TextboxColor$ = "yellow"
textbox #2.textbox2.1, 525, 122, 125, 40
textbox #2.textbox2.2, 525, 192, 125, 40
textbox #2.textbox2.3, 525, 272, 125, 40
textbox #2.textbox2.4, 525, 352, 125, 40
TextboxColor$ = "white"
textbox #2.textbox17, 365, 122, 70, 40
textbox #2.textbox18, 365, 192, 70, 40
textbox #2.textbox19, 365, 272, 70, 40
textbox #2.textbox20, 365, 352, 70, 40
textbox #2.textbox21, 685, 122, 70, 40
textbox #2.textbox22, 690, 192, 70, 40
textbox #2.textbox23, 690, 272, 70, 40
textbox #2.textbox24, 690, 352, 70, 40
'button #2.groupbox1, "Start 1",[start1],LL, 70, 40
'button #2.groupbox2, "Start 2",[start2],LR, 70, 40
textbox #2.textbox25, 240, 400, 70, 40
textbox #2.textbox26, 545, 400, 70, 40
statictext #2.statictext70, "Run time", 370, 62, 100, 40
statictext #2.statictext26, "Run time", 680, 62, 100, 40
'-----End GUI objects code
open "Purge & Trap Systems Control" for window as #2
print #2, "font ms_sans_serif 14"
print #2.statictext16, "!font ms_sans_serif 18"
print #2.statictext24, "!font ms_sans_serif 18"
print #2.statictext25, "!font ms_sans_serif 18"
print #2.statictext26, "!font ms_sans_serif 18"
print #2.statictext27, "!font ms_sans_serif 18"
print #2.textbox25, "Start 1" 'doesn't belong in creation zone
print #2.textbox26, "Start 2"
print #2, "trapclose [quit.2]"
#2.groupbox1, "!when rightButtonUp [start1]"
wait
[2.inputLoop] 'wait here for input event
[start1] 'Perform action for the groupbox named 'groupbox1
x=MouseX : y= MouseY
print x,y
open "c:\lbpro451\systimes1.txt" for input as #4
input #4,ti(1):print #2.textbox17,ti(1)*60
input #4,ti(2):print #2.textbox18,ti(2)*60
input #4,ti(3):print #2.textbox19,ti(3)*60
input #4,ti(4):print #2.textbox20,ti(4)*60
close #4
for k=1 to 4
rt=60*ti(k)
timer 1000, [tick]
wait
[tick]
'#3 "!cls"
rt=rt-1
if k=1 then #2.textbox1.1, rt
if k=2 then #2.textbox1.2, rt
if k=3 then #2.textbox1.3, rt
if k=4 then #2.textbox1.4, rt
if rt =0 then next k
wait
'Insert your own code here
[quit.2] 'End the program
close #2
end