Abandoned [RELEASE] Trade Computer Extension

Status
Thread Closed: Not open for further replies.
when starting the developer version 1. 21 excel wants a database password. Is that intended?

I encountered two strange bugs where TCE dupped a station and in another case i cannot change the commodities any more. ( error about not enough memory) But without being able to start the dev version i cannot track it down or have a look at the entries in the database...
I had the feeling that sometimes when entering the same station type in different systems TCE mixed up the files. I had entries completly in the wrong collums. No clue what happend but i cannot overwrite it anymore.

Can it be, that you use the non-developer database, which is protected with the dev version of TCE? Please try to open the database directly. If you got a password prompt, they are not the correct database for the dev version. The dev version is password free.

Please download the V1.20 dev version to get the correct database. The dev and non-dev version cant be mixed.
 
Last edited:
Ah okay. I thought i can use the dev version to gain access to my corrupted files :)
May i upload you the database somehow? There are just a few entries but something went wrong :)

I will make my trade run again with the dev version maybe this bug is reproduceable or gives me any clue.
 
Last edited:
Ah okay. I thought i can use the dev version to gain access to my corrupted files :)
May i upload you the database somehow? There are just a few entries but something went wrong :)

I will make my trade run again with the dev version maybe this bug is reproduceable or gives me any clue.

Sure, give me a link, i will check it.
 
Releasing update (V1.21):
- Error fixing to all input areas. Special thanks to Hexersup for the hints.

Perhaps someone gives me a hint, how to check the Appconfig.xml, if VerboseLogging is set, or not, and to add the entry automatically, if not set. Thanks in advance.

This is fairly easy to do. Answer 6 would be the way I would do it. The scripting runtime will be present as it gets installed alongside Internet Explorer 5.5 or later. You will need to tick "Microsoft Scripting Runtime" under Tools->References for the FileSystemObject functions to work.

http://stackoverflow.com/questions/11528694/read-parse-text-file-line-by-line-in-vba

Code:
Dim fso As FileSystemObject
Set fso = New FileSystemObject

