Post Reply 
How can I make an app from an application?
03-29-2017, 07:15 AM
Post: #1
How can I make an app from an application?
How can I make an app from an application?
Find all posts by this user
Quote this message in a reply
03-29-2017, 09:02 AM
Post: #2
RE: How can I make an app from an application?
(03-29-2017 07:15 AM)Onieh Wrote:  How can I make an app from an application?

I guess you mean from a program. Duplicate an existent app and write your program in the Name (app) program (from the Program Catalog)

My website: erwin.ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
03-30-2017, 06:48 AM
Post: #3
RE: How can I make an app from an application?
And how do I get my own app image.
Find all posts by this user
Quote this message in a reply
03-30-2017, 07:11 AM
Post: #4
RE: How can I make an app from an application?
See here.
Find all posts by this user
Quote this message in a reply
03-30-2017, 12:17 PM
Post: #5
RE: How can I make an app from an application?
(03-30-2017 06:48 AM)Onieh Wrote:  And how do I get my own app image.

Right click in the app, inside the Connectivity Kit

My website: erwin.ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
03-30-2017, 08:08 PM
Post: #6
RE: How can I make an app from an application?
Thanks for your suggestions, I will try it
Find all posts by this user
Quote this message in a reply
04-03-2017, 06:12 PM
Post: #7
RE: How can I make an app from an application?
Hello everybody,

The change of the app graphics has worked. That with the program is not. I have copied an existing app and renamed it. Then I copied my program into the file director "program". When I start the app, the old app is running. What am I doing wrong?
Find all posts by this user
Quote this message in a reply
04-04-2017, 05:37 AM
Post: #8
RE: How can I make an app from an application?
Hello,

What do you mean by: when I start the program, the old app is running?

You made a copy of an app, copied your program into it...
I assume that your program "takes" over a number of app view events (plot, symb...)... is your program running when you press these keys?

Are you doing anything on app start (START function)? is that running?

At the end of your override functions, are you using setviews to set a specific view?

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
04-09-2017, 10:33 AM
Post: #9
RE: How can I make an app from an application?
I have copy the App Solution. Rename it. Copy my program into the App. When I start the program then the original app is started. Can you show me an example how I have to make it exactly so that my program starts !?
Find all posts by this user
Quote this message in a reply
04-09-2017, 11:17 AM (This post was last modified: 04-09-2017 11:21 AM by eried.)
Post: #10
RE: How can I make an app from an application?
(04-09-2017 10:33 AM)Onieh Wrote:  I have copy the App Solution. Rename it. Copy my program into the App. When I start the program then the original app is started. Can you show me an example how I have to make it exactly so that my program starts !?

You need to read another app code to learn more about how the apps work. Start by trying:

Code:
Syntax:
VIEW "Text" Function()
BEGIN
END;

Only works in an app program.
Allows a programmer to customize the View menu. Causes "Text" to appear when the View is pressed and Function to be executed when the OK menu key (or ENTER key) is pressed.
Note that a view function can also be exported.

Get any app that you like and check how they use VIEW internally. Also you can put your initial code inside:

Code:
START
BEGIN
STARTVIEW(-1);

MSGBOX("Hello world");
// Do something here

STARTVIEW(-4);
END;

My website: erwin.ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
04-09-2017, 12:33 PM
Post: #11
RE: How can I make an app from an application?
Thanks Eried,

a little program works :-)

but This one doesn't works if i make it so!!

START
BEGIN
STARTVIEW(-1);
LOCAL Line;
Line:=1;
STARTAPP("Fluglatz");
WHILE Line<>0 DO
CASE

IF Line==1 THEN //Start Flugnavigation

LOCAL CO:=RGB(255,255,255);

RECT(RGB(154,205,50));
TEXTOUT_P("F L U G N A V I G A T I O N",31,20,7,RGB(255,255,255));
TEXTOUT_P("© 2017 Heino Krüger",180,220,3);

//RWY
RECT_P(0,90,320,160,RGB(155,155,155));

//0
RECT_P(68,112,79,114,RGB(255,255,255));
RECT_P(68,121,79,123,RGB(255,255,255));
RECT_P(66,114,68,121,RGB(255,255,255));
RECT_P(80,114,82,121,RGB(255,255,255));

