Jump to content
The simFlight Network Forums

Text Menu LUA Plugin for ProATCx


Recommended Posts

I have a cockpit setup where my main P3D monitor sits outside the cockpit.  I would like to get the text menu display for ProATCx communications to appear on a WideClient display located within the cockpit. I have setup the "TextMenu.lua" example for Radar Contact provided in the FSUIPC pdf.  The good news is that the text window does appear on the WideClient monitor and is populated with text if I run RC.  However when I run ProATCx the window remains empty. 

So...is there something I need to do specifically to reference access to the ProATCx text?  I am under the impression that the offset defined in the example Lua is for the P3D text window which should be universal for any app add-on I would think, but perhaps I am wrong on that.  Or could this be an issue with SimConnect?  Or something else?

Thanks,

Fred K

 

Link to comment
Share on other sites

22 minutes ago, fredkura said:

 I would like to get the text menu display for ProATCx communications to appear on a WideClient display located within the cockpit. I have setup the "TextMenu.lua" example for Radar Contact provided in the FSUIPC pdf.  The good news is that the text window does appear on the WideClient monitor and is populated with text if I run RC.  However when I run ProATCx the window remains empty.

You have to enable the SimConnect Text intercept facility in the FSUIPC INI file. The parameter is "InterceptTextMenu" and is described in the Advanced User manual and in the Lua library document in the section about the event.textmenu function. The default setting is with it disabled.

The RC display is using a different facility altogether, not using SimConnect.

Pete

 

Link to comment
Share on other sites

Hi Pete

Thanks for the speedy response...

"InterceptTextMenu" was not in the General section of the FSUIPC ini so I had originally added and enabled it.  Checking today however I see that entry has disappeared.  So I re-added it....and it disappeared again.  I do notice that there is an entry "NewInterceptTextMenu"  that was either there originally and I had not noticed it or was created when I added "InterceptTextMenu".  In any event it was disabled, so I enabled it "NewInterceptTextMenu=yes".

But I still do not see any text in the WideClient lua message window.

So I am thinking that maybe it has something to do with SimConnect.  I have tried adding SimConnect 61259 and 61242 in that regard but problem is still not resolved.

The FSUIPC log shows the SimConnect menu intercept as installed and shows SimConnect running in the native P3D version.....

 

1453 LogOptions=00000000 00000001
     1453 -------------------------------------------------------------------
     1453 ------ Setting the hooks and direct calls into the simulator ------
     1453 --- CONTROLS timer memory location obtained ok
     1453 --- SIM1 Frictions access gained
     1453 --- FS Controls Table located ok
     1453 --- Installed Mouse Macro hooks ok.
     1453 --- Wind smoothing fix is installed
     1453 --- SimConnect intercept for texts and menus installed ok
     1453 --- All links okay (except older global weather setting method)
     1453 -------------------------------------------------------------------
     1453 SimConnect_Open succeeded: waiting to check version okay
     1453 Trying to use SimConnect Prepar3D
     1453 Opened separate AI Traffic client okay
   218812 Running in "Lockheed Martin® Prepar3D® v3", Version: 3.4.18.19475 (SimConnect: 3.4.0.0)
   218812 Initialising SimConnect data requests now
   218812 FSUIPC Menu entry added
   218937 \\DESKTOP-NQMQ5K4\Prepar3D v3 Files\KRIC B9.fxml
   218937 \\DESKTOP-NQMQ5K4\P3D\SimObjects\Airplanes\Sim-Avionics 737-800 Winglets\B737-800.air
   219984 Weather Mode now = Global
   219984 Weather Mode now = Custom
   270953 User Aircraft ID 2 supplied, now being used
   271687 System time = 09/02/2017 11:49:29, Simulator time = 11:48:38 (16:48Z)
   271687 Aircraft="Sim-Avionics 737-800"
   272672 Starting everything now ...
   273859 Advanced Weather Interface Enabled
   288297 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   288547 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   288875 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   289109 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   289422 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   289750 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   290047 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   290484 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   290719 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   291062 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   291359 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   291594 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   292000 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   292234 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   292469 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   292922 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   293047 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000
   293359 ### Blocked: attempt made 

 

