nwadc10 Posted September 9, 2009 Report Posted September 9, 2009 I have succesfully added text display to FS from a program using offset 3380. However, I am trying to control the length of time it is displayed using offset 32FA. I would like the message to display for 5 seconds but when I write the string "5" to the offset, FSInterrogate shows a weird number. On last check FSInterrogate showed a value of 53 when I wrote "5". I've tried all kinds of scenarios such as "+5" and I'm not getting results I want. I suspect it's a simple syntax problem. How should I be writing to this offset? I am using the old DLL if that makes a difference for the answer. Thanks! Justin
Pete Dowson Posted September 9, 2009 Report Posted September 9, 2009 I have succesfully added text display to FS from a program using offset 3380. However, I am trying to control the length of time it is displayed using offset 32FA. I would like the message to display for 5 seconds but when I write the string "5" to the offset, FSInterrogate shows a weird number. On last check FSInterrogate showed a value of 53 when I wrote "5". I've tried all kinds of scenarios such as "+5" and I'm not getting results I want. I suspect it's a simple syntax problem. How should I be writing to this offset? Why are you reading it? I think it is a write-only parameter (though I'd need to know which version of FS and of FSUIPC to check). What is the purpose for you reading it? And how many ways have you found to write it? I am using the old DLL if that makes a difference for the answer. If by "old DLL" you mean an unsupported version of FSUIPC, then yes -- the difference is that I cannot help you until you update to a supported version. AND, please, you always need to tell me the version, and preferably whether you are talking about FS98, FS2000, CFS1, FS2002, CFS2, FS2004, FSX or ESP. These things can make a difference! Regards Pete
nwadc10 Posted September 9, 2009 Author Report Posted September 9, 2009 Sorry for failing to add the versions of everything, they are as follows: FSUIPCClient.dll (the .NET DLL): 1.1.2397.13 I saw on this forum a supposed new version of this DLL which I have downloaded but will not incorporate into this particular program. I am working on a follow up program that I will convert to using the new version of the DLL. FS: Testing FSX FSUIPC (the FS module DLL that we pay for): current versions I am not reading the message, my program writes the message to FS. I don't know all the different ways I tried to tell the process to display for only 5 seconds but they are all variations of "5", "+5", I've tried writing to 32FA, the control offset, before writing to 3380, the message text offset. I've tried many different things where there should be only 1 correct answer which is what I'm trying to figure out. I've tried changing to write "1" (which is intended as display message for one second) to the display text control and FSInterrogate shows the value of 32FA as 48 seconds. Programmatically, this is what my code looks like: DisplayMessage->Value = "Some Text Here To Display On FS Screen"; DisplayMessageControl->Value = "5"; FSUIPCConnection::Process("Display Message"); FSUIPCConnection::Process("Display Control"); It's the DisplayMessageControl->Value = "5"; that is giving me the problem because the message itself appears without issue. In the document that comes in the FSUIPC SDK the description for offset 32FA is as follows: "Text display control word. You can display messages from an external program just like an Adventure. Write the message as a zero-terminating string to offset 3380 (see below), subject tto the maximum of 128 characters including the zero terminator, then write a number to this offset, 32FA, as follows: 0 display till replaced +n display for n seconds, or until replaced [this is what I'm trying to do] -l display and scroll, or until replaced -n display and scroll, or for n seconds, or until replaced ..." So, the real question is, what should the line DisplayMessageControl->Value = "5"; look like (particularly after the =) in order to obtain control of this feature? Thanks again! Justin
Pete Dowson Posted September 10, 2009 Report Posted September 10, 2009 FSUIPC (the FS module DLL that we pay for): current versions Pay for? Only if you want to use the user facilities. The interface, the part you are talking about, is free for all freeware and end user purposes. By "current versions" do you mean 4.53 or 4.532 or what? Folks have stated this before when they actually meant "the last one I saw", and it turned out to be a year and 6 versions out of date. It isn't difficult to find the version number -- it is shown on the first tab in the options, in the DLL properties, in the Log. I am not reading the message, my program writes the message to FS. I don't know all the different ways I tried to tell the process to display for only 5 seconds but they are all variations of "5", "+5" Characters? Well "5" is ASCII 53, so that's why you see 53 there. Why are you writing a string of characters? It is just the binary number of seconds, never a string! It's a 2 byte or 16-bit signed number, so you define it as a short int, or whatever the equivalent is in the language you are using. I've tried changing to write "1" (which is intended as display message for one second) to the display text control and FSInterrogate shows the value of 32FA as 48 seconds. It would be 49, the numerical value of the character "1". In the document that comes in the FSUIPC SDK the description for offset 32FA is as follows: Yes, I know, I wrote. it. Do you see where it says "... then write a number to this offset, 32FA... "? When it says "number" it means number, not "string" or "character". Pete
nwadc10 Posted September 10, 2009 Author Report Posted September 10, 2009 I tried writing a number and I kept getting an error when compiling but I'm sure it was a 32bit integer. This must be the problem and will take it from here, thanks.
Pete Dowson Posted September 10, 2009 Report Posted September 10, 2009 I tried writing a number and I kept getting an error when compiling but I'm sure it was a 32bit integer. This must be the problem and will take it from here, thanks. You can use a 32 bit number provided you only do the Write to FSUIPC as size 2 (bytes), else you are overwriting the next value at 32FC. Pete
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now