//3
RECT_P(80,127,82,134,RGB(255,255,255));
RECT_P(66,127,68,134,RGB(255,255,255));
RECT_P(73,130,75,134,RGB(255,255,255));
RECT_P(68,135,79,137,RGB(255,255,255));

//2
RECT_P(240,137,242,126,RGB(255,255,255));
RECT_P(243,126,246,128,RGB(255,255,255));
RECT_P(247,137,249,126,RGB(255,255,255));
RECT_P(250,137,253,135,RGB(255,255,255));
RECT_P(254,137,256,126,RGB(255,255,255));

//1
RECT_P(240,114,256,116,RGB(255,255,255));
RECT_P(240,117,242,119,RGB(255,255,255));


RECT_P(10,97,50,107,RGB(255,255,255));
RECT_P(10,112,50,122,RGB(255,255,255));
RECT_P(10,127,50,137,RGB(255,255,255));
RECT_P(10,142,50,152,RGB(255,255,255));

RECT_P(270,97,310,107,RGB(255,255,255));
RECT_P(270,112,310,122,RGB(255,255,255));
RECT_P(270,127,310,137,RGB(255,255,255));
RECT_P(270,142,310,152,RGB(255,255,255));

LINE_P(120,124,161,121,CO);//Rumpf
LINE_P(120,125,161,122,CO);
LINE_P(120,126,161,123,CO);
LINE_P(120,126,161,124,CO);
LINE_P(120,126,161,125,CO);
LINE_P(120,126,161,126,CO);
LINE_P(120,126,161,127,CO);
LINE_P(120,126,161,128,CO);
LINE_P(120,126,161,129,CO);

LINE_P(126,119,126,131,CO);//Heck
LINE_P(125,119,125,131,CO);
LINE_P(127,119,127,131,CO);
LINE_P(128,120,128,130,CO);

LINE_P(149,103,149,147,CO);//Flügel
LINE_P(150,102,150,148,CO);
LINE_P(151,101,151,149,CO);
LINE_P(152,100,152,150,CO);
LINE_P(153,100,153,150,CO);
LINE_P(154,100,154,150,CO);
LINE_P(155,100,155,150,CO);
LINE_P(156,101,156,149,CO);

LINE_P(162,122,162,128);//Motor
LINE_P(163,123,163,127);
LINE_P(164,125,166,125);

LINE_P(166,118,166,132);//Propeller
LINE_P(167,118,167,132);

FREEZE;
WAIT();
Line:=2;
END; //Line1 Flugparameter

IF Line==2 THEN //Start Flugkoordinaten
STARTVIEW(-1);
LOCAL K:=0, Z1:=0;

RECT_P(0,0,320,220,RGB(0,255,0));

TEXTOUT_P("F L U G N A V I G A T I O N",31,20,7);

TEXTOUT_P("1 für: Startplatz ICAO",70,60);
TEXTOUT_P("2 für: Zielplatz_ICAO",70,85);
TEXTOUT_P("3 für: Start POSITION",70,110);
TEXTOUT_P("4 für: Ziel POSITION",70,135);
TEXTOUT_P("Del für Abbruch",70,160);

REPEAT
K:=GETKEY;
IF K==42 THEN Line:=3; END; //Taste 1
IF K==43 THEN Line:=4; END; //Taste 2
IF K==44 THEN Line:=5; END; //Taste 3
IF K==37 THEN Line:=6; END; //Taste 4
IF K==38 THEN PRINT("FLUGSTRECKE"); STARTVIEW (-1);END; //Taste 5
UNTIL K==19 or K==37 or K==38 or K==42 or K==43 or K==44;

END; //ENDE Line2 Flugkoordinaten

IF Line==3 THEN // Beginn Flugstart
STARTVIEW(-1);
LOCAL A,B,C,D,E,F,g;
LOCAL H,I,K,S,T,Letter;
LOCAL Keys:={"-","-","-","-","-",
"-","-","-","-",
"-","-","-","-","-",
"A","B","C","D","E","Del",
"F","G","H","I","J","K",
"L","M","N","O","-",
"P","Q","R","S","T",
"-","U","V","W","X",
"-","Y","Z","-","-",
"-","-","-","-","-"};

STARTAPP("Flugplatz");