VerboseLoggingFound=false
if fso.fileexists "c:\blah\AppConfig.bak" then fso.deletefile "c:\blah\AppConfig.bak"
if fso.fileExists "c:\blah\AppConfig.xml" then
   fso.movefile "c:\blah\AppConfig.xml","c:\blah\AppConfig.bak"
   Set inStream = fso.OpenTextFile("c:\blah\AppConfig.bak", ForReading, False)
   Set outStream = fso.OpenTextFile("c:\blah\AppConfig.xml", ForWriting, True) ' True creates the file if it doesn't exist
   Do While Not txtStream.AtEndOfStream
    sLine = instreamStream.ReadLine
    sLine=ltrim(rtrim(sLine)) ' Trims spaces and tab characters
    if sLine="VerboseLogging=""1""" VerboseLoggingFound=true
    if left(sLine,1) = ">" then ' End of network section
       if VerboseLoggingFound=false then outStream.writeline ""VerboseLogging=""1""" ' (I think that is correct for double quotes)
    end if
    outStream.writeline sLine
  Loop
  inStream.Close
  outStream.Close
end if

I have not tested this as I am at work and I don't have a copy of AppConfig.xml here but it should be pretty much everything you need. You may need more checks for non-standard versions of the file but as FD overwrite every time you shouldn't find too many non-standard ones.
 
everytime i start up TCE i get now "ADD STAR SYSTEM RECORD" for Systems i have previously visited.
However, there is no SAVE button, also how would i go about to figure out the Coordinates for the Star System?
Also STATE OF EXPLORATION dropdown menu is empty, there are no entries to select from.

4.jpg
 
I stopped following this thread around page 4 and I'm just wondering if anyone has figured out an Open Office hack for this yet?
 
I stopped following this thread around page 4 and I'm just wondering if anyone has figured out an Open Office hack for this yet?

Having VBA may be the key here.

But for sure having this for a free open source spreadsheet application would make it better than for MS expensive package.

I use Excel every day at work but have no use for it at home. Open Office there.

- - - - - Additional Content Posted / Auto Merge - - - - -

a version for open office would be AWESOME SAUCE!

- - - - - Additional Content Posted / Auto Merge - - - - -

make the trade range at least 140 LY for rare selling

sidebar, sorry. When planetary landings come about I hope we can emulate your current avatar/icon... halo jumps from orbit, yes! I made a post about it a year or so ago... now that two humans have done it we know it is "realistic".
 
This is fairly easy to do. Answer 6 would be the way I would do it. The scripting runtime will be present as it gets installed alongside Internet Explorer 5.5 or later. You will need to tick "Microsoft Scripting Runtime" under Tools->References for the FileSystemObject functions to work.

http://stackoverflow.com/questions/11528694/read-parse-text-file-line-by-line-in-vba

Code:
Dim fso As FileSystemObject
Set fso = New FileSystemObject

VerboseLoggingFound=false
if fso.fileexists "c:\blah\AppConfig.bak" then fso.deletefile "c:\blah\AppConfig.bak"
if fso.fileExists "c:\blah\AppConfig.xml" then
   fso.movefile "c:\blah\AppConfig.xml","c:\blah\AppConfig.bak"
   Set inStream = fso.OpenTextFile("c:\blah\AppConfig.bak", ForReading, False)
   Set outStream = fso.OpenTextFile("c:\blah\AppConfig.xml", ForWriting, True) ' True creates the file if it doesn't exist
   Do While Not txtStream.AtEndOfStream
    sLine = instreamStream.ReadLine
    sLine=ltrim(rtrim(sLine)) ' Trims spaces and tab characters
    if sLine="VerboseLogging=""1""" VerboseLoggingFound=true
    if left(sLine,1) = ">" then ' End of network section
       if VerboseLoggingFound=false then outStream.writeline ""VerboseLogging=""1""" ' (I think that is correct for double quotes)
    end if
    outStream.writeline sLine
  Loop
  inStream.Close
  outStream.Close
end if

I have not tested this as I am at work and I don't have a copy of AppConfig.xml here but it should be pretty much everything you need. You may need more checks for non-standard versions of the file but as FD overwrite every time you shouldn't find too many non-standard ones.

Thank you very much for your help. I managed to implement your routine with some adjustsments, because trim doesnt work. Why? The spaces are not Chr(32), but chr(9). Now it work as intended.

Releasing Update (V1.22):
- TCE adds VerboseLogging to AppConfig.xml automatically, when its missing.


everytime i start up TCE i get now "ADD STAR SYSTEM RECORD" for Systems i have previously visited.
However, there is no SAVE button, also how would i go about to figure out the Coordinates for the Star System?
Also STATE OF EXPLORATION dropdown menu is empty, there are no entries to select from.

It auto-popup, because the star is not recorded in your database. If you dont want to add stars, please disable it in the Option panel. To add a star, goto galaxy map, select navigation, enter the one of the four reference star system and enter the distance into the required field in the panel, then the next star system and so on. If all four distances are filled, the save button will appear. Now you can save the star system into your database.
I check the exploration field next. If there is no choice, leave it blank. You can add the exploration status also over the Cartography panel.

Working now for the next big update on EliteOCR integration. It will be optional, manual input will continue to exists.
 
Last edited:
Thank you very much for your help. I managed to implement your routine with some adjustsments, because trim doesnt work. Why? The spaces are not Chr(32), but chr(9). Now it work as intended.

Releasing Update (V1.22):
- TCE adds VerboseLogging to AppConfig.xml automatically, when its missing.




It auto-popup, because the star is not recorded in your database. If you dont want to add stars, please disable it in the Option panel. To add a star, goto galaxy map, select navigation, enter the one of the four reference star system and enter the distance into the required field in the panel, then the next star system and so on. If all four distances are filled, the save button will appear. Now you can save the star system into your database.
I check the exploration field next. If there is no choice, leave it blank. You can add the exploration status also over the Cartography panel.

Working now for the next big update on EliteOCR integration. It will be optional, manual input will continue to exists.


Thanks for your help once again.

Btw. why can't we enter the "Demand" values of the products?
 
Awesome effort, +rep! I will test functionality on Office 2010 and report back if there are any issues that have not already been mentioned.
 
Thanks for your help once again.

Btw. why can't we enter the "Demand" values of the products?

There is no need of a demand value, because, if there is a demand, your sell price is above the average price. In opposition to supply, for example you need 20t of tea, but the next station has only 10t. That you want to know before you leave.
 
Last edited:
Thank you very much for your help. I managed to implement your routine with some adjustsments, because trim doesnt work. Why? The spaces are not Chr(32), but chr(9). Now it work as intended.

Releasing Update (V1.22):
- TCE adds VerboseLogging to AppConfig.xml automatically, when its missing.

Ah, I was thinking of PHP's trim functions as they strip tabs. I do very little VBA these days but I'm glad it helped ;)
 
What is the formula (Calculation) in the data base to figure distance from system to system ( x,y,z)? Also, how did you find the x,y,z coordinates for the various system? Thanks.
 
Status
Thread Closed: Not open for further replies.
Back
Top Bottom