Recent

Author Topic: Basic Question from a beginner (Dummy would like to know)  (Read 11643 times)

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Basic Question from a beginner (Dummy would like to know)
« on: January 16, 2018, 09:03:18 pm »
    ====================================================
I'm looking at Free Basic or Free Pascal to write a simple Windows program, well not so simple, as I'm finding out.

The program I'm interested in writing is for my X-Plane 11 flight simulator.

Presently I create a flight plan on a site called SimBrief. After creating the flight plan SimBrief will downloads the plan to my Download directory.
From there I have to copy and past the plan to location in the X-Plane 11 directory structure based on the plane I'm had SimBrief build the plan for.

The flight plans can be a special formatted file, XML or text file.

The plan is also associated with a cycle number called an AIRAC cycle. AIRAC cycles are updated every  month. AIRAC cycles come from Navigraph in Sweden. The current Cycle is 1801.
You buy a yearly subscription or an occasional cycle. Flying Jet airliners on plans made with out of date AIRAC cycles can be difficult. Missed approaches, bad SID and STARS.
Plans can have twenty or thirty way points. They can be entered into the FMC (Flight Data Computed) by hand, tedious work or loaded, much better, from the SibBrief built
plans.   

The program Retirements:

The download plan is always named KPHXKLAX.flp. (Starting Airport ICO code, Destination airpot ICO code) The extension  can vary from .flp, _route, ebr, pln and 5 or six more
extensions. Could be KJFKKPRD.ebr JFK to Chicago.

Once the plan is in your downloads directory it will look like this:   KPHXKLAX.flp or KPHXKLAX.ebr (Phoenix to LAX). The extension depends on which aircraft the plan was built for.

Next the file must be copied to a special directory. Each plane requires it own Directory. If you are flying an X-plane 11 supplied plane, one that comes with X-Plane the plan needs
to be copied or moved to C:\X-Plane 11\OUTPUT\FMS Plans\.

However, FF Boeing767-300ER and 777 have to be moved to C:\X-Plane 11\Aircraft\Boeing767-300ER\plugins\757767Avionics\routes\.

I have 5 payware planes (Not X-Plane 11 base product planes) all requiring flight plans installs in various special directories.

Can I use Free Pascal to:

1. Locate a flight plan file(s) in my Download directory.
2. Check the system date stamp on the file.
3. Calculate the AIRAC Cycle based on the date the file was placed in Downloads. (may or may not be accurate).
3. Rename the file from  say KPHXKLAX.fpl to FF757KPHXKLAS1801.flp. (Includes the plane and ARIC cycle in the name)
4. Move or copy the file to a MasterFlightPlans directory.
5. Have the user select the flight plan from a list box. List would look like:

              Aircraft     Flt Plan     AIRAC
               FF757       KPHXKLAX      1801
               LR BC90     KSDLJSEA      1801
               IXEG737     KORDKJFK      1711

6. Copy say FF757KPHXKLAS1801.flp. to the required  destination.
7. Rename   FF757KPHXKLAS1801.flp to  KPHXKLAS.flp. (required format for the FMC to load).
8. User should be able to delete out of date flight plans in the MasterFlightPlans directory.
9. User should be able to delete flight plan files in the various directories on his system.

I have managed to download and install Lazarus  and Free Pascal. I did the usual examples of Hello World and few simple other programs. I have a Form1 with a list box a label and a
Button on the form. Button is coded to Close the form. "Close;"

Not sure if Free Pascal can do what I want.

I need to populate the list box with a list of 10 or 12 aircraft names.
Not sure where the code should go. or the code required.

When I load my project the Fourm1 wont always appear. And at times I can't get it to appear. Ca't find a menu option to display it.




   
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #1 on: January 16, 2018, 09:23:40 pm »
Not sure if Free Pascal can do what I want.
Combined with the Lazarus library (LCL) yes it can, as a GUI app.

Quote
I need to populate the list box with a list of 10 or 12 aircraft names.
Not sure where the code should go. or the code required.
When I load my project the Fourm1 wont always appear. And at times I can't get it to appear. Ca't find a menu option to display it.
Use Project->Publish project to export your project in a new directory. Zip (or otherwise compress) those sources and use the +Attachments and other options button to upload your project to this forum if you want others to help you develop it.




   

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #2 on: January 16, 2018, 10:19:53 pm »
OK attached is what I have so far. I don't expect anyone to do the program, just get me started.

Is there a Lazarus PDF manual I can download.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #3 on: January 17, 2018, 01:38:30 am »
Here's a function to obtain an AIRAC from a filename which you can use.