Link to comment
Share on other sites

1 hour ago, fredkura said:

"InterceptTextMenu" was not in the General section of the FSUIPC ini so I had originally added and enabled it.  Checking today however I see that entry has disappeared.  So I re-added it....and it disappeared again.  I do notice that there is an entry "NewInterceptTextMenu"  that was either there originally and I had not noticed it or was created when I added "InterceptTextMenu".  In any event it was disabled, so I enabled it "NewInterceptTextMenu=yes".

Yes, I changed the default so had to rename it, deleting the old one.  It is documented properly in the Advanced users guide, but I see I didn't update it in the Lua libray document. I'll see to that before the next full release.

1 hour ago, fredkura said:

But I still do not see any text in the WideClient lua message window.

So I am thinking that maybe it has something to do with SimConnect.  I have tried adding SimConnect 61259 and 61242 in that regard but problem is still not resolved.

No, it won't be SimConnect. It's a direct hook by FSUIPC into the sim, as confirmed by this, in your log:

  1453 --- SimConnect intercept for texts and menus installed ok

What are you using which does this

1 hour ago, fredkura said:

288297 ### Blocked: attempt made to change LogOptions via 3400, data 0x0000

Why remove the first lines of the Log? Those contain essential information I need. Are you not using version 4.962? That last message will tend to crash the sim in 4.962.

For more information about this in the log, add the following lines to the [General] section of your FSUIPC4.INI file. Then show me the Log after your attempt:

Debug=Please
LogExtra=x20

Pete

 

 

Link to comment
Share on other sites

What is loaded is 4.958.

And yes...I am also curious about that repeating "Log Options" message.  What exactly is that?

After some investigation here I can very confidently say it is induced by SimA.  With SimA "on" the message keeps repeating....turn SimA "off" and the message recurrence stops. That is with no other add-ons running.

):  So that is a second item that I need to find a resolution for ):

I have SimA running remotely on a client.  Previously I had SimA running via UDP, but with the latest SimA release (1.70) I had to switch to TCP due to network communication problems with UDP.  So maybe it has to do with something there. I have had no problems with P3D crashing, but it is a little disconcerting that all that is going....it cannot be good for things.

Any ideas on that?  I am going to touch base with Mark on it of course.

In the meanwhile I am still scratching my head on the menu issue.  I tried without SimA running and it still did not work, so it would appear that they are unrelated issues.

Thanks,

Fred K

Link to comment
Share on other sites

33 minutes ago, fredkura said:

What is loaded is 4.958.

Sorry, that's way out of date and not supported. Please update.

34 minutes ago, fredkura said:

After some investigation here I can very confidently say it is induced by SimA.  With SimA "on" the message keeps repeating....turn SimA "off" and the message recurrence stops. That is with no other add-ons running.

I've no idea what "SimA" is, but best to stop it running, or find the way of turning it's requests for extra logging off.  At least until 4.92a or later is released -- then I'll have fixed the crashes caused by it.

36 minutes ago, fredkura said:

In the meanwhile I am still scratching my head on the menu issue.

What version of P3D are you using? FSUIPC 4.958 is no way compatible with anything recent.  I think it was 3.3 then.

Pete

 

Link to comment
Share on other sites

"SimA" is SimAvionics....Flight Deck Solutions' avionics software suite. So there really is no way I can turn that off being that it is the guts of the system.

I did peruse this forum about the 3400 logging block message and it appears that there is a least one reference to it related to FDS hardware about a year ago. It is not clear if such was resolved.

I am using the latest P3Dv3.4 (as of 2 weeks ago).  I will obediently update to the latest FSUIPC version.

Many thanks,

Fred K

Link to comment
Share on other sites

Hi Pete -

Further to the above....I updated both FSUIPC (4.962) and WideClient (6.9993) to the current versions.

