Jalkhov
Member in Training
██████████████████▓░ 99%
Posts: 41
|
Post by Jalkhov on Feb 17, 2021 14:59:25 GMT
Hi, I want to know if it is possible to export a Script as .exe? I need to send the code to someone else to test it, but I don't want them to have to install Just Basic.
|
|
|
Post by cundo on Feb 17, 2021 15:18:32 GMT
Hi Jalkhov. Yes, you can create stand-alone executables using the Runtime Engine. Read in the help file: 'Quick Start Guide', OverView of Just BASIC V2.0 , 'Using the runtime engine'.
|
|
Jalkhov
Member in Training
██████████████████▓░ 99%
Posts: 41
|
Post by Jalkhov on Feb 17, 2021 15:31:30 GMT
Great! thanks
|
|
|
Post by xxgeek on Feb 18, 2021 4:01:03 GMT
Hi Jalkhov. Yes, you can create stand-alone executables using the Runtime Engine. Read in the help file: 'Quick Start Guide', OverView of Just BASIC V2.0 , 'Using the runtime engine'. Right up your alley. justbasiccom.proboards.com/thread/625/jb-project-organizer?page=2Check my last post in that thread made a couple of minutes ago. It does what you need and more. Please try it, and give me any feedback that comes to mind.
|
|
Jalkhov
Member in Training
██████████████████▓░ 99%
Posts: 41
|
Post by Jalkhov on Feb 18, 2021 12:52:44 GMT
Hi Jalkhov. Yes, you can create stand-alone executables using the Runtime Engine. Read in the help file: 'Quick Start Guide', OverView of Just BASIC V2.0 , 'Using the runtime engine'. Right up your alley. justbasiccom.proboards.com/thread/edit/625Check my last post in that thread made a couple of minutes ago. It does what you need and more. Please try it, and give me any feedback that comes to mind. Ok thanks Please fix the link, it leads to edit mode and gives permissions errors.
|
|
|
Post by xxgeek on Feb 18, 2021 17:05:12 GMT
Link fixed, thanks for letting me know. Forgot I was editing a typo at the time....
|
|
|
Post by xxgeek on Feb 18, 2021 18:27:16 GMT
Post your script in this thread and we'll see why it's closing when finished. Probably because you told it to without realising it. Did that a few times myself. I'm new to JB as well, only a couple of months under my belt so I,m getting familiar with a lot of the error messages lol edit --- Nevermind. I see you have posted in anothr thread with tsh73 helping you. You're in good hands Any script that JB doesn't understand will end with errors and shutdown.
|
|
Jalkhov
Member in Training
██████████████████▓░ 99%
Posts: 41
|
Post by Jalkhov on Feb 18, 2021 18:34:43 GMT
Post your script in this thread and we'll see why it's closing when finished. Probably because you told it to without realising it. Did that a few times myself. I'm new to JB as well, only a couple of months under my belt so I,m getting familiar with a lot of the error messages lol 'STOP :CLEAR :WAIT 5: INPUT "# DE TRAMOS="; N : Z = N +1 DIM W(N),P(N),L(N),A(N),B(N),K(N),R(Z+1),C(Z+1,Z+1) INPUT "TIENE VOLADOS";H$ : IF H$="SI" THEN INPUT "#DEVLS."; V : ELSE 70 FOR I=1 TO V PRINT "WV(";I;")=";:INPUT W(I):PRINT "LV(";I;")=";:INPUT L(I) PRINT "AY(";I;")=";:INPUT A(I):PRINT "PV(";I;")=";:INPUT P(I) M=W(I)*L(I)^2/2+P(I)*A(I) IF I=1 THEN C(I,I-1)=M: ELSE 65 C(Z,Z+1)=0-M 65 NEXT I 70 FOR I=1 TO N:PRINT "W";I;"=";:INPUT W(I):PRINT "P";I;"=";:INPUT P(I) PRINT "L" ; I ; "=" ; : INPUT L(I):PRINT "A";I;"=";:INPUT A(I) PRINT "B" ; I ; "=" ; : INPUT B(I):PRINT "I";I;"=";:INPUT K(I) R(I)=4*K(I)/L(I) NEXT I FOR I=1 TO N C(I,I+1)=(W(I) * L(I) ^ 2 / 12 + P(I) * A(I) * B(I) ^ 2 / L(I) ^ 2) * -1 C(I+1,1)= W(I) * L(I) ^ 2 / 12 + P(I) * B(I) * A(I) ^ 2 / L(I) ^ 2 NEXT I
FOR P=1 TO 10 FOR I=1 TO N+1 M1=(C(I,I-1)+C(I,I+1))*(0-R(I-1)/(R(I-1)+R(I))) M2=(C(I,I-1)+C(I,I+1))*(0-R(I)/(R(I-1)+R(I))) M3=M1*.5 M4=M2*.5 C(I,I+1)=C(I,I+1)+M2:C(I,I-1)=C(I,I-1)+M1 C(I-1,I)=C(I-1,I)+M3:C(I+1,I)=C(I+1,I)+M4 NEXT I
NEXT P FOR I=1 TO N+1 PRINT "M";I;">";I-1;"=";ROUND(C(I,I-1),-3) PRINT "M";I;">";I+1;"=";ROUND(C(I,I+1),-3) NEXT I FOR I = 1 TO N:PRINT "TRAMP";I K = W(I)*L(I)/2:K1=(C(I,I+1)+C(I+1,1))/L(I) V1 = K-K1+P(I)*B(I)/L(I):V2=0-(K+K1+P(I)*A(I)/L(I)) IF SGN(V1) = SGN(V2) THEN 360:ELSE 370 360 PRINT "V";I;">D=";ROUND(V1,-3),"V";I+1;">I=";ROUND(V2,-3):PRINT "NO M+" GOTO 460 370 X = V1*L(I)/(V1 + ABS(V2)):IF X > A(I) THEN 380: ELSE P(I)=0 380 M = V1*X-W(I)*X^2/2-P(I)*(X-A(I))+C(I,I+1):IF M < 0 THEN 360 C1=(0-X)^2:C2=0-X:C3=(L(I)-X)^2:C4=(L(I)-X):K1=C(I,I+1)-M:C=M K2 = 0-C(I+1,I)-M:D=C1*C4-C2*C3:A=(K1*C4-K2*C2)/D:B=(K2*C1-K1*C3)/D Q=(B^2-4*A*C)^.5:X2=(0-B+Q)/2/A:X3=(0-B-Q)/2/A IF X2 < X3 THEN X4 = X + X2:X5=L(I)-(X*X3): GOTO 440 X4=X+X3:X5=L(I)-(X+X2) 'was missing last ) 440 PRINT "V";I;">D=";ROUND(V1,-3),"V";I+1;">I=";ROUND(V2,-3),"M+";ROUND(M,-3) PRINT "X>";I;"=";ROUND(X4,-3),"X>";I+1;"=";ROUND(X5,-3),"X>M+";ROUND(X,-3) 460 NEXT I
end 'functions missing in JB function ROUND(x, n) 'Microsof one 'n=3 -> 12345.678? 'ROUND=int(x*10^n)/10^n 'Casio FX850P one (from manual) 'n=-2 -> 12345.7 n=n+1 ROUND=int(x/10^n)*10^n end function
function SGN(x) SGN = (x>0)-(x<0) end function Input values # DE TRAMOS= = 2 TIENE VOLADOS = NO W1 = 2 P1 = 2 L1 = 4 A1 = 2 B1 = 2 I1 = 1 W2 = 2 P2 = 2 L2 = 4 A2 = 2 B2 = 2 I2 = 1
|
|
|
Post by xxgeek on Feb 18, 2021 18:42:51 GMT
I think I can see why it closes when done.
Once you convert it to an exe, or tkn it has no reason to stay open unless you add a line to keep it opened. You could have it rerun, or loop it, or just put a wait statement at the end.
|
|
Jalkhov
Member in Training
██████████████████▓░ 99%
Posts: 41
|
Post by Jalkhov on Feb 18, 2021 18:46:28 GMT
I think I can see why it closes when done. Once you convert it to an exe, or tkn it has no reason to stay open unless you add a line to keep it opened. You could have it rerun, or loop it, or just put a wait statement at the end. So...i have to add..? 470 WAIT
|
|
|
Post by xxgeek on Feb 18, 2021 18:48:54 GMT
That should do it. It's more of a temp fix, but it should work.
|
|
Jalkhov
Member in Training
██████████████████▓░ 99%
Posts: 41
|
Post by Jalkhov on Feb 18, 2021 18:52:48 GMT
That should do it. It's more of a temp fix, but it should work. Thanks
|
|
|
Post by xxgeek on Feb 18, 2021 18:58:26 GMT
Glad to see another happy camper
|
|