Code: Pascal  [Select][+][-]
  1. unit uAIRAC;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   SysUtils;
  9.  
  10. function AiracOfFile(aFilename: String): Integer;
  11.    { returns -1 for invalid filename or file outside date range 2017-2021,
  12.      else returns valid AIRAC number }
  13.  
  14. implementation
  15.  
  16. function AiracOfFile(aFilename: String): Integer;
  17. var
  18.   dt: TDateTime;
  19.   y, m, d: word;
  20. begin
  21.   if not FileExists(aFilename) or not FileAge(aFilename, dt, False) then
  22.     Exit(-1);
  23.   DecodeDate(dt, y, m, d);
  24.   case y of
  25.     2017: case m of
  26.             1: case d of
  27.                  5..31: Exit(1701);
  28.                  else   Exit(-1);
  29.                end;
  30.             2: case d of
  31.                  1:     Exit(1701);
  32.                  2..28: Exit(1702);
  33.                end;
  34.             3: case d of
  35.                  1:     Exit(1702);
  36.                  2..29: Exit(1703);
  37.                  31:    Exit(1704);
  38.                end;
  39.             4: case d of
  40.                  1..26:  Exit(1704);
  41.                  27..30: Exit(1705);
  42.                end;
  43.             5: case d of
  44.                  1..24:  Exit(1705);
  45.                  25..31: Exit(1706);
  46.                end;
  47.             6: case d of
  48.                  1..21:  Exit(1706);
  49.                  22..30: Exit(1707);
  50.                end;
  51.             7: case d of
  52.                  1..19:  Exit(1707);
  53.                  20..31: Exit(1708)
  54.                end;
  55.             8: case d of
  56.                  1..16:  Exit(1708);
  57.                  17..31: Exit(1709);
  58.                end;
  59.             9: case d of
  60.                  1..13:  Exit(1709);
  61.                  14..30: Exit(1710);
  62.                end;
  63.             10: case d of
  64.                  1..11:  Exit(1710);
  65.                  12..31: Exit(1711);
  66.                 end;
  67.             11: case d of
  68.                  1..8:  Exit(1711);
  69.                  9..30: Exit(1712);
  70.                 end;
  71.             12: case d of
  72.                  1..6:  Exit(1712);
  73.                  7..31: Exit(1713);
  74.                 end;
  75.           end; // case m
  76.     2018: case m of
  77.             1: case d of
  78.                  1..3:  Exit(1713);
  79.                  4..31: Exit(1801);
  80.                end;
  81.             2: case d of
  82.                  1..28: Exit(1802);
  83.                end;
  84.             3: case d of
  85.                  1..28:  Exit(1803);
  86.                  29..31: Exit(1804);
  87.                end;
  88.             4: case d of
  89.                  1..25:  Exit(1804);
  90.                  26..30: Exit(1805);
  91.                end;
  92.             5: case d of
  93.                  1..23:  Exit(1805);
  94.                  24..31: Exit(1806);
  95.                end;
  96.             6: case d of
  97.                  1..20:  Exit(1806);
  98.                  21..30: Exit(1807);
  99.                end;
  100.             7: case d of
  101.                  1..18:  Exit(1807);
  102.                  19..31: Exit(1808)
  103.                end;
  104.             8: case d of
  105.                  1..15:  Exit(1808);
  106.                  16..31: Exit(1809);
  107.                end;
  108.             9: case d of
  109.                  1..12:  Exit(1809);
  110.                  13..30: Exit(1810);
  111.                end;
  112.             10: case d of
  113.                  1..10:  Exit(1810);
  114.                  11..31: Exit(1811);
  115.                 end;
  116.             11: case d of
  117.                  1..7:  Exit(1811);
  118.                  8..30: Exit(1812);
  119.                 end;
  120.             12: case d of
  121.                  1..5:  Exit(1812);
  122.                  6..31: Exit(1813);
  123.                 end;
  124.           end; // case m
  125.     2019: case m of
  126.             1: case d of
  127.                  1..2:  Exit(1813);
  128.                  3..30: Exit(1901);
  129.                  31:    Exit(1902);
  130.                end;
  131.             2: case d of
  132.                  1..27: Exit(1902);
  133.                  28:    Exit(1903);
  134.                end;
  135.             3: case d of
  136.                  1..27:  Exit(1903);
  137.                  28..31: Exit(1904);
  138.                end;
  139.             4: case d of
  140.                  1..24:  Exit(1904);
  141.                  25..30: Exit(1905);
  142.                end;
  143.             5: case d of
  144.                  1..22:  Exit(1905);
  145.                  23..31: Exit(1906);
  146.                end;
  147.             6: case d of
  148.                  1..19:  Exit(1906);
  149.                  20..30: Exit(1907);
  150.                end;
  151.             7: case d of
  152.                  1..17:  Exit(1907);
  153.                  18..31: Exit(1908)
  154.                end;
  155.             8: case d of
  156.                  1..14:  Exit(1908);
  157.                  15..31: Exit(1909);
  158.                end;
  159.             9: case d of
  160.                  1..11:  Exit(1909);
  161.                  12..30: Exit(1910);
  162.                end;
  163.             10: case d of
  164.                  1..9:   Exit(1910);
  165.                  10..31: Exit(1911);
  166.                 end;
  167.             11: case d of
  168.                  1..6:  Exit(1911);
  169.                  7..30: Exit(1912);
  170.                 end;
  171.             12: case d of
  172.                  1..4:  Exit(1912);
  173.                  5..31: Exit(1913);
  174.                 end;
  175.           end;
  176.     2020: case m of
  177.             1: case d of
  178.                  1:     Exit(1913);
  179.                  2..29: Exit(2001);
  180.                  30..31:Exit(2002);
  181.                end;
  182.             2: case d of
  183.                  1..26: Exit(2002);
  184.                  27..29:Exit(2003);
  185.                end;
  186.             3: case d of
  187.                  1..25:  Exit(2003);
  188.                  26..31: Exit(2004);
  189.                end;
  190.             4: case d of
  191.                  1..22:  Exit(2004);
  192.                  23..30: Exit(2005);
  193.                end;
  194.             5: case d of
  195.                  1..20:  Exit(2005);
  196.                  21..31: Exit(2006);
  197.                end;
  198.             6: case d of
  199.                  1..17:  Exit(2006);
  200.                  18..30: Exit(2007);
  201.                end;
  202.             7: case d of
  203.                  1..15:  Exit(2007);
  204.                  16..31: Exit(2008)
  205.                end;
  206.             8: case d of
  207.                  1..12:  Exit(2008);
  208.                  13..31: Exit(2009);
  209.                end;
  210.             9: case d of
  211.                  1..9:   Exit(2009);
  212.                  10..30: Exit(2010);
  213.                end;
  214.             10: case d of
  215.                  1..7:  Exit(2010);
  216.                  8..31: Exit(2011);
  217.                 end;
  218.             11: case d of
  219.                  1..4:  Exit(2011);
  220.                  5..30: Exit(2012);
  221.                 end;
  222.             12: case d of
  223.                  1..2:  Exit(2012);
  224.                  3..30: Exit(2013);
  225.                  31:    Exit(2014);
  226.                 end;
  227.           end;
  228.     2021: case m of
  229.       1: case d of
  230.            1:      Exit(2014);
  231.            28..31: Exit(2101);
  232.          end;
  233.       2: case d of
  234.            1..24: Exit(2101);
  235.            25..28:Exit(2102);
  236.          end;
  237.       3: case d of
  238.            1..24:  Exit(2102);
  239.            25..31: Exit(2103);
  240.          end;
  241.       4: case d of
  242.            1..21:  Exit(2103);
  243.            22..30: Exit(2104);
  244.          end;
  245.       5: case d of
  246.            1..19:  Exit(2104);
  247.            20..31: Exit(2105);
  248.          end;
  249.       6: case d of
  250.            1..16:  Exit(2105);
  251.            17..30: Exit(2106);
  252.          end;
  253.       7: case d of
  254.            1..14:  Exit(2106);
  255.            15..31: Exit(2107)
  256.          end;
  257.       8: case d of
  258.            1..11:  Exit(2107);
  259.            12..31: Exit(2108);
  260.          end;
  261.       9: case d of
  262.            1..8:  Exit(2108);
  263.            9..30: Exit(2109);
  264.          end;
  265.       10: case d of
  266.            1..6:  Exit(2109);
  267.            7..31: Exit(2110);
  268.           end;
  269.       11: case d of
  270.            1..3:  Exit(2110);
  271.            4..30: Exit(2111);
  272.           end;
  273.       12: case d of
  274.            1:     Exit(2111);
  275.            2..29: Exit(2112);
  276.            30..31:Exit(2113);
  277.           end;
  278.     end;
  279.     else Exit(-1);
  280.   end;
  281. end;
  282.  
  283. end.

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #4 on: January 17, 2018, 03:10:10 am »
So this is a unit which I would include in the program. The Unit contains a function. Function always return something.
What this will return is the AIRAC cycle part of the file name.

 function AiracOfFile(aFilename: String): Integer; So I call this function like so.

