|
Post by regoroxford on Aug 15, 2020 13:00:46 GMT -5
I am running RPi3B+ with RPI32-351 build and lenova desktop with Win 10 ********* When I use ..popupmenu "newroof",[newroof] == syntax error on the RPi
V5.0 will not run listbox selections that run just fine on V4.5 LB thus the reason for dropping back to popupmenu.
[options]
cls
options$(0) = "New roof"
options$(1) = "Recall a roof"
options$(2) = "Delete a roof file"
options$(3) = "Calculate the roof"
options$(4) = "How to Capture the Windows screen"
listbox #status.list, options$(), [selectionMade], 5, 35, 340, 250
button #status, "Continue", [selectionMade], UL, 5, 5
button #status, "Cancel", [cancelStatusSelection], UR, 15, 5
WindowWidth = 370 : WindowHeight = 280
BackgroundColor$="yellow" : ForegroundColor$ ="blue"
open "Recall or enter a file before calculating " for window as #status
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 #status.list, "selection? selection$" ******** V5.0 does not like this line if selection$="New roof" then goto [newroof]
if selection$="Recall a roof" then goto [recallaroof]
if selection$="Delete a roof file" then goto [del]
if selection$="Calculate the roof" then goto [calculateroof]
if selection$="How to Capture the Windows screen" then goto [capture]
close #status
goto [options]
|
|
|
Post by Carl Gundel on Aug 15, 2020 20:09:57 GMT -5
I am running RPi3B+ with RPI32-351 build and lenova desktop with Win 10 ********* When I use ..popupmenu "newroof",[newroof] == syntax error on the RPi V5.0 will not run listbox selections that run just fine on V4.5 LB thus the reason for dropping back to popupmenu. The popup menu isn't implemented yet, sorry. This listbox example is based on what you posted. It seems to work fine. Does it work for you? dim list$(10) list$(0) = "red" list$(1) = "green" list$(2) = "blue" listbox #win.lbox, list$(), [selected], 10, 10, 150, 150 open "listbox example" for window as #win wait
[selected] print #win.lbox, "selection? item$" print item$ if item$ = "green" then goto [green] wait
[green] print ">>GREEN" wait
|
|
|
Post by regoroxford on Aug 16, 2020 9:33:56 GMT -5
I looked for clues in your listbox routine and was able to get mine to function on the RPI. I felt competent in QB45, and after abandoning it, all programming is seems fuzzy at best.
Thank you Carl
|
|
|
Post by Carl Gundel on Aug 16, 2020 13:11:32 GMT -5
I looked for clues in your listbox routine and was able to get mine to function on the RPI. I felt competent in QB45, and after abandoning it, all programming is seems fuzzy at best. Thank you Carl You're welcome. I hope that the new way to do this in LB5 is perhaps more to your liking? 'old way print #win.lbox, "selection? item$"
'new way item$ = #win.lbox selection$()
-Carl
|
|
|
Post by regoroxford on Sept 12, 2020 15:55:12 GMT -5
This code is on LB V5.0 build 32-351 on RPi The list box selection routine will only run when you select "capture windows screen"!! When the programs recycles back to options , it errors by running through the options the second time without stopping and... Is this a bug or something simple?
I edited the code by removing residuals that had no function related to the error described below. print #win.lbox, "selection? item$" is where the program hangs up with an error code.
' HOUSE RAFTERS
mainwin 180 38
print "trapclose [quit]"
[options]
option$(4) = "How to Capture the Windows screen"
listbox #win.lbox, option$(), [selected], 5, 35, 340, 250
open "Recall or enter a file before calculating " for window as #win
WindowWidth = 370 : WindowHeight = 280
[selected]
print #win.lbox, "selection? item$"
print item$
if item$="How to Capture the Windows screen" then goto [capture]
wait
[capture]
item$=""
close #win
'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 'please note that this cls is not executed
goto [options]
[quit]
end
|
|
|
Post by metro on Sept 13, 2020 7:21:05 GMT -5
multiple Goto's have nothing to goto maybe until you flesh that out simply add this to the bottom of your code (after "end")
[newroof] [recallaroof] [del] [calculateroof] [draw] NOTICE "Not Implemented Yet" WAIT
|
|
|
Post by regoroxford on Sept 13, 2020 11:35:08 GMT -5
When the entire program [all functions] were present, the error is the same. It will not run thru the [options] a second time; and appears to not allow the user an opportunity to select from the [options]. I will 'comment out' all of the non functioning goto's and if anything changes, I'll report back.
No changes to the error message not understood:#animateProductNamed:parameters:director
|
|
|
Post by metro on Sept 13, 2020 18:44:50 GMT -5
When the entire program [all functions] were present, the error is the same. It will not run thru the [options] a second time; and appears to not allow the user an opportunity to select from the [options]. I will 'comment out' all of the non functioning goto's and if anything changes, I'll report back. No changes to the error message not understood:#animateProductNamed:parameters:director There is no reference to the handle #animateProductNamed in your supplied code snippet , not sure how anyone can solve this without "all" the code you are using
|
|
|
Post by regoroxford on Sept 13, 2020 20:42:39 GMT -5
here is all of the code. Maybe you should run it?
' HOUSE RAFTERS mainwin 180 38 print "trapclose [quit]"
[options] option$(4) = "How to Capture the Windows screen"
listbox #win.lbox, option$(), [selected], 5, 35, 340, 250 open "Recall or enter a file before calculating " for window as #win WindowWidth = 370 : WindowHeight = 280 [selected] print #win.lbox, "selection? item$" print item$ if item$="How to Capture the Windows screen" then goto [capture] wait
[capture] item$="" close #win
'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 'please note that this cls is not executed goto [options]
[quit] end
|
|
|
Post by metro on Sept 14, 2020 3:37:31 GMT -5
Mixing mainwin and a GUI will create problems. a simple solution would be to use a texteditor, As a wise man on this site has stated many times .....there is more that one way to skin a cat. I only use the mainwin to test outcomes or display results/variable contents whist testing ' HOUSE RAFTERS ' mainwin 180 38 ' print "trapclose [quit]" nomainwin dim Line$(22) gosub [loaddata]
[options] option$(4) = "How to Capture the Windows screen"
WindowWidth = 700 : WindowHeight = 480 listbox #win.lbox, option$(), [selected], 5, 35, 240, 50 texteditor #win.te, 10, 90, 600, 250 button #win.btn,"CLEAR",[clearTe], UL,250,35,100,50 open "Recall or enter a file before calculating " for window as #win print #win,"trapclose [quit]" [selected] print #win.lbox, "selection? item$" print item$ if item$="How to Capture the Windows screen" then goto [capture] wait
[capture] item$="" ' close #win for a = 1 to 11 print #win.te , Line$(a) next wait
[loaddata] Line$(1)="1. While picture is on the screen,in win 10," Line$(2)="2. right click task bar & hide taskbar. Close settings." Line$(3)="3. Simultaneously press win+prt scrn. Drop the rafters pgm to the bottom" Line$(4)="4. or X out. Open Paint3D or mspaint.exe and chose open or paste.If open," Line$(5)="5. look in pictures\screenshots folder. " Line$(6)="6. You Rt click & paste drawing in from clipboard. Up the % size a little &" Line$(6)="7. Crop the picture and print it. Save it to same directory as the program." Line$(8)="" Line$(9)="NOTE: When recalling a file you are presented with a (second) save opportunity." Line$(10)="If you are not changing anything or renaming, just click cancel and calculate." Line$(11)="Wise to print text landscape the first time" ' input "hit enter to continue"; hjk$ ' cls 'please note that this cls is not executed return ' goto [options] [clearTe] print #win.te,"!cls"; wait [quit] close #win end
|
|
|
Post by regoroxford on Sept 15, 2020 11:01:03 GMT -5
I like your solution and there is something for me to learn. I will assume there is a bug in the listbox code I used that hasn't been eradicated yet. Thanks
It seems that it doesn't work the way I thought it did.
|
|