Now FDS SimAvionics flat-out crashes P3Dv3.4 which I guess is the expectation you sort of alluded to above.

Also, text still does not appear in the LUA window.

So I have retreated back to FSUIPC 4.959 which does not cause a P3D crash but of course does the recurring 3400 message logging.

I have queried FDS about it.

Regards,

Fred

 

 

Link to comment
Share on other sites

1 hour ago, fredkura said:

Now FDS SimAvionics flat-out crashes P3Dv3.4 which I guess is the expectation you sort of alluded to above.

Yes. If you cannot find a way to stop it trying to change the log options, and you are still running in via WideFS, you can prevent that by adding this line to the [User] section of the WideClient.INI file:

Deny=3400,4

This will be fixed anyway, soon, with a further update.

1 hour ago, fredkura said:

Also, text still does not appear in the LUA window.

So I have retreated back to FSUIPC 4.959 which does not cause a P3D crash but of course does the recurring 3400 message logging.

The 3400 bug is in 4.959 too. It is just lucky that it doesn't cause a crash. It corrupts other data instead. I couldn't say what that woulsd result in. It may or my not be harmless.

I'd like to resolve the issue with 4.962 before I release any new update, so I'd be grateful if you'd try again, but first add those logging lines as I requested in my message 6 hours ago, i.e. this part:

"For more information about this in the log, add the following lines to the [General] section of your FSUIPC4.INI file. Then show me the Log after your attempt:

Debug=Please
LogExtra=x20"

 

Pete

 

Link to comment
Share on other sites

15 hours ago, fredkura said:

I am using the latest P3Dv3.4 (as of 2 weeks ago).

I was about to re-check the facility here, too, but I just checked back to your FSUIPC log, which shows:

 218812 Running in "Lockheed Martin® Prepar3D® v3", Version: 3.4.18.19475 (SimConnect: 3.4.0.0)

The latest P3D is actually 3.4.22 (since 2nd Feb). I'm going to have to go back to 3.4.18 to test this in the same version as you.

Pete

 

Link to comment
Share on other sites

I've now tested on P3D 3.4.18 and 3.4.22 (as well as FSX-SE which is what I actually use in any case), and, with the current "textmenu.lua", as supplied in the current FSUIPC Documents folder, works fine with them all.

Pending seeing your log with those parameters added, please do check that your Lua plug-in is correct. The only parts you'd normally need to change are the Window positions, in the three "wnd.open" lines, though you might choose a different, larger or smaller font of course.

There's also a version which splits long text lines, such as the initial ProATC/X clearance, into multiple lines. Do a search in this forum if you need to use that one, else I have a different one which splits it in up to 3 lines.

But, obviously, you need to get it working first.

Pete

 

Link to comment
Share on other sites

Hi Pete

Sorry for the delay in getting this to you.

I made the change in the FSUIPC ini to add the extra logging instructions.  Associated log files for both 4.459 and 4.462 are attached.

Also attached is my LUA file installed on the client...just to be sure nothing is amiss there.

Also attached is my FSUIP ini file.

Again...my problem is that the LUA window is present on the client but is not populated with text when such is displayed by ProATCx on the server monitor.

Fred

FSUIPC4 4959.log

FSUIPC4 4962.log

ProATCx.lua

FSUIPC4.ini

Link to comment
Share on other sites

Hi Pete

I found the issue with the LUA plugin.

The LUA file template I was using was taken from the LUA Library Reference document.  I now see there is a more comprehensive one listed in the "Example LUA Plugins" file. That one works.

So sorry to have bothered you on that part.

If you want me to test anything with the most recent P3Dv3.4 I can load such here and send the log file on to you.

Thanks,

Fred

 

 

Link to comment
Share on other sites

Just an update.....

I now see the text in the LUA window on the client OK, however there appears to be some confusion going on.  When I bring up the ProATCx window for the first time it appears on both the server and the client as it should (I think) and the first few keystroke commands work as they should.  However after that when a new keystroke window is brought up it appears on the server screen but does not update on the client screen, the old screen text remains.........after a few more attempts of bringing up the new screen ProATCx then crashes.