myInteger = AiracOfFile('1801KPHXKLAS.pln'); '1801KPHXKLAS.pln" would be pased in a string variable.

After the call muyInteger := 1801 but it could equal -1 I think.

It uses SysUtils, not sure what that is. and calls FileExists and DecodeDate. Can I assume they are functions in  SysUtils.

I did a search in help but they weren't there.

I copied the code but I'm not sure yet how and where I include it in my project.

Still trying to figure things like that out. But it's kinda like trying to drink from a fire hose.

Notice the function is defined on line 10 and then after Implementation it is writen out. Is this a requirement of  a unit

I havent got to Units yet in my reading.
Do I file it in my project Directory?
What is the naming convention of it or is just Unit good?
 
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #5 on: January 17, 2018, 03:16:52 am »
Just noticed that its called unit uAIRAC so it probably should be called uAIRAC.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #6 on: January 17, 2018, 10:40:14 am »
If I understand correctly you are writing a file management program which will identify downloaded files based on their name and/or extension, list them, rename them, and copy (or move?) them to specific directories, and also allow deletion (automatic?) based on a date criterion.
What makes a flight plan out of date?
Can you list the various plane categories you want to cater for, and the corresponding folders where each category needs to live?
Can you list the various file extensions you want your app to recognise?

With most programming tasks the devil is usually in the detail...
On your learning curve you'll need to become familiar with LCL and FCL file handling routines, and components like TOpenDialog.
You'll also need to understand how to parse strings to identify or concatenate parts as required.
The wiki has lots of tutorial material (and links elsewhere) to help you get to grips with units, Pascal naming and concepts such as enumerations which will help you organise your data well.

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #7 on: January 17, 2018, 08:31:30 pm »
"file management program which will identify downloaded files based on their name and/or extension"

