Jump to content
Sign in to follow this  
benne36

Problem with the LUA display (german/english)

Recommended Posts

German:

hallo,
ich habe folgendes Problem. Ich bearbeite so eigene Programmierungen meiner Flugzeuge.
Im FSX war auch alles ohne Probleme.

In P3Dv4 funktioniert es leider nicht mehr.

Beschreibung: 
Ich habe mir am Anfang einer ausführbaren Funktion im FSX folgendes eingesetzt, um die Funktion mit einer Taste dann zu starten, entweder mit J  zum starten oder N zum nicht starten. 
Wenn die Funktion dann gestartet wird, öffnet sich zuerst ein grüner Balken mit roten Text, der mich fragt, ob ich die Funktion ausführen möchte und das LUA Display ist auch zu sehen.

Hier einmal ein Auszug für die PMDG 737 NGX zum für den Start Preflight:
----------------------------------------------------------------------------------------------------------- 
function Preflight ()

  -- set general sleep time between
    sleepVal = 100


ipc.display("Preflight initiated...")
ipc.sleep(2000)

questvar = ipc.ask("Captain, do you want to go Preflight? (j / n)")

if questvar == "j" then


    ipc.display ("Please wait, going Preflight!")
    ipc.sleep(250)

---------------- start


    sleepVal = 100
    s1 = 200
    s2 = 400

    ipc.sleep(2000)
    DOOR_AFT_L_CARGO_ALL_open ()
    ipc.sleep(2000)
    NGX_DOME_bright ()
    ipc.sleep(2000)
    NGX_LIGHT_ALL_on ()
    ipc.sleep(2000)
    NGX_FLOOD_ALL_on ()
    ipc.sleep(2000)
    NGX_LIGHT_CHART_AND_MAP_ON ()
    ipc.sleep(2000)
    NGX_EFIS_NAV1_vor ()
    ipc.sleep(2000)
    NGX_EFIS_NAV2_vor ()
    ipc.sleep(2000)
    NGX_EFIS_FO_NAV1_vor ()
    ipc.sleep(2000)
    NGX_EFIS_FO_NAV2_vor ()
    ipc.sleep(2000)
    NGX_EFIS_ND_RNG_TFC ()
    ipc.sleep(2000)
    NGX_EFIS_MTRS ()
    ipc.sleep(2000)
    NGX_EFIS_FO_MTRS ()
    ipc.sleep(2000)
    NGX_AP_FD1_on ()
    ipc.sleep(2000)
    NGX_AP_FD2_on ()
    ipc.sleep(2000)
    NGX_CDU_open ()
    ipc.sleep(2000)

---------------- end
    ipc.display("Preflight READY!\n Thanks for your patience, Captain!")
    ipc.sleep(2000)
    ipc.display ("")

----negative --------------------------
    elseif questvar ~= "j" then

    ipc.display("Ok, was just a question, Sir!\nHave a nice day...")

    ipc.sleep(2000)

    end


ipc.display("")

end

-------------------------------------------------------------------------------------------------------------

Im P3Dv4 wird zwar die Funktion ausgeführt und das Fenster (heisst jetzt im P3Dv4 "SimConnect Message Window")  öffnet sich, aber das Fenster schließt sich nicht mehr von alleine, nach dem die Funktion bestätige habe.
Ich hätte das aber gerne so wie im FSX, das sich im P3Dv4 das LUA Dislpay von alleine schließt.

Kann mir da einer Helfen, wie ich das im Editor schreiben kann, damit sich das Fenster wieder von alleine schließt?

Danke im voraus.

MfG benne36

 

English:

Hello,
I have the following problem. I thus work on my own programming of my aircraft.
In the FSX everything was without problems.

In P3Dv4 it does not work anymore.

Description:
I have used at the beginning of an executable function in the FSX the following to start the function with a key, either with J to start or N to not start.
When the function is started, a green bar opens with red text asking me if I want to run the function and the LUA display is also visible.

