Post by regoroxford on Aug 17, 2020 17:10:10 GMT -5
When this code is in the liberty basic GUI v5.0 on the RPI , the parentheses are green and black, not black & black. The upper part of the program , when repeated by goto [options] command, hangs up 0n the RPi on 2nd return to options. There is still something screwy about listbox on the RPI with rpi32-351 .
It only can work for the screen capture option instructions.
This code works repeatedly on LB V4.5 on the desktop.
It only can work for the screen capture option instructions.
This code works repeatedly on LB V4.5 on the desktop.
' HOUSE RAFTERS
mainwin 180 38
print "trapclose [quit]"
dim option$(10)
[options]
cls
for k=0 to 5
option$(k)=""
next k
option$(0) = "New roof"
option$(1) = "Recall a roof"
option$(2) = "Delete a roof file"
option$(3) = "Calculate the roof"
option$(4) = "How to Capture the Windows screen"
option$(5) = "Draw the roof"
listbox #status.list, option$(), [selectionMade], 5, 35, 340, 250
open "Recall or enter a file before calculating " for window as #status
'button #status, "Continue", [selectionMade], UL, 5, 5
'button #status, "Cancel", [cancelStatusSelection], UR, 15, 5
WindowWidth = 370 : WindowHeight = 280
BackgroundColor$="yellow" : ForegroundColor$ ="blue"
print #status, "font arial 12 italic"
'print #status;" Enter or open a file, then close save it before executing the calculate option"
print #status.list, "selectindex 2";
print #status.list, "setfocus";
wait
[selectionMade]
print option$
print #status.list, "selection? option$"
if option$="New roof" then goto [newroof]
if option$="Recall a roof" then goto [recallaroof]
if option$="Delete a roof file" then goto [del]
if option$="Calculate the roof" then goto [calculateroof]
if option$="How to Capture the Windows screen" then goto [capture]
if option$="Draw the roof" then goto [draw]
wait
[capture]
option$=""
close #status
cls
print
print
print tab(5);"1. While picture is on the screen,in win 10,"
print tab(5);"2. right click task bar & hide taskbar. Close settings."
print tab(5);"3. Simultaneously press win+prt scrn. Drop the rafters pgm to the bottom"
print tab(5);"4. or X out. Open Paint3D or mspaint.exe and chose open or paste.If open,"
print tab(5);"5. look in pictures\screenshots folder. "
print tab(5);"6. You Rt click & paste drawing in from clipboard. Up the % size a little &"
print tab(5);"7. Crop the picture and print it. Save it to same directory as the program."
print
print tab(5);"NOTE: When recalling a file you are presented with a (second) save opportunity."
print tab(5);"If you are not changing anything or renaming, just click cancel and calculate."
print tab(5);"Wise to print text landscape the first time"
input "hit enter to continue"; hjk$
cls
if hjk$= "" then goto [options]
'Temporary debug data:
'CEnvironment getUserEnvironment at: 'HOME' = '/home/pi'
'CEnvironment commandLine = #('/home/pi/lb5rpi/rpi32-351' 'lb5alpha.im')
'Filename currentDirectory asAbsoluteFilename = an UnixFilename('/home/pi/lb5rpi')
insert code here