January 8, 200818 yr Hi all,I want to control the visibility of an XML gauge so that it only appears if the user has Acceleration installed. After a trawl through the docs I couldn't find any mention of a simulation variable which contains the required version info. Is anybody aware of such a variable?Many thanks,DD
January 9, 200818 yr Moderator There is no such creature.It's possible in C++ using an API call to fetch GetFileVersionInfoSizeA, and then use that to retrieve GetFileVersionInfoA for any specific file.I have a function I use to check whether the user is running FS9 or FSX, but I've never had a need to be particular about what version of FSX one is running... ;) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
January 9, 200818 yr You might consider just allowing the user to "configure" the panel by including or commenting out the gauge.
January 9, 200818 yr Commercial Member Run a check for the folder that contains Umberto's FA/18(?) or any other Acceleration-only aircraft.-Dai
January 10, 200818 yr Thanks for the info and suggestions guys. Having already just had to learn XML (and the joys of reverse Polish) from scratch in order to make my gauges, I don't think I've the capacity right now for learning yet another language -if I did I wouldn't have any room left in my head for remembering where I put my keys ;).To fill you in a bit on the reason for my question -I'm looking for a bulletproof method of preventing a user without Acceleration from using some P-51 Racer gauges and panels I've made (to avoid getting any grief from MS). Obviously an XML-accesible simulation version variable would have been the ideal method, but if MS didn't see fit to include one then I'm open to other suggestions, particularly ones which the user couldn't get around (by for example creating a dummy FA/18 folder if I used a folder check).Cheers,DD
January 11, 200818 yr Moderator While I understand your concern, even if it were possible to accomplish your goal in XML, it would be far from "bulletproof," since any nine yearold with access to notepad.exe could easily defeat any embedded code... :(Even were I to take the time to custom code a C gauge that would perform a test for "Acceleration installed," the same problem would apply......because the "cheater" would simply edit the XML to remove the flag used to disable them from running. *:-* Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment