Jump to content
Sign in to follow this  
badderjet

More XML Questions: Limiting (G:Var2)

Recommended Posts

Guest Skymed

Using mouse clickable areas to give me an incremental/decremental (G:Var2), I want to be able to limit the output from the G Variable to a specific amount for later use in the gauge. To see what is going on, I tried to put it in a string variable.%(0 (G:Var2) - s7)%{end}%((l7 -1<=) (l7 -20>=) & &)%{if}%(l7)%!4d!%{end}I want the s7 variable for later use, but only between -1 and - 20.How do I limit s7 to stay between -1 and -20?

Share this post


Link to post
Share on other sites

%(0 (G:Var2) - s7)%{end}%((l7 -1<=) (l7 -20>=) & &)%{if}%(l7)%!4d!%{end}could try this...%(0 (G:Var2) - -1 min -20 max s7)%(l7)%!4d!%{end}Since we're on the subject of G:Vars has anyone get past G:Var9 ???I could not.. 9 G:Vars is all we get ??? be very very efficient on what you do with them...Also if anyone is interested at all this last week I created a gaugethat helps create gauges tremendously, I call it XML explorer.What you do is put this gauge (along with 3 bitmaps) into your gauge project folder. Install this gauge as a new window on your aircraft.Take the gauge you're working on and copy the lines from to ( if it starts with Image name you must enclose that within tags ) Then paste it into the explorer in the prescribed section. Then copy all your clicks,, from to and paste it into its prescribed section. ( there can only be one section, hence have to do it this way ) There.. its all loaded and ready to go.. What it features is this:1. The Explorer is basically a blank XML template. You must provide the variable you would like to monitor and/or manipulate into the prescribed section of explorer. You can then monitor G:Vars for instance or place a G:Var into a long embedded {if } { then } of your project and monitor G:Var to see why it may not be working right. The Key to this is melting your project with explorer so you have access to the internal gauge variables.2. An interactive X,Y, Crosshair set to provide instant x/y s for your click, axis or display commands.3. Just starting it, but it will be a second window with a database gauge providing all the A:Vars, K:Vars, P:Vars, Math operands, Colors, Options etc...( to date) There will be a click button on explorer to open this second window... It will be interactive meaning the Vars are going to be categorized. You then pick the category, sub category, then a list of the info will be provided.4. The explorer uses L:Vars explicitly so not to interfere with my previous described problem of only 9 G:Vars avail, and also not to interfere with S1 S2... L1 L2... It's dirty code doing it this way but it works.5. It is currently set up to have 2 texture folders 640 and 1024, if there is a need or request I could rewrite it for a single bitmap folder use.6. Once you are done with your project or would like to see it on the FS Panel after mods have been made is to copy back the to lines of code inside the prescribed sectionback into your master gauge. Do this also to you to mouse section also.7. The xml explorer file (The text file) should be viewed at 1024 x 768 maximized as the are many (*--- COMMENT ---*) sections to point you where to go. IE. the prescribed , and monitoring sections.8. AND FINALLY THE HOLY GRAIL!!!!!!! Unknown to me until just last evening. There is a K:Var that will unlock your .XML gauge from being read by the panel.dll so you can save it. Hit a refresh button and all the mods are now showing on your gauge WITHOUT UNLOADING,RELOADING your aircraft... A Time saver times 5. I am Exstatic !!!Over the weekend I will be doing the second window database and adding anything else I may think of that could help in .xml designing.If you are at all interested in this gauge, please e-mail me. Maybe could get more ideas.. Bug reports etc...Not sure if I will upload it since you must have a good knowledge of the .xml syntaxs and rules. Might get way too many questions by doing it. Roman StoviakGreen Bay, WI (KGRB) USA


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest Skymed

RomanThat looks like a very useful tool. If you would please E mail it to me at:shanley@aemsi.nb.caI could really use it !!

Share this post


Link to post
Share on other sites
Guest stang

I would be interested in your XML gauge tool also. Have you considered getting a web site and posting what you have on it along with progress updates? Seems to me the community could use an XML Gauge Creation tools and tutorial site.RegardsTerry

Share this post


Link to post
Share on other sites
Guest

Please send it to me!Please...Thank you.Gauthier.gauthier.halbardier@skynet.be

Share this post


Link to post
Share on other sites

Sorry to say after the weekend I am in a bind. The version I was finishing up found another drawback. It seems L:Vars are also limited. ( Donot know if it is per gauge(( Hope so)) or if Per panel (( HOPE NOT!!)) I got to 8 and that was it ( My backround panel has a few L:Vars in there so It will have to be looked into.). Soo.. I am know on rebuild # 5. But this has alot of promise. If it is all ok the next part is the database. (Very tedious work )Which will be "corny" but in my opinion work to the advantage of making the gauges quicker. Then will come the quick set module. I will send it the gauge out to you allonce I am done with this portion of it, (before the database). Down to 2 user variables in the "working part" of the gauge and will use three FS variables as options, one for a grid ( Toggled by the widely unused :-( recognition lights)and using maybe the K:COWLFLAP3(4)_SET for a second crosshair set to be used for reference. The key is to keep user variables to minimum in the "working portion"of the gauge. The whole drawback is that if your gauge is at the limit of user variables or uses one of the above FS variables they will have to be changed or remmed out.Shouldn't be too much of a problem unless working with a very complicated gauge.L:Vars are used in the current module that I'm working on (Non working portion) It was noticed that when using the Reload button that L:Vars are non-volotile and G:Vars are volotile. So I am trying to use L:Vars in the portion that will hold important info,IE Host X,Y AXIS XY , Object location X,Y and Object Axis X,Y. All are volotile if the aircraft is switched. If all this come down to a "User Variable" war with the limits the last option would be to assign this gauge as the only gauge used on a panel for making and diagnosing. Use of is necessary for using this as a diagnosing tool, the readme will include a tiny bit of information of what I've accumulated but may or may not be correct but will be enough to use the gauge. BTW Arne Bartels released a mini tutorial at AVSIM ( maybe flightsim.com donot know, can never get in ) called XMLGAU01.zip. Highly recommended along withthe FS2000 panel SDK, and sd2gau12.zip by Dai Griffiths and Arne as a contributor . Peter Dowson also has two very good utilities for checking variable states in the FSUIPC SDK, FSlook and FSlook2.exe.There is also some "wild" info at MS in the MS XML 4.0 Parser SDK. If I read and understand it correctly by Using a DOM by a proficient programmer the XML3.dlls in FS could be upgraded to the 4.0 series, rewritten to open up XMLgauges to other variables such as ones provided by FSUIPC, A lofty dream but maybe someone could look into it. Roman P.S. David G, please email me directly at spokes2112@prodigy.net


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites

I was thinking that myself as I ponder how XML works, I have a little time with Visual Basic 6 and this stuff is throwing me for a loop. I was thinking of a clickable program for gauge creation e.g.Text boxes and drop down lists, where the bitmaps are located. Just name or choose a parameter from the engine list name the variable..... Getting the list and parameters together as I learnin', Lotsa, notes, the wife is even getting into the gauge making, she asked last week if I could make a gauge to eject the user from the game and computer and send them to bed. I've been working on that for a solid week now......Too many variables and parameters......Take offs are optional... Landing are manditory.Its better to be on the ground wishing you were in the air, Than in the air wishing you were on the ground. Have a good one, Cal

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...