Watch Officer 
Join Date: Sep 2001
Location: Cambridge, Canada
Posts: 335
Downloads: 39
Uploads: 0
|
Posting way to many times in my own thread, I apologise....
Lucky,
I was reading through previous threads of yours, and you mentioned that you wanted to know what files specifically that SH3Weather writes to, so I figured Id post the source for the write command to the mis files. This is all that SH3Weather writes to any SH3 files. You will notice that it uses a WRITEINI module, since most of the SH3 cfgs use a .ini structure for their files (makes my job easier)...
Code:
'----Write to SCR
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_SCR.mis", "mission", "Fog", Fog
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_SCR.mis", "mission", "FogRand", FogRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_SCR.mis", "mission", "Clouds", Clouds
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_SCR.mis", "mission", "CloudsRand", CloudsRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_SCR.mis", "mission", "Precip", Rain
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_SCR.mis", "mission", "PrecipRand", PrecipRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_SCR.mis", "mission", "WindHeading", WindDir
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_SCR.mis", "mission", "WindSpeed", WindSpeed
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_SCR.mis", "mission", "WindRand", WindRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_SCR.mis", "mission", "WeatherRndInterval", Interval
'----Write to LND
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_LND.mis", "mission", "Fog", Fog
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_LND.mis", "mission", "FogRand", FogRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_LND.mis", "mission", "Clouds", Clouds
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_LND.mis", "mission", "CloudsRand", CloudsRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_LND.mis", "mission", "Precip", Rain
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_LND.mis", "mission", "PrecipRand", PrecipRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_LND.mis", "mission", "WindHeading", WindDir
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_LND.mis", "mission", "WindSpeed", WindSpeed
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_LND.mis", "mission", "WindRand", WindRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_LND.mis", "mission", "WeatherRndInterval", Interval
'----Write to RND
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_RND.mis", "mission", "Fog", Fog
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_RND.mis", "mission", "FogRand", FogRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_RND.mis", "mission", "Clouds", Clouds
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_RND.mis", "mission", "CloudsRand", CloudsRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_RND.mis", "mission", "Precip", Rain
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_RND.mis", "mission", "PrecipRand", PrecipRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_RND.mis", "mission", "WindHeading", WindDir
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_RND.mis", "mission", "WindSpeed", WindSpeed
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_RND.mis", "mission", "WindRand", WindRand
WriteIni App.Path & "\data\Campaigns\Campaign\Campaign_RND.mis", "mission", "WeatherRndInterval", Interval
That is a copy paste from the VB6 code (Don't show Jscones, 'cause he did give me tips on how to do the same thing with less lines of code, I just couldn't bring myself to edit the write part I had so painstakingly written out! Though let him know that all of the nested IF's I had are now CASE statements! I digress...)
The values are generated by the program, then written to the files as shown above. This is the limit of what it writes...
Hopefully this will give Lucky, and other concerned users as to what is happening to their files. I will be happy to share the source code to anyone who requests via PM, provided they make no profit (ie charge) for any part of its use....
Cheers,
James
__________________
"Is the glass half-empty? Or half-full? Either way, when you're thirsty, there's water to be had in that glass." - Neal Stevens
|