Also, the status communication text (top of P3D window) appears initially on the client but then only intermitently thereafter.  It does not appear on the server.

So I am going to try to study the LUA script to see what can be adjusted there or simplified.  For example, in my case I do not need to have menus disappear on the server screen since I never see that anyhow and I do not need to see the top status message lines on the client since I can comprehend all that through the instructions on my headphones.  I only need one window on the client. Perhaps that will help?

ProATCx works fine of course without the LUA running.  The LUA script appears to be confusing it.

My question however is whether there are any known communications issues like this within the current scheme of things.  I do not want to spin the wheels here needlessly of course.  Otherwise I will pursue trying to figure it all out.

Thanks again,

Fred

Link to comment
Share on other sites

5 hours ago, fredkura said:

I now see the text in the LUA window on the client OK, however there appears to be some confusion going on.  When I bring up the ProATCx window for the first time it appears on both the server and the client as it should (I think) and the first few keystroke commands work as they should.  However after that when a new keystroke window is brought up it appears on the server screen but does not update on the client screen, the old screen text remains.........after a few more attempts of bringing up the new screen ProATCx then crashes.

What do you mean by a "new keystroke window"? Do you mean a new menu? 

I use this facility all the time with both GSX and ProATC/X and have never had a problem yet. But then I use FSX-SE. There were quite a lot of problems with the SimConnect menu in P3D earlier on.  How are you responding with the menu selections -- what do you use for that?

Oh, and why aren't you using the current version of P3D (3.4.22) which odes have more bugs fixed?

The text menu intervention really just sends the menu when it captures it -- via a hok placed into the P3D Window.DLL. It cannot miss one (as the log would show if you looked), but maybe your connection to your Client isn't good, or the PC being used is loaded with other things? I can't really say. You can check (in the FSUIPC logs) to see the menu test (or at least the first part of it -- menus are several separate lines), and you can also enable some data logging in WideClient. 

And there's no way anything I ocan do which will ever crash ProATC/X. That's something else you have going on there. I'd check on their Forum if I were you. Maybe it can't handle all the SimConnect events you are throwing at it.

5 hours ago, fredkura said:

Also, the status communication text (top of P3D window) appears initially on the client but then only intermitently thereafter.  It does not appear on the server.

No, it won't appear o the server -- because that never needs a response it can be suppressed there. I can't suppress the menus because then SimConnect never sees the selection you make.

If you are getting intermittent results with that it does rather further indicate a WideFS transmission or reception problem.

5 hours ago, fredkura said:

For example, in my case I do not need to have menus disappear on the server screen since I never see that anyhow and I do not need to see the top status message lines on the client

The intercept facility is not selective, sorry. You don't need to display those but you can't stop them being intercepted and transmitted.

5 hours ago, fredkura said:

ProATCx works fine of course without the LUA running.  The LUA script appears to be confusing it.

It cannot know or be aware of anything FSUIPC and WideFS or the lua script are doing. It is an entirely separate process. But if you are using it on the same PC perhaps this is part of the loading on that PC stopping the screen updates.

5 hours ago, fredkura said:

My question however is whether there are any known communications issues like this within the current scheme of things.

No. I have used it quite a lot with P3D, but I'm now back to FSX-SE because it performs so much better with the amount of AI Traffic I like. And I've used this facility for a couple of years now, with both GSX and ProATC/X, since they came out. I'm sure you have a local problem, and probably on that PC.

You are using a wired network link, I hope, not wireless? I always have to advise against using wireless connections for WideFS. They never work reliably enough.

Pete

 

 

Link to comment
Share on other sites

9 hours ago, fredkura said:

I made the change in the FSUIPC ini to add the extra logging instructions.  Associated log files for both 4.459 and 4.462 are attached.

Sorry, not that those logs are relevant now, but they would be of no use anyway. I see I made a typo in the instructions. The lines to add are:

Debug=Please
LogExtras=x20

Pete

 

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.