RECT_P(0,0,320,240,RGB(0,205,205)); //Clear screen
RECT_P(90,40,129,59,RGB(255,255,255));

TEXTOUT_P("S t a r t f l u g p l a t z",40,0,7);
TEXTOUT_P("Eingabe: ",0,38,5);

T:=""; S:=0;
WHILE S<4 OR POS(a:a,T)==0 DO //Loop until we got 4 letters that are in the spreadsheet
Letter:="-";
WHILE Letter=="-" DO //Loop until a letter or the Del key is pressed
K:=0;
WHILE K=0 DO K:=WAIT()+1; END; //Wait until a key is pressed and get the key code
Letter:=Keys(K); //Convert the keycode to a letter
END;
IF Letter=="Del" THEN //If Del key has been pressed, clear text and remove one letter from H
IF S>0 THEN TEXTOUT_P(T,90,40,4,RGB(0,205,205),90,RGB(0,205,205));IFTE(S=1,T:="",T:=LEFT(T,S-1));S:=S-1; END;
ELSE //Else it's a letter,
IF S<4 THEN T:=T+Letter;S:=S+1; END; // add it to H and increase the number of letters if we have not yet 4 letters
END;
IF S==4 AND POS(a:a,T)==0 THEN //If we have 4 letters that are not in the spreadsheet ...
TEXTOUT_P(T,90,40,4,RGB(255,0,0),90,RGB(0,205,205)); // ... then print them in RED ...
ELSE
TEXTOUT_P(T,90,40,4); // .. else print current letters in black
END;
END;//END WHILE

S:=POS(a:a,T);

RECT_P(0,32,320,34);
A500:=(EXPR("D"+S)+EXPR("E"+S)/60+EXPR("F"+S)/3600);
B500:=(EXPR("g"+S)+EXPR("H"+S)/60+EXPR("I"+S)/3600);
//TEXTOUT_P((EXPR("A"+S)),90,40,4);
TEXTOUT_P((EXPR("B"+S)),90,70,4);
TEXTOUT_P((EXPR("C"+S)),90,95,4);
TEXTOUT_P((EXPR("D"+S)+"°"),90,120,4);
TEXTOUT_P((EXPR("E"+S)+"´"),140,120,4);
TEXTOUT_P((EXPR("F"+S)+" ̋"),190,120,4);
TEXTOUT_P((EXPR("g"+S)+"°"),90,150,4);
TEXTOUT_P((EXPR("H"+S)+"´"),140,150,4);
TEXTOUT_P((EXPR("I"+S)+" ̋"),190,150,4);

WAIT();

FREEZE;
Line:=2;
END; //END Line3 Flugstart

IF Line==4 THEN //Beginn Flugziel
STARTVIEW(-1);

LOCAL A,B,C,D,E,F,g;
LOCAL H,I,K,S,T,Letter,CZ,DZ;
LOCAL Keys:={"-","-","-","-","-",
"-","-","-","-",
"-","-","-","-","-",
"A","B","C","D","E","Del",
"F","G","H","I","J","K",
"L","M","N","O","-",
"P","Q","R","S","T",
"-","U","V","W","X",
"-","Y","Z","-","-",
"-","-","-","-","-"};

STARTAPP("Flugplatz");

RECT_P(0,0,320,240,RGB(0,205,205)); //Clear screen

TEXTOUT_P("Z i e l f l u g p l a t z",40,0,7);
TEXTOUT_P("Eingabe: ",0,38,5);

T:=""; S:=0;
WHILE S<4 OR POS(a:a,T)==0 DO //Loop until we got 4 letters that are in the spreadsheet
Letter:="-";
WHILE Letter=="-" DO //Loop until a letter or the Del key is pressed
K:=0;
WHILE K=0 DO K:=WAIT()+1; END; //Wait until a key is pressed and get the key code
Letter:=Keys(K); //Convert the keycode to a letter
END;
IF Letter=="Del" THEN //If Del key has been pressed, clear text and remove one letter from H
IF S>0 THEN TEXTOUT_P(T,90,40,4,RGB(0,205,205),90,RGB(0,205,205));IFTE(S=1,T:="",T:=LEFT(T,S-1));S:=S-1; END;
ELSE //Else it's a letter,
IF S<4 THEN T:=T+Letter;S:=S+1; END; // add it to H and increase the number of letters if we have not yet 4 letters
END;
IF S==4 AND POS(a:a,T)==0 THEN //If we have 4 letters that are not in the spreadsheet ...
TEXTOUT_P(T,90,40,4,RGB(255,0,0),90,RGB(0,205,205)); // ... then print them in RED ...
ELSE
TEXTOUT_P(T,90,40,4); // .. else print current letters in black
END;
END;