Here is an excerpt for the PMDG 737 NGX for the launch Preflight:
-------------------------------------------------- -------------------------------------------------- -------
function Preflight ()

  - set Warenkorb non reviews between
sleepVal = 100


ipc.display ("Preflight initiated ...")
ipc.sleep (2000)

questvar = ipc.ask ("Captain, do you want to go to Preflight?")

if questvar == "j" then


ipc.display ("Please wait, going Preflight!")
ipc.sleep (250)

---------------- begin


    sleepVal = 100
    s1 = 200
    s2 = 400

    ipc.sleep (2000)
    DOOR_AFT_L_CARGO_ALL_open ()
    ipc.sleep (2000)
    NGX_DOME_bright ()
    ipc.sleep (2000)
    NGX_LIGHT_ALL_on ()
    ipc.sleep (2000)
    NGX_FLOOD_ALL_on ()
    ipc.sleep (2000)
    NGX_LIGHT_CHART_AND_MAP_ON ()
    ipc.sleep (2000)
    NGX_EFIS_NAV1_previous ()
    ipc.sleep (2000)
    NGX_EFIS_NAV2_previous ()
    ipc.sleep (2000)
    NGX_EFIS_FO_NAV1_previous ()
    ipc.sleep (2000)
    NGX_EFIS_FO_NAV2_previous ()
    ipc.sleep (2000)
    NGX_EFIS_ND_RNG_TFC ()
    ipc.sleep (2000)
    NGX_EFIS_MTRS ()
    ipc.sleep (2000)
    NGX_EFIS_FO_MTRS ()
    ipc.sleep (2000)
    NGX_AP_FD1_on ()
    ipc.sleep (2000)
    NGX_AP_FD2_on ()
    ipc.sleep (2000)
    NGX_CDU_open ()
    ipc.sleep (2000)

---------------- end
    ipc.display ("Preflight READY!" Thanks for your patience, Captain!)
    ipc.sleep (2000)
    ipc.display ("")

---- negative
elseif questvar ~ = "j" then

ipc.display ("Ok, what just a question, sir! \ nHave a nice day ...")

ipc.sleep (2000)

end


ipc.display ( "")

end

-------------------------------------------------- -------------------------------------------------- ---------

In P3Dv4 the function is executed and the window (now called in the P3Dv4 "SimConnect Message Window") opens, but the window no longer closes by itself after which the function has been confirmed.
I would like the FSX, which in the P3Dv4 the LUA Dislpay by itself close.

Can one help me as I can write in the editor, so that the window closes by itself?

Thank you in advance.

by benne36

Share this post


Link to post
Share on other sites

Hi Benne

Thank you for your detailed question. The way FSUIPC5 handles the on screen message has changed with P3Dv4. The same query has been asked on the FSUIPC Forum. The problem may see a fix in P3Dv4.1. 

The messages in LINDA init.lua use the timeout parameters to close the message after 5 secs:

ipc.display("LINDA READY...", 5)

Without the timeout the message will remain displayed.

I hope this helps.


Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Share this post


Link to post
Share on other sites
18 hours ago, benne36 said:

German:

hallo,
ich habe folgendes Problem. Ich bearbeite so eigene Programmierungen meiner Flugzeuge.
Im FSX war auch alles ohne Probleme.

In P3Dv4 funktioniert es leider nicht mehr.

Beschreibung: 
Ich habe mir am Anfang einer ausführbaren Funktion im FSX folgendes eingesetzt, um die Funktion mit einer Taste dann zu starten, entweder mit J  zum starten oder N zum nicht starten. 
Wenn die Funktion dann gestartet wird, öffnet sich zuerst ein grüner Balken mit roten Text, der mich fragt, ob ich die Funktion ausführen möchte und das LUA Display ist auch zu sehen.

Hier einmal ein Auszug für die PMDG 737 NGX zum für den Start Preflight:
----------------------------------------------------------------------------------------------------------- 
function Preflight ()

  -- set general sleep time between
    sleepVal = 100


ipc.display("Preflight initiated...")
ipc.sleep(2000)

questvar = ipc.ask("Captain, do you want to go Preflight? (j / n)")