Just based on their extensions. (about 10 different extensions)

"list them, rename them, and copy (or move?) them to specific directories, and also allow deletion (automatic?) based on a date criterion."

Allow selective deletion (Not automatic).

"What makes a flight plan out of date?"

When the Flight Plan is created it uses an AIRAC Cycle. AIRAC CYCLE are provided by the FAA. They list all the way points, airports, airways, VOR, DME, basically all the air navigation known to man. All this stuff changes all the time. The FAA last year adjusted the airport headings on all the runways in the US due to to polar shift. New AIRAC's are released each month and Navaigraph formats it and supplies it users.

Note: The Flight Plans downloaded from SimBrief don't have the AIRAC Cycles number in them in any way. Don't know why. I think they consider them throw a ways. Use once and delete. But actually I use them more than once. May fly SSG 747 from PANC (Anchorage) to KORD (Chicago) and then the FF 767 on the same route to compare performance.

Can you list the various plane categories you want to cater for, and the corresponding folders where each category needs to live?

Aircraft                         Flight Plan                                                       Required Documentation
Aerosoft Airbus            KPHXKLAX01.flp                <Documents>/Aerosoft/Airbus/Flightplans\
Aerosoft CRJ                KPHXKLAX.flp                   <Documents>/Aerosoft/Digital Aviation CRJ/FlightPlans\
Aerowinx PSX 747        KPHXKLAX01_route
AivlaSoft EFB               KPHXKLAX01.ebr
Black Box Airbus          KPHXKLAX.pln                   <FSX/P3D>/Blackbox Simulation/Company Routes\
FeelThere                   KPHXKLAX.nz2k.fpl
Flight1 GTN               KPHX-KLAX.grp                   <FSX/P3D>/F1GTN/FPL\
FlightFactor 777         KPHXKLAX.flp
FlightFactor A320       corte.in                      <X-Plane 11/Aircraft/A320/data\
FS Commander          KPHXKLAX.pln
FS204                      KPHXKLAX._FS9_11Jan18.pln          <Documents>/Flight Simulator Files\
FSX               KPHXKLAX._FSX_11Jan18.pln          <Documents>/Flight Simulator X Files\
P3D                        KPHXKLAX._FSX_11Jan18.pln          <Documents>/Prepar3D v__ Files\
FSLabs A320           KPHXKLAX._AOC_UPLINK.txt
Prepar3D v4        KPHXKLAX._AOC_UPLINK.txt      
Google Earth KML    KPHXKLAX.KML                    C:\Downloads
               
Note: There are three main Flight Simulators, but several versions of each one. I have X-Plane 11.05 and X-Plane 11.11.
There is X-Plane 9, X-Plane 10, FSX and Prepar3D v4, Prepar3D v3. Most of us have the latest release and one release back on a storage disk. My storage disk is active so I can fly planes under ver. 11.11 and 11.05.