S:=POS(a:a,T);

RECT_P(0,32,320,34);
C500:=(EXPR("D"+S)+EXPR("E"+S)/60+EXPR("F"+S)/3600);
D500:=(EXPR("g"+S)+EXPR("H"+S)/60+EXPR("I"+S)/3600);
//TEXTOUT_P((EXPR("A"+S)),90,40,4);
TEXTOUT_P((EXPR("B"+S)),90,70,4);
TEXTOUT_P((EXPR("C"+S)),90,95,4);
TEXTOUT_P((EXPR("D"+S)+"°"),90,120,4);
TEXTOUT_P((EXPR("E"+S)+"´"),140,120,4);
TEXTOUT_P((EXPR("F"+S)+" ̋"),190,120,4);
TEXTOUT_P((EXPR("g"+S)+"°"),90,150,4);
TEXTOUT_P((EXPR("H"+S)+"´"),140,150,4);
TEXTOUT_P((EXPR("I"+S)+" ̋"),190,150,4);
CZ:=(EXPR("D"+S)+EXPR("E"+S)/60+EXPR("F"+S)/3600);
DZ:=(EXPR("g"+S)+EXPR("H"+S)/60+EXPR("I"+S)/3600);

WAIT();

FREEZE;
Line:=7;
END; //ENDE Line4 Flugziel

IF Line==5 THEN // Beginn FlugStartPos
STARTVIEW(-1);
LOCAL BG,BGM,BGS,LG,LGM,LGS;
LOCAL control:=1;

REPEAT

INPUT({{BG,[0],{60,20,0}},
{BGM,[0],{60,20,1}},
{BGS,[0],{60,20,2}},
{LG,[0],{60,20,4}},
{LGM,[0],{60,20,5}},
{LGS,[0],{60,20,6}}},
"Start Position",
{"Breitengrad LAT [°] ","Breitenminute [´] ","Breitensekunde [ ̋ ] ","Längengrad LONG [°] ","Längenminute [´] ","Längensekunde [ ̋ ] "},
{"Breitengrad [LATITUDE]","Breitenminute","Breitensekunde","Längengrad LONGITUTE ","Längenminute","Längensekunde"});
C500:=BG+BGM/60+BGS/3600;
D500:=LG+LGM/60+LGS/3600;

CASE

IF (BG<47 or BG>55) THEN MSGBOX("Breitengrad ausserhalb Deutschland");control:=1; END;
IF (LG<6 or LG>15) THEN MSGBOX("Längengrad ausserhalb Deutschland"); control:=1; END;
IF ((BGM<0 or BGM>60) OR (BGS<0 or BGS>60) OR (LGM<0 or LGM>60) OR (LGS<0 or LGS>60)) THEN MSGBOX("Eingabe [ˊ] und [ ̋ ]nur von 0 - 60 erlaubt!"); control:=1; END;

DEFAULT control:=0;

END; //ENDE CASE-Anweisung
UNTIL control <1;
Line:=2;
END; //END Line5 FlugStartlPos

IF Line==6 THEN //Beginn FlugZielPos
STARTVIEW(-1);
LOCAL BG,BGM,BGS,LG,LGM,LGS;
LOCAL control:=1;

REPEAT

INPUT({{BG,[0],{60,20,0}},
{BGM,[0],{60,20,1}},
{BGS,[0],{60,20,2}},
{LG,[0],{60,20,4}},
{LGM,[0],{60,20,5}},
{LGS,[0],{60,20,6}}},
"Ziel Position",
{"Breitengrad LAT [°] ","Breitenminute [´] ","Breitensekunde [ ̋ ] ","Längengrad LONG [°] ","Längenminute [´] ","Längensekunde [ ̋ ] "},
{"Breitengrad [LATITUDE]","Breitenminute","Breitensekunde","Längengrad LONGITUTE ","Längenminute","Längensekunde"});
C500:=BG+BGM/60+BGS/3600;
D500:=LG+LGM/60+LGS/3600;