if questvar == "j" then


    ipc.display ("Please wait, going Preflight!")
    ipc.sleep(250)

---------------- start


    sleepVal = 100
    s1 = 200
    s2 = 400

    ipc.sleep(2000)
    DOOR_AFT_L_CARGO_ALL_open ()
    ipc.sleep(2000)
    NGX_DOME_bright ()
    ipc.sleep(2000)
    NGX_LIGHT_ALL_on ()
    ipc.sleep(2000)
    NGX_FLOOD_ALL_on ()
    ipc.sleep(2000)
    NGX_LIGHT_CHART_AND_MAP_ON ()
    ipc.sleep(2000)
    NGX_EFIS_NAV1_vor ()
    ipc.sleep(2000)
    NGX_EFIS_NAV2_vor ()
    ipc.sleep(2000)
    NGX_EFIS_FO_NAV1_vor ()
    ipc.sleep(2000)
    NGX_EFIS_FO_NAV2_vor ()
    ipc.sleep(2000)
    NGX_EFIS_ND_RNG_TFC ()
    ipc.sleep(2000)
    NGX_EFIS_MTRS ()
    ipc.sleep(2000)
    NGX_EFIS_FO_MTRS ()
    ipc.sleep(2000)
    NGX_AP_FD1_on ()
    ipc.sleep(2000)
    NGX_AP_FD2_on ()
    ipc.sleep(2000)
    NGX_CDU_open ()
    ipc.sleep(2000)

---------------- end
    ipc.display("Preflight READY!\n Thanks for your patience, Captain!")
    ipc.sleep(2000)
    ipc.display ("")

----negative --------------------------
    elseif questvar ~= "j" then

    ipc.display("Ok, was just a question, Sir!\nHave a nice day...")

    ipc.sleep(2000)

    end


ipc.display("")

end

-------------------------------------------------------------------------------------------------------------

Im P3Dv4 wird zwar die Funktion ausgeführt und das Fenster (heisst jetzt im P3Dv4 "SimConnect Message Window")  öffnet sich, aber das Fenster schließt sich nicht mehr von alleine, nach dem die Funktion bestätige habe.
Ich hätte das aber gerne so wie im FSX, das sich im P3Dv4 das LUA Dislpay von alleine schließt.

Kann mir da einer Helfen, wie ich das im Editor schreiben kann, damit sich das Fenster wieder von alleine schließt?

Danke im voraus.

MfG benne36

 

English:

Hello,
I have the following problem. I thus work on my own programming of my aircraft.
In the FSX everything was without problems.

In P3Dv4 it does not work anymore.

Description:
I have used at the beginning of an executable function in the FSX the following to start the function with a key, either with J to start or N to not start.
When the function is started, a green bar opens with red text asking me if I want to run the function and the LUA display is also visible.

Here is an excerpt for the PMDG 737 NGX for the launch Preflight:
-------------------------------------------------- -------------------------------------------------- -------
function Preflight ()

  - set Warenkorb non reviews between
sleepVal = 100


ipc.display ("Preflight initiated ...")
ipc.sleep (2000)

questvar = ipc.ask ("Captain, do you want to go to Preflight?")

if questvar == "j" then


ipc.display ("Please wait, going Preflight!")
ipc.sleep (250)

---------------- begin


    sleepVal = 100
    s1 = 200
    s2 = 400

    ipc.sleep (2000)
    DOOR_AFT_L_CARGO_ALL_open ()
    ipc.sleep (2000)
    NGX_DOME_bright ()
    ipc.sleep (2000)
    NGX_LIGHT_ALL_on ()
    ipc.sleep (2000)
    NGX_FLOOD_ALL_on ()
    ipc.sleep (2000)
    NGX_LIGHT_CHART_AND_MAP_ON ()
    ipc.sleep (2000)
    NGX_EFIS_NAV1_previous ()
    ipc.sleep (2000)
    NGX_EFIS_NAV2_previous ()
    ipc.sleep (2000)
    NGX_EFIS_FO_NAV1_previous ()
    ipc.sleep (2000)
    NGX_EFIS_FO_NAV2_previous ()
    ipc.sleep (2000)
    NGX_EFIS_ND_RNG_TFC ()
    ipc.sleep (2000)
    NGX_EFIS_MTRS ()
    ipc.sleep (2000)
    NGX_EFIS_FO_MTRS ()
    ipc.sleep (2000)
    NGX_AP_FD1_on ()
    ipc.sleep (2000)
    NGX_AP_FD2_on ()
    ipc.sleep (2000)
    NGX_CDU_open ()
    ipc.sleep (2000)