It would be nice to be able to write this so it could be used by all three flight simulators. I may get Prepar3D v4 because they have planes X-Plane 11 dosen't have.

"On your learning curve you'll need to become familiar with LCL and FCL file handling routines, and components like TOpenDialog.

Yes, LCL Lazarus Component Library, FCL ? but yea I agree.

"You'll also need to understand how to parse strings to identify or concatenate parts as required."

The file names will always be KORDPANC.flp, or KORDPANC.flp of course the KORDPANC may be different letters but sometimes the file is download with a 01 attached. They can be idenitified by the extensions.


"The wiki has lots of tutorial material (and links elsewhere) to help you get to grips with units"

I agree, there is a lot information but its not organized well. It is a tedious nightmare to look thru. I got the "unit uAIRAC;" compiled but cant find where how to include it into the project.   

 
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #8 on: January 18, 2018, 03:49:52 am »
I agree, there is a lot information but its not organized well. It is a tedious nightmare to look thru. I got the "unit uAIRAC;" compiled but cant find where how to include it into the project.   

Just put the uAIRAC on the uses clause in the source that needs to call the functions of uAIRAC. Read more about uses clause:
https://www.freepascal.org/docs-html/ref/refse105.html

FPC/Lazarus documentations/tutorials grouped by topic:
http://wiki.freepascal.org/Lazarus_Documentation

If you interested to learn Pascal/FPC/Lazarus, here is a good list that should give you a good start:
https://forum.lazarus.freepascal.org/index.php/topic,39286.msg269090.html#msg269090
« Last Edit: January 18, 2018, 03:56:02 am by Handoko »

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #9 on: January 18, 2018, 05:46:58 am »
Handoko

Ok I'll work my way  thru all that.

I'm masking a little progress. Almost went to Free Basic because I was kinda stuck. Still have a steep learning curve but have made some progress.

I now have a two screen project with the main forn1 calling form2. I realized I need some info from the user, me, about the location of my install of X-Plane 11.11 and X-Plane 11.05 ( previous Version).

The location of where the user wants to create the MasterFlightPlans directory and the location of his downloads Dir.
OOPS -  I just opened a DOS box and typed:

C:\>cd: downloads
The system cannot find the path specified.

I can look at it in File Explorer.
Do I have a NO CAN DO IDEA?


 
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #10 on: January 18, 2018, 06:13:57 am »
My PC was built for X-Plane 11 with a 500 gig SSD drive where X-Plane 11 and Win 10 Pro are both installed.

Turns out the builder placed everything else on my 1 terabyte F: drive and set up the 500 gig E: for archives zip files.

So:
f:\cd \user\downloads gets me to f:\downloads

QUESTION:

In the DOS BOX at f:\>\user\downloads I typed:
F:\>\user\downloads>dir *.* >zz.txt
This created a file called zz.txt with all the files and folders in the downloads dir.

Could I issue this command within pascal window program.

I'm thinking I could then read the file line at a time looking for my extension on the file plans.
I know I could read the file, Haven't found anyway to issue the  dir *.* >zz.txt




 
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #11 on: January 18, 2018, 06:54:51 am »
In the DOS BOX at f:\>\user\downloads I typed:
F:\>\user\downloads>dir *.* >zz.txt
This created a file called zz.txt with all the files and folders in the downloads dir.

Did you mean you want to list all files in a directory? If yes, you can use FindFirst and FindNext or TFileListBox.

Read more here:
https://www.freepascal.org/docs-html/rtl/dos/findfirst.html
https://www.freepascal.org/docs-html/rtl/dos/findnext.html
http://lazarus-ccr.sourceforge.net/docs/lcl/filectrl/tfilelistbox.html
https://forum.lazarus.freepascal.org/index.php/topic,39066
https://forum.lazarus.freepascal.org/index.php/topic,37942.0.html
« Last Edit: January 18, 2018, 07:04:26 am by Handoko »

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #12 on: January 18, 2018, 04:31:50 pm »
Yes, I think so,

I can use FindFirst, FindNext and TFileListBox.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #13 on: January 18, 2018, 04:46:13 pm »
You should try TFileListBox first, which I is easier.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Basic Question from a beginner (Dummy would like to know)
« Reply #14 on: January 18, 2018, 06:33:06 pm »
Is the simulator associated with a flight plan always uniquely determined by the flight plan file extension?

Presumably the specific aircraft each flight plan is designed for is data found by parsing the file. Can you post a few example files so we can figure out how to deduce this information, so the correct plane type is associated with the each flight plan?
The more I look at this, the less it seems like a simple beginner's project ... so I think you'll need more help.

 

TinyPortal © 2005-2018