CASE

IF (BG<47 or BG>55) THEN MSGBOX("Breitengrad ausserhalb Deutschland");control:=1; END;
IF (LG<6 or LG>15) THEN MSGBOX("Längengrad ausserhalb Deutschland"); control:=1; END;
IF ((BGM<0 or BGM>60) OR (BGS<0 or BGS>60) OR (LGM<0 or LGM>60) OR (LGS<0 or LGS>60)) THEN MSGBOX("Eingabe [ˊ] und [ ̋ ]nur von 0 - 60 erlaubt!"); control:=1; END;

DEFAULT control:=0;

END; //ENDE CASE-Anweisung
UNTIL control <1;
Line:=7;
END;
END; //END Line6 FlugZielPos


IF Line==7 THEN //Start Flugparameter
STARTVIEW(-1);
//LOCAL TA1,WR1,WS1,RW1,LA1,VA1,DE1,WC1;
//LOCAL VG1,MW1,BN1,BM1,P3;
LOCAL control:=1;
LOCAL m,m1,mx,my;
REPEAT

INPUT({{TA1,[0],{60,20,0}},
{WR1,[0],{60,20,1}},
{WS1,[0],{60,20,2}},
{VA1,[0],{60,20,3}},
{DE1,[0],{60,20,4}},
{BN1,[0],{60,20,6}}},
"AirSpeed / Wind",
{"Fluggeschwindigkeit TAS [KT] ","Windrichtung WR [°] ","Windgeschwindigkeit WS [KT] ",
"Variation [°] ","Deviation ","Benzinverbrach [l/h] "},
{"Fluggeschwindigkeit","Windrichtung","Windgeschwindigkeit","Variation","Deviation","Benzinverbrauch je Stunde"});

CASE

IF (WS1<0 or WS1>100) THEN MSGBOX("WS>0 und WS<100");control:=1; END;
IF (WS1>=TA1) THEN MSGBOX("Windstärke >= TAS!?"); control:=1; END;
IF (WR1<0 or WR1>360) THEN MSGBOX("Windrichtung zwischen 0° und 360°"); control:=1; END;
IF (VA1>30 OR VA1<-30) THEN MSGBOX("Variation zwischen >30° oder <-30°"); control:=1; END;
IF (DE1>30 OR DE1<-30) THEN MSGBOX("Deviation zwischen >30° oder <-30°"); control:=1; END;
IF (BN1<0 OR BN1>40) THEN MSGBOX("Benzinverbrach >0 bzw. <40 Liter"); control:=1; END;

DEFAULT control:=0;

END; //ENDE CASE-Anweisung
UNTIL control <1;

IF ABS(D500-B500)<0.02 AND (C500<A500) THEN RW1:=180;
LA1:=60*(A500-C500);
END;

IF ABS(D500-B500)<0.02 AND (C500>A500) THEN RW1:=0;
LA1:=60*(C500-A500);
END;

IF ABS(C500-A500)<0.02 AND (D500<B500) THEN RW1:=270;
LA1:=60*(B500-D500)*COS(A500);
END;

IF ABS(C500-A500)<0.02 AND (D500>B500) THEN RW1:=90;
LA1:=60*(B500-D500)*COS(A500);
END;

X1:=0.00758*(D500-B500);
Y1:=(LOG(TAN(45+C500/2))-LOG(TAN(45+A500/2)));
RW1:=ATAN(X1/Y1);
LA1:=(C500-A500)*60/COS(RW1);
IF LA1<0 THEN LA1:=-1*LA1; RW1:=RW1-180;END;

IF RW1<0 THEN RW1:=360+RW1; END;
IF RW1>360 THEN RW1:=RW1-360; END;

WC1:=0;
IF ABS(WR1-RW1-180)<2 THEN VG1:=TA1+WS1;
END;

IF ABS(WR1-RW1)<2 THEN VG1:=TA1-WS1;
END;

X2:=SIN(WR1-RW1-180);

IF X2==0 THEN Z1:=LA1/VG1 ELSE