---------------- end
    ipc.display ("Preflight READY!" Thanks for your patience, Captain!)
    ipc.sleep (2000)
    ipc.display ("")

---- negative
elseif questvar ~ = "j" then

ipc.display ("Ok, what just a question, sir! \ nHave a nice day ...")

ipc.sleep (2000)

end


ipc.display ( "")

end

-------------------------------------------------- -------------------------------------------------- ---------

In P3Dv4 the function is executed and the window (now called in the P3Dv4 "SimConnect Message Window") opens, but the window no longer closes by itself after which the function has been confirmed.
I would like the FSX, which in the P3Dv4 the LUA Dislpay by itself close.

Can one help me as I can write in the editor, so that the window closes by itself?

Thank you in advance.

by benne36

Hi benne36,

I was reading your post and it seems interesting to me. I would like to test your program for the Pre flight in my PMDG 737-800 and my question is, in which file should I place the parameters ?.

What are the steps to follow to make it work ?.

Thank in advance.
Paul.


Pablo Chiabrera

Share this post


Link to post
Share on other sites

Hi Paul

You would simply need to copy Paul's code into the PMDG737NGX user.lua file and assign Preflight from the line below the normal aircraft module line in the popup menu. As suggested the second to last line needs to read ipc.display("", 5).


Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Share this post


Link to post
Share on other sites

Hello Paul!
Thank you for your interest. There is no problem to give you this file. I have to say, however, that the functions I created myself are connected to the FS2Crew. I've also written an Excel file with flow, so this is done at the right time. Unfortunately only in German, if you can the language, I can give you this also.

The file for Lua you need only in Module / Linda / aircrafts / PMDG 737 copy. But make a copy of your original. My own created functions are then completely to the end under "FS2Crew".
Then simply assign in Linda the joystick buttons according to your choice and execute.
As I said, in the beginning comes the first question, whether you want to execute the funtion or not. Simply press the J or N button.

If you want to have the files, short info to me.:ha:

by benne36

Share this post


Link to post
Share on other sites

Scott and Ben36 thank you for your response.

Now I ask: is it necessary to have FS2Crew installed or does it work without it? If necessary, I will have to install it because I do not have it.

Thanks

Paul


Pablo Chiabrera

Share this post


Link to post
Share on other sites

Hi Paul

FSCrew2 works independently of LINDA.


Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Share this post


Link to post
Share on other sites

Hello Paul!

I must be something enlightened.

My file created by myself for LINDA or better edited file, has been made by me only for the extension. It has nothing to do with the original files you get here. I have only changed them for my own purposes.
These functions, made there, are the work of the Captian according to a checklist, which the Captain actually makes in the cockpit. It has only been made by me to expand the flow, mainly in connection with the FS2Crew.
It also works "without" FS2Crew. Only then do you have to take over the role of the FO if you want to have it real.

That's all. You can also say I'm working to foul the things with mouse. Therefore my file.
I hope you understood it a bit.:mellow:

If this is for you nothing, then please download the file here in the forum. This is the original file, without my extension.

by Benne36

Share this post


Link to post
Share on other sites

Understood, thanks both for the answer.

Now I will copy your file and see how it works. Any problem I write to you.
thanks both for the help

Paul


Pablo Chiabrera

Share this post


Link to post
Share on other sites

Paul,

please only copy in the German text above. There is an error in the english text. And important, the info of ScotFlieger you have to change by hand still starting.

benne

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...