Jump to content
The simFlight Network Forums

Reading FS text (message) area


Recommended Posts

Hi,

Is it possible to read the text what is actually displayed in FS? As I understand offset 0x3380 is for defining such texts, but I would like to read a text of any resource.

In particular I would like to read messages generated by IvAp client and displayed in FS also. Through FSUIPC I can even ask for METAR, ATIS etc and the requested info appears in IvAp and in FS. I would like to grab these texts.

Gabor

Link to comment
Share on other sites

Is it possible to read the text what is actually displayed in FS? As I understand offset 0x3380 is for defining such texts, but I would like to read a text of any resource.

I'm afraid I don't understand. "Text of any resouce" -- displayed in FS? How, where?

In particular I would like to read messages generated by IvAp client and displayed in FS also. Through FSUIPC I can even ask for METAR, ATIS etc and the requested info appears in IvAp and in FS. I would like to grab these texts.

Where do they appear? FSUIPC/AdvDisplay is only able to grab texts sent to the standard FS message line, the same one used for FS's own ATIS messages.

Regards,

Pete

Link to comment
Share on other sites

I'm afraid I don't understand.

Opps, sorry, possibly my English...

FS is displaying various messages in that green line on top of the page. I am interested wether I can access those messages in any FS buffers through FSUIPC (or directly from my FS module).

I know that I can ask FSUIPC to create (pass) such messages to FS. I had seen that IvAp also uses FSUIPC to display messages in the green line either indirectly or directly. If I ask for a METAR in IvAp client, or if I tune an ATC and receive the ATIS, these messages appear not only in the IvAp user interface, but in the green line as well.

Now, putting together the two things: I would like to get the METAR and ATIS displayed by IvAp, but IvAp does not have its own FSUIPC offsets for this purpose. I can trigger IvAp via FSUIPC to display a METAR or an ATIS, but the requested info is not available for my application through FSUIPC, but it is displayed in the IvAp User Interface window and on the FS screen in the green line.

I am speaking about the following IvAp offsets in FSUIPC:

http://www.ivao.aero/softdev/IvAp/fsuipc_sdk.asp

I write the airport ICAO code into FSUIPC 0x6650 and number 1 to FSUIPC 0x6641 and then IvAp will display the airport METAR in the IvAp screen AND in the FS green line. But unfortunately it does not make it available to my program. That is why I would like to capture the info what is scrolling in the green line.

Hope it is better now...

Gabor

Link to comment
Share on other sites

FS is displaying various messages in that green line on top of the page. I am interested wether I can access those messages in any FS buffers through FSUIPC (or directly from my FS module).

Yes. You need to run AdvDisplay to trap the messages and route them to FSUIPC's offsets. As an example, the freeware program "Showtext" provided in the AdvDisplay package does exactly what you are asking.

This is actually documented in the description of offset 3380 in the FSUIPC SDK's Programmer's guide.

Note that Advdisplay doesn't monitor such messages, it actively diverts them, so if you wanted them visible too you'd need to display them yourself, or use AdvDisplay's window or ShowText.

Regards

Pete

Link to comment
Share on other sites

Thanks,

I mostly understand. Remaining problems are most probably due to the fact that I am not (yet) experienced in AdvDisplay. I will give a try.

As documentation says AdvDisplay has a feature to capture text (ATIS etc.) otherwise appearing on the cockpit windows and displays it in its own window. It also copies the text to FSUIPC 0x3380 to make it available to other programs. But if I understand correctly text written into this offset will be displayed on FS cockpit window by FSUIPC itself. Isn' that a loop?

How long a text inserted to 0x3380 by an application (AdvDisplay or other) stays there? Isn't that disappear as soon as FSUIPC processes the request? Does ShowText.exe polls this offset for not NULL or modified text very frequently?

By the way is there any chance to get the info how AdvDisplay captures the messages, or is it part of your private know-how? Please don't misunderstand me, it is OK. But it seems to me a rather cumbersome solution to add AdvDisplay to my package for this simple feature.

Gabor

Link to comment
Share on other sites

But if I understand correctly text written into this offset will be displayed on FS cockpit window by FSUIPC itself. Isn' that a loop?

Ha ha. It would be if it worked literally like that, but it doesn't. ;-) Reading and writing are two different operations and actually use different buffers in any case.

How long a text inserted to 0x3380 by an application (AdvDisplay or other) stays there?

The illusion that FSUIPC provides access to a memory space with those offsets is confusing you a little in this case. It is only an illusion. writes to 3380 over the IPC interface actually get sent to FS's display routine, not to FSUIPC's memory. This is why you'd need AdvDisplay running to intercept them and put them into FSUIPC's memory, where you can actually read them "at 3380".

Offsets in FSUIPC are really "tokens" identifying variables rather than truly offsets. They started out as offsets in FS95 and FS98 days. The illusion is maintained for compatibility.

Texts intercepted by AdvDisplay and placed in 3380 behave identically to the displays they are meant to show -- ie. they stay for the number of seconds specified, or scroll off to the left one character at a time, or stay till the next message arrives. Just like the display itself.

Does ShowText.exe polls this offset for not NULL or modified text very frequently?

It will be reading it quite frequently, looking for changes, yes. When used across WideFS this is no load really as WideServer only sends out changes.

By the way is there any chance to get the info how AdvDisplay captures the messages, or is it part of your private know-how?

You have to hook a particular procedure in FS. It is in a different module and in a different place for each version of FS. If you know how to hook FS procedures I can tell you which they are.

Please don't misunderstand me, it is OK. But it seems to me a rather cumbersome solution to add AdvDisplay to my package for this simple feature.

Hmmm. Possibly.

Regards,

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.