WC1:=ASIN(WS1*X2/TA1);
Y2:=SIN(360+RW1-WR1-WC1)*TA1;
VG1:=Y2/X2;
MW1:=RW1-WC1-DE1-VA1;

IF MW1<0 THEN MW1:=360+MW1;
END;

IF MW1>360 THEN MW1:=MW1-360;
END;

Z1:=LA1/VG1;
END; //Ende von IF THEN ELSE

IF Z1==IP(Z1) THEN P3:=0; Z1:=IP(Z1); P3:=IP(P3) ELSE
P3:=FP(Z1)*60;
END;

BM1:=IP((0.2+Z1)*BN1); // Benm1=Benzinverbrauch

SW1:=ROUND(ABS(SIN(RW1-WR1)*WS1),1);//Seitenwind
VW1:=ROUND(WC1*-1,0);//Vorhaltewinkel
GG1:=ROUND(VG1,0);//Geschwindigkeit über Grund
CH1:=ROUND(MW1,0);//Kompaskurs

//BEGINN GRAFIK

LOCAL X,Y,WI,N;
LOCAL U,V;
LOCAL F:=#FF0000; //ROT
LOCAL O:=RGB(0,0,128); //BLAU

RECT(RGB(154,205,50));
//REPEAT

//K:=GETKEY;

//INPUT(WI)

ARC_P(160,120,60);
ARC_P(160,120,59,RGB(0,120,15),RGB(150,150,150));
ARC_P(160,120,4);ARC_P(160,120,3);

TEXTOUT_P("Flugrichtung "+ROUND(RW1,0)+"°",20,5,4);
FOR N FROM 1 TO 4 STEP 1 DO
ARC_P(10,13,N,F);
END;

TEXTOUT_P("Wind aus "+ROUND(WR1,0)+"°"+" / "+WS1+" KN",20,210,4);
FOR N FROM 1 TO 4 STEP 1 DO
ARC_P(10,219,N,O);
END;


TEXTOUT_P("N",153,30,6);
RECT_P(159,55,161,65,#000000);

TEXTOUT_P("O",229,107,6);
RECT_P(95,119,105,121,#000000);

TEXTOUT_P("S",155,186,6);
RECT_P(159,175,161,185,#00000);

TEXTOUT_P("W",72,107,6);
RECT_P(215,119,225,121,#000000);

IF (RW1>=90 AND RW1<=270) THEN
TEXTOUT_P("Start",145,100,3) ELSE
TEXTOUT_P("Start",145,125,3); END;

//FLUGRICHTUNG
IF (RW1>=0 AND RW1<=90) THEN
X:=IP(SIN(RW1)*60);
Y:=IP(√(60^2-X^2));
LINE_P(160,120,(160+X),(120-Y));
FOR N FROM 1 TO 4 STEP 1 DO
ARC_P(160+X,120-Y,N,F);
END;
END;

//WINDRICHTUNG
IF (WR1>=0 AND WR1<=90) THEN
U:=IP(SIN(WR1)*60);
V:=IP(√(60^2-U^2));
LINE_P((160+U/1.4),(120-V/1.4),(160+U),(120-V));
FOR N FROM 1 TO 4 STEP 1 DO
ARC_P(160+U,120-V,N,O);
END;
END;

//FLUGRICHTUNG
IF (RW1>90 AND RW1<=180) THEN
X:=IP(SIN(RW1)*60);
Y:=IP(√(60^2-X^2));
LINE_P(160,120,(160+X),(120+Y));
FOR N FROM 1 TO 4 STEP 1 DO
ARC_P(160+X,120+Y,N,F);
END;
END;

//WINDRICHTUNG
IF (WR1>90 AND WR1<=180) THEN
U:=IP(SIN(WR1)*60);
V:=IP(√(60^2-U^2));
LINE_P((160+U/1.4),(120+V/1.4),(160+U),(120+V));
FOR N FROM 1 TO 4 STEP 1 DO
ARC_P(160+U,120+V,N,O);
END;
END;

//FLUGRICHTUNG
IF (RW1>180 AND RW1<=270) THEN
X:=IP(SIN(RW1-180)*60);
Y:=IP(√(60^2-X^2));
LINE_P(160,120,(160-X),(120+Y));
FOR N FROM 1 TO 4 STEP 1 DO
ARC_P(160-X,120+Y,N,F);
END;
END;

//WINDRICHTUNG
IF (WR1>180 AND WR1<=270) THEN
U:=IP(SIN(WR1-180)*60);
V:=IP(√(60^2-U^2));
LINE_P((160-U/1.4),(120+V/1.4),(160-U),(120+V));
FOR N FROM 1 TO 4 STEP 1 DO
ARC_P(160-U,120+V,N,O);
END;
END;

//FLUGRICHTUNG
IF (RW1>270 AND RW1<=360) THEN
X:=IP(COS(RW1-270)*60);
Y:=IP(√(60^2-X^2));
LINE_P(160,120,(160-X),(120-Y));
FOR N FROM 1 TO 4 STEP 1 DO
ARC_P(160-X,120-Y,N,F);
END;
END;

//WINDRICHTUNG
IF (WR1>270 AND WR1<=360) THEN
U:=IP(COS(WR1-270)*60);
V:=IP(√(60^2-U^2));
LINE_P((160-U/1.4),(120-V/1.4),(160-U),(120-V));
FOR N FROM 1 TO 4 STEP 1 DO
ARC_P(160-U,120-V,N,O);
END;
END;
WAIT();
//RETURN
//UNTIL K==0;

//ENDE GRAFIK

RECT(RGB(154,205,50));
PRINT();
TEXTOUT_P("F L U G N A V I G A T I O N",31,10,7,RGB(255,255,255));

TEXTOUT_P("Rechtsw. Kurs zum Ziel: ",10,40,4);
TEXTOUT_P("=",190,40,4);
TEXTOUT_P((ROUND(RW1,0)+" Grad"),210,40,4);

TEXTOUT_P("Entfernung: ",10,60,4);
TEXTOUT_P("=",190,60,4);
TEXTOUT_P((ROUND(LA1,0)+" NM"),210,60,4);

TEXTOUT_P("Kompas Kurs [CH]: ",10,80,4);
TEXTOUT_P("=",190,80);
TEXTOUT_P((ROUND(CH1,0)+" Grad"),210,80,4);

TEXTOUT_P("Geschwind. über Grund: ",10,100,4);
TEXTOUT_P("=",190,100,4);
TEXTOUT_P((ROUND(GG1,0)+" Grad"),210,100,4);

TEXTOUT_P("Vorhaltewinkel: ",10,120,4);
TEXTOUT_P("=",190,120,4);
TEXTOUT_P((ROUND(VW1,0)+" Grad"),210,120,4);

TEXTOUT_P("Seitenwindkomponente: ",10,140,4);
TEXTOUT_P("=",190,140,4);
TEXTOUT_P((ROUND(SW1,0)+" Grad"),210,140,4);


TEXTOUT_P(("Flugzeit "+(IP(Z1))+" Stunde "+(IP(P3))+" [Minuten]"),10,175,4);
TEXTOUT_P(("Benzinverbrauch "+BM1+" Liter"),10,195,4);

DRAWMENU("ENDE","","NavNeu","","","zurück");

REPEAT
// Get mouse data
REPEAT
m:=MOUSE; m1:=m(1);
UNTIL SIZE(m1)>0;
mx:=m1(1); my:=m1(2);


// ENDE
IF (my≥220 AND my≤319) AND (mx≥0 AND mx≤51) THEN
Line:=0; Startview(-1);
END;
STARTVIEW(-4);

//Flugnavigation neu
IF (my≥220 AND my≤319) AND (mx≥106 AND mx≤157) THEN
Line:=1;
END;
//END;
//END;
//Close main loop
UNTIL ((my≥220 AND my≤319) AND (mx≥0 AND mx≤51) or (my≥220 AND my≤319) AND (mx≥256 AND mx≤319) or (my≥220 AND my≤319) AND (mx≥106 AND mx≤157));
END;

END; //END Line7 Flugparameter

STARTVIEW(-4);
END;// MyNav
Find all posts by this user
Quote this message in a reply
04-09-2017, 01:55 PM
Post: #12
RE: How can I make an app from an application?
You need to read the documentation, the example was just to get you starting.

Read about how to use STARTAPP, STARTVIEW, etc and everything is going to make more sense.

My website: erwin.ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)