Abandoned [RELEASE] Trade Computer Extension

Status
Thread Closed: Not open for further replies.
quote_icon.png
Originally Posted by Cmdr Bupu Eventure,
I've tried using the auto trade option and found some problems..
1. trade scout button does not do anything (the option in panels is also greyed out for it)
2. when opening trade scout bidirectional window(and being in the correct place for the 1st pickup) I'm sure that double clicking on one of the routes sent the info to the destination box before does not seem to now.
3. should this also setup the route and show it across the top
4. could you also alter the way you type in the "search route to" box on the trade panel it lets you type in the 1st letter only then you have to scroll down some( remember there are only 26 letter and 10 numbers possible of 36 divide by 400 billion places that's a lot of scrolling) yes I know they are not all in the database but still a lot for some letters.

cheers
Cmdr Bupu
1. What Trade Scout button? At the Main panel? The Route Planner is not included in TCE, only Trade Scout for bidirectional routes.
2. At the Trade Scout panel doubleclicking on a route does nothing. Selecting a route show up PREVIEW and START. Then clicking on START TRADE ROUTE, the route will be set to the nearest station selected, or if you are at one of them, sets the destination to the other station.
3. see 2.
4. Thats not correct, it doesnt only let you select the first letter. Type in letter by letter and the search will be narrowed.
.
.
1. trade scout button at the top in main panel does nothing. only way to open bidirectional route search is through options/panel
2. was sure Dble click b4 worked.. ah well .

4. the "search route to" box on trade panel .. if I try to type in "sol" it will list all places starting with "s" then as I press "o" it will list all places starting with "o" etc. does not narrow search down as it should.

unfortunately at the moment I'm to far away from anywhere and no where I'm close to is in database.
1 odd thing I have also found when searching for a bi route using the trade scout bidirectional panel I have to up it to 500ly (like I said I'm out a bit) but it will not search until I click on the 1000 stock do not have to change anything just click on it then on search trade route.
.
sorry for all the hassle but this is such a fantastic bit of software almost working perfect just a few tweeks needed.
cmdr bupu.
 
1. trade scout button at the top in main panel does nothing. only way to open bidirectional route search is through options/panel
2. was sure Dble click b4 worked.. ah well .

4. the "search route to" box on trade panel .. if I try to type in "sol" it will list all places starting with "s" then as I press "o" it will list all places starting with "o" etc. does not narrow search down as it should.

unfortunately at the moment I'm to far away from anywhere and no where I'm close to is in database.
1 odd thing I have also found when searching for a bi route using the trade scout bidirectional panel I have to up it to 500ly (like I said I'm out a bit) but it will not search until I click on the 1000 stock do not have to change anything just click on it then on search trade route.
.
sorry for all the hassle but this is such a fantastic bit of software almost working perfect just a few tweeks needed.
cmdr bupu.

Ah okay, found the issue with the trade scout button. Will be fixed in beta 9.

When i typed "sol" at the find route combobox, it moves directly to sol here. Your problem is, you typed in to slow. When you are too slow (cant change the time sadly), it resets to the first letter.

Updating prices via ocr (price only) with a trade route locked in with tradescout messes tcce up. Only way around it is to quit and restart.

Found some things, will be fixed with beta 9.

Update (V1.38 beta 9) released:
- Bugfix in clipboard (again star names, not station names)
- Bugfixes in Commoditiy panel (Trade Lock missbehavior, saving changes destination to no selection)
- Bugfix in Main panel (Trade Scout button locked, when no target selected)
- Bugfixes in Trade Scout panel (exchanged goods display, display list color reset, when trade route is stopped, when stopped, now back to Auto Destination, if active)
- Bugfix 1004 startup error (new content interference).
 
Last edited:
I'm experiencing 2 new problems with beta7 :

1. I can't set the Hide/Unhide keybind
clicking the button changes it to PRESS A KEY, but i tried all of my keyboard and TCE doesn't see it.
If I click the button again it goes back to HOTKEY TO HIDE/UNHIDE TCE
F4 was in there from the previous version but it was not doing anything after beta7 update.

2. Everytime I try to paste something, (destination, reference system...) what comes out is :
#N/A


I tried restarting TCE.
Rebooting the pc
Deleting TCE.ini
Setting the shortcut manually in TCE.ini

no luck so far !
(Verbose works, the shiplog updates on jumps)
and the star system panel popping up during a jump still crashes ED.
I wish I could manually open up that window and leave it open all the time, instead of having it pop up !

Hi,

1. Hmm.. working here, as it should. Anyone else having problem to select a hotkey?
2. found the problem, will be fixed.
3. Its the Summary or the Database? The Summary can be open manually by clicking on your actual star system name at the Cartography panel. The Summary should be delayed 10 to 15 secs. after jumping, but how long it takes for you to reach another system?

Update (V1.38 beta 8) released:
- Added reset color button
- Fixed clipboard show #NV
- Position panel fixed, not showing all stations recorded.

Hi,

First of all, absolutely fantastic work. Your tool really shows the potential of things to come when and if FD releases a proper API to tap into the game's data.

That said, I also have that issue. I can't set a hotkey, as described above. I checked in TCE.ini and it just appears as HotKey=.

I also tried to set it manually in the ini file as HotKey=F6. I restarted TCE, hotkey doesn't work and TCE.ini is back to HotKey=
 
One suggestion that is pretty much just a niggle. Would it be possible to position the splash screen elsewhere or to make it smaller so it's just the green progress bar? If you get any error messages they're usually obscured by the splash screen and it's a proper pain to be able to find them and close them.

alternatively make the error messages take focus and apply themselves over the splash screen/windows.

Off to test the latest beta. I appreciate all you hard work, I feel bad about only posting bugs. This program is essential to me so here's a massive thank you :)
 
Hi,

1. Hmm.. working here, as it should. Anyone else having problem to select a hotkey?

Hi,

First of all, absolutely fantastic work. Your tool really shows the potential of things to come when and if FD releases a proper API to tap into the game's data.

That said, I also have that issue. I can't set a hotkey, as described above. I checked in TCE.ini and it just appears as HotKey=.

I also tried to set it manually in the ini file as HotKey=F6. I restarted TCE, hotkey doesn't work and TCE.ini is back to HotKey=

Weird, I put F4 for mine, it stays there even after I restart TCE many times.
It just doesn't do anything !


2. found the problem, will be fixed.

Cool, Tks !


3. Its the Summary or the Database? The Summary can be open manually by clicking on your actual star system name at the Cartography panel. The Summary should be delayed 10 to 15 secs. after jumping, but how long it takes for you to reach another system?

The one that pops up, The summary.
I never timed it, I would guess that it normally about takes about 10 to 20 sec to get to a system.
but sometimes when the lag is bad It can seems like a very long time.
My guess is, at it's worst, 45 sec to a minute.
I will time it now for a while and get back to you with real numbers.

Anyway, you can't be expected to adjust it to my connection.
It's not very good, but it's the best that is available here :(

That is why I was asking for a button to open that panel manually instead, like all the other ones.
Coupled with the already implemented ability to not have it pop up, it would solve the problem completely !
Is that not possible or practical for some reason ???
 
Runtime 9 error :

(debug line highlighted in red bold)

Sub GetExploreData()

Dim SX As Double, SY As Double, SZ As Double, ZX As Double, ZY As Double, ZZ As Double, SID As Long, ZID As Long, z As Long, SZD As Double, ArDistance(1 To 50000) As Double
Dim ArExTemp As Variant, ArTemp As Variant, ArExploData As Variant, a As Long, Zeile As Long, lLZeile As Long, ArStars As Variant, x As Long
ReDim ArExTemp(1 To 100, 1 To 5), ArExploData(1 To 1000, 1 To 5)
ReDim ArTemp(1 To AzStars)
' Dim t As Double
' t = Timer
' MsgBox Timer - t & " sec", , "Makrolaufzeit"

If ActualStarID <> Worksheets("ExploreData").Cells(2, 1).Value Or JR_Changed = True Then
x = 0
Worksheets("ExploreData").Range("A2:E1000001").ClearContents
Worksheets("Navigation_Sort").Range("S2:S" & AzStars + 1).ClearContents
SID = ActualStarID
SX = Ar_DBStars(SID, 3)
SY = Ar_DBStars(SID, 4)
SZ = Ar_DBStars(SID, 5)
For z = 1 To AzStars
ZID = Ar_DBStars(z, 1) ' Ziel Stern
ZX = Ar_DBStars(ZID, 3)
ZY = Ar_DBStars(ZID, 4)
ZZ = Ar_DBStars(ZID, 5)
ArDistance(z) = Round(Sqr(WorksheetFunction.Power((SX - ZX), 2) + WorksheetFunction.Power((SY - ZY), 2) + WorksheetFunction.Power((SZ - ZZ), 2)) + 0.000001, 2)
If ArDistance(z) <= Jump_Limit Then
x = x + 1
ArExploData(x, 1) = Ar_DBStars(z, 1)
ArExploData(x, 2) = Ar_DBStars(z, 2)
ArExploData(x, 3) = ArDistance(z)
ArExploData(x, 4) = Ar_DBStars(z, 6)
ArExploData(x, 5) = Ar_DBStars(z, 7)
End If
Next z
Worksheets("ExploreData").Range("A2:E" & x + 1) = ArExploData
Worksheets("ExploreData").Activate
ActiveWorkbook.Worksheets("ExploreData").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("ExploreData").Sort.SortFields.Add Key:=Range( _
"C2:C100001"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("ExploreData").Sort
.SetRange Range("A1:E100001")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
AzCarto = 0
Do While Worksheets("ExploreData").Cells(2 + AzCarto, 1).Value <> 0
AzCarto = AzCarto + 1
Loop
ArExTemp = Worksheets("ExploreData").Range("A2:E" & z + 1)
Worksheets("Exploration").Range("A2:E1001").ClearContents
Worksheets("Exploration").Range("A2:E" & AzCarto + 1) = ArExTemp
Ar_Carto = Worksheets("Exploration").Range("A2:E" & AzCarto + 1)
End If

End Sub

Also if you try to change station to station in trade scout before search range (on first load in a station) it won't allow you to.
 
Last edited:
Just installed Beta 9

1. The startup splash screen showed V1.38 Beta
the 9 is missing.

2. The Hide hotkey is still set (was set manually) but still not working.
If I try to reset it again through TCE's interface, then it does go blank in the TCE.ini.
Maybe that's what Goretto also meant ?


3. The UI color was somehow changed to blue.
Pressing reset UI color set it almost back to normal but there is some black on black
black ui.jpg

4. got error 13 trying to go back in the option panel to try to reset the UI color again.
But the error seems to have to do more with the DB then the color.

Sub POS_Commodities()


Dim Station_ID_S As Long, ArExport As Variant, ArImport As Variant, b As Long, c As Long, lLZeile As Long

'Station_ID schreiben
Station_ID_S = POS_StationID
ReDim ArExport(1 To AzGoods, 1 To 4) As Variant
ReDim ArImport(1 To AzGoods, 1 To 3) As Variant
For c = 3 To AzGoods + 2
DoEvents
If ArData_Buy(c, Station_ID_S + 2) <> 0 Then
ArExport(c - 2, 1) = ArData_Buy(c, 2)
ArExport(c - 2, 2) = ArData_Buy(c, Station_ID_S + 2)
ArExport(c - 2, 3) = ArData_Buy(c, Station_ID_S + 2) - Ar_DBGoods(c - 2, 4)
ArExport(c - 2, 4) = ArData_Stock(c, Station_ID_S + 2)
End If
If ArData_Sell(c, Station_ID_S + 2) <> 0 And ArData_Sell(c, Station_ID_S + 2) - Ar_DBGoods(c - 2, 4) > 0 Then
ArImport(c - 2, 1) = ArData_Sell(c, 2)
ArImport(c - 2, 2) = ArData_Sell(c, Station_ID_S + 2)
ArImport(c - 2, 3) = ArData_Sell(c, Station_ID_S + 2) - Ar_DBGoods(c - 2, 4)
End If
Next c
Worksheets("POS_Export").Range("A2:D" & AzGoods + 1).ClearContents
Worksheets("POS_Export").Range("A2:D" & AzGoods + 1) = ArExport
Worksheets("POS_Export").Activate
ActiveWorkbook.Worksheets("POS_Export").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("POS_Export").Sort.SortFields.Add Key:=Range( _
"C2:C1001"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("POS_Export").Sort
.SetRange Range("A1:D1001")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Worksheets("POS_Import").Range("A2:C" & AzGoods + 1).ClearContents
Worksheets("POS_Import").Range("A2:C" & AzGoods + 1) = ArImport
Worksheets("POS_Import").Activate
ActiveWorkbook.Worksheets("POS_Import").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("POS_Import").Sort.SortFields.Add Key:=Range( _
"C2:C1001"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("POS_Import").Sort
.SetRange Range("A1:C1001")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With


End Sub

4. haven't had a chance to test the paste function yet.
 
Last edited:
The runtime 9 error is happening at every new station I try to add now.

It works fine after a restart.
 
Last edited:
Restarted TCE,

UI Color is back to normal.

Was going to test the paste function but got error 13
on a different code line,
as soon as I selected a destination.

Sub Trade_Advisor()

Dim z As Long, c As Long, b As Long, lLZeile As Long, Station_ID_S As Long, Station_ID_Z As Long, x As Long
Dim txt1 As String, txt2 As String, txt3 As String, txt4 As String
Dim iName1 As Variant, iName2 As Variant, iName3 As Variant, iName4 As Variant
ReDim ArProfit(1 To AzGoods, 1 To 4) As Variant

txt1 = "TA_Good"
txt2 = "TA_Price"
txt3 = "TA_Profit"
txt4 = "TA_Stock"


z = 0
Worksheets("Trade_Advisor").Range("A2:D129").ClearContents
If DES_Unregistered = False And DES_StationID <> 0 Then
Station_ID_S = POS_StationID
Station_ID_Z = DES_StationID
For c = 3 To AzGoods + 2
DoEvents
If ArData_Buy(c, Station_ID_S + 2) <> 0 And ArData_Buy(c, Station_ID_S + 2) <> "" And ArData_Sell(c, Station_ID_Z + 2) <> 0 And ArData_Sell(c, Station_ID_Z + 2) <> "" And ArData_Sell(c, Station_ID_Z + 2) - ArData_Buy(c, Station_ID_S + 2) > 0 And ArData_Stock(c, Station_ID_S + 2) <> 0 Then
z = z + 1
ArProfit(z, 1) = ArData_Buy(c, 2)
ArProfit(z, 2) = ArData_Buy(c, Station_ID_S + 2)
ArProfit(z, 3) = ArData_Sell(c, Station_ID_Z + 2) - ArData_Buy(c, Station_ID_S + 2)
ArProfit(z, 4) = ArData_Stock(c, Station_ID_S + 2)
End If
Next c

Worksheets("Trade_Advisor").Range("A2:D" & z + 1) = ArProfit
Worksheets("DES_Import").Activate
ActiveWorkbook.Worksheets("Trade_Advisor").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Trade_Advisor").Sort.SortFields.Add Key:=Range( _
"C2:C1001"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Trade_Advisor").Sort
.SetRange Range("A1:D1001")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With

ArProfit = Worksheets("Trade_Advisor").Range("A2:D" & z + 1)
End If

If z < 12 Then
Panel_Trade.TA_ScrollBar.Enabled = False
Panel_Trade.TA_ScrollBar.Max = 0
x = z
Else
Panel_Trade.TA_ScrollBar.Max = z - 11
Panel_Trade.TA_ScrollBar.Enabled = True
x = 11
End If
Panel_Trade.TA_ScrollBar.BackColor = TCE_Color_Dark

For b = 1 To x
iName1 = txt1 & b
iName2 = txt2 & b
iName3 = txt3 & b
iName4 = txt4 & b
If ArProfit(b, 1) <> "" Then
Panel_Trade.Controls(iName1).Caption = UCase(ArProfit(b, 1))
Panel_Trade.Controls(iName1).Visible = True
Panel_Trade.Controls(iName2).Caption = Format(ArProfit(b, 2), "##,##0") & " CR."
Panel_Trade.Controls(iName2).Visible = True
Panel_Trade.Controls(iName3).Caption = "+ " & Format(ArProfit(b, 3), "#,##0") & " CR."
Panel_Trade.Controls(iName3).Visible = True
Panel_Trade.Controls(iName4).Caption = Format(ArProfit(b, 4), "##,###,##0")
Panel_Trade.Controls(iName4).Visible = True
End If
Next b
For c = b To 11
iName1 = txt1 & c
iName2 = txt2 & c
iName3 = txt3 & c
iName4 = txt4 & c
Panel_Trade.Controls(iName1).Visible = False
Panel_Trade.Controls(iName2).Visible = False
Panel_Trade.Controls(iName3).Visible = False
Panel_Trade.Controls(iName4).Visible = False
Next c


End Sub


The error 13 seemed to have been caused by my eagerness to test the paste function !

I restarted TCE again (UI color is good :)

And waited before touching anything else to have moved from space to a station.
After Current Station and Auto Destination have updated once, I can now use TCE normally.

And the paste fonction now works with the auto destination.

But to test it further I opened the DATABASE - STAR SYSTEM

and that show up completely empty !
you can't see my mouse pointer in the screenshot,
but you can see that I extented the SELECT STAR SYSTEM drop down list.
but it's empty, only a one line black box.

Empty Star Panel.jpg



Another thing that is probably related to the Hide problem.
The excel window's behavior is different.

Before, when I alt-tab to excel, I would only see a blank white window with a message,
telling me to enable macro if TCE was not working.

Now I see the DB :
Excel.jpg
and if I minimize this excel window, it also hides the TCE UI the way the hotkey is supposed to !
 
Last edited:
I want TCE to update my AppConfig.xml for me but I can't see a way to run TCE as administrator (on Windows 7), which I assume is why it needs to run as administrator?

I've tried right clicking the TCE.xlsm file, shift-right clicking but there's no run as administrator option for an .xlsm file and I can't find any hints on how to do that in the thread. How have others done this? (I don't want to disable UAC, even though it is a pain).
 
BTW I really like the new Reset/Update Scan !
It should really help in keeping the db healthy !!


And, all of a sudden, the STAR SYSTEM SUMMARY pops up a lot later.
I was already scooping by the time it showed this time.
I'll keep using it "normally" to see what happens.

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

I had part of the previous issue, if you click the gap between tce and the very top of the screen it hides the excel window.

That works, Thanks.

Since the hide hotkey doesn't work for me, I use this quirk as a new way to hide TCE, until the next fix.

But it's very nice to know and will be useful later on !
 
I want TCE to update my AppConfig.xml for me but I can't see a way to run TCE as administrator (on Windows 7), which I assume is why it needs to run as administrator?

I've tried right clicking the TCE.xlsm file, shift-right clicking but there's no run as administrator option for an .xlsm file and I can't find any hints on how to do that in the thread. How have others done this? (I don't want to disable UAC, even though it is a pain).

I do not think it does need to run as admin.
It should do it automatically if you pointed TCE to the right logs path.
You can check/edit it manually by opening TCE.ini with notepad.
or delete TCE.ini before starting TCE again and it will ask for the paths again.

If you still do want to run TCE as admin

See post #1576 by atomic7431

https://forums.frontier.co.uk/showthread.php?t=103401&p=2005996&viewfull=1#post2005996

I'm not sure it that's actually running TCE.xml or Excel as admin but either way it seemed to work for him !
 
Last edited:
I confirm that the STAR SYSTEM SUMMARY now opens late enough to cause no problems with jump :)
No idea why it opened quickly the first time after I updated but it's all good now !

Got another, different line break, error 13, playing with FIND COMMODITY and clicking in BEST BUY LOCATIONS

Private Sub Show_Goods_Click()

If Me.Show_Goods.Column(1, Me.Show_Goods.ListIndex) <> "" Then
Worksheets("Werte").Cells(55, 2).Value = Me.Show_Goods.Column(1, Me.Show_Goods.ListIndex)
If Worksheets("Werte").Cells(55, 2).Value <> Worksheets("Werte").Cells(15, 2).Value Then
DES_StarID = Worksheets("Werte").Cells(57, 3).Value
DES_StationID = Worksheets("Werte").Cells(57, 2).Value
Worksheets("Werte").Cells(12, 2).Value = Worksheets("Werte").Cells(57, 3).Value
Worksheets("Werte").Cells(13, 2).Value = Worksheets("Werte").Cells(57, 2).Value
Call DES_Commodities
Call DES_Display
NoTarget = False
DES_Selected = True
Call Destination_Panel
Call Trade_Advisor
Panel_Trade.DES_Label.Caption = "SELECTED DESTINATION"
Me.CB_Route.ListIndex = Worksheets("Werte").Cells(53, 5).Value - 1
End If
End If


End Sub
 
I do not think it does need to run as admin.
It should do it automatically if you pointed TCE to the right logs path.
You can check/edit it manually by opening TCE.ini with notepad.
or delete TCE.ini before starting TCE again and it will ask for the paths again.

If you still do want to run TCE as admin

See post #1576 by atomic7431

https://forums.frontier.co.uk/showthread.php?t=103401&p=2005996&viewfull=1#post2005996

I'm not sure it that's actually running TCE.xml or Excel as admin but either way it seemed to work for him !

Thanks, I was trying to run it as administrator because the TCE instructions on the first page tell you to do so, but if it's not needed I'll leave it for now :).

Here is some more info on the issue I am seeing.

The paths in the ini file look OK so I've left them for now:

NetLogPath=C:\Program Files (x86)\Frontier\EDLaunch\Products\FORC-FDEV-D-1001\Logs
AppConfigPath=C:\Program Files (x86)\Frontier\EDLaunch\Products\FORC-FDEV-D-1001
EliteOCRPath=C:\Program Files (x86)\Frontier\TCE\EliteOCR

The AppConfig file also has the correct entry but TCE returns the following error when I try to run it:

Untitled.png

Here are the relevant lines:

<Network
VerboseLogging="1"
Port="0"
upnpenabled="1"
LogFile="netLog"
DatestampLog="1"
>
</Network>

If I select Ok TCE appears to run OK but then I get the following error:

Untitled1.png

I'll keep trying to get this working but any help anyone can give is much appreciated, thanks.
 
Thanks, I was trying to run it as administrator because the TCE instructions on the first page tell you to do so, but if it's not needed I'll leave it for now :).

Here is some more info on the issue I am seeing.

View attachment 25181

I'll keep trying to get this working but any help anyone can give is much appreciated, thanks.

Hello and welcome,

TCE needs admin rights to access the AppConfig file. Activate it at the shortcut of TCE:
admin.JPG

Here its greyed out, because i am the admin.

Try it and tell me, if it is working.

Got another, different line break, error 13, playing with FIND COMMODITY and clicking in BEST BUY LOCATIONS

Private Sub Show_Goods_Click()

If Me.Show_Goods.Column(1, Me.Show_Goods.ListIndex) <> "" Then
Worksheets("Werte").Cells(55, 2).Value = Me.Show_Goods.Column(1, Me.Show_Goods.ListIndex)
If Worksheets("Werte").Cells(55, 2).Value <> Worksheets("Werte").Cells(15, 2).Value Then
DES_StarID = Worksheets("Werte").Cells(57, 3).Value
DES_StationID = Worksheets("Werte").Cells(57, 2).Value
Worksheets("Werte").Cells(12, 2).Value = Worksheets("Werte").Cells(57, 3).Value
Worksheets("Werte").Cells(13, 2).Value = Worksheets("Werte").Cells(57, 2).Value
Call DES_Commodities
Call DES_Display
NoTarget = False
DES_Selected = True
Call Destination_Panel
Call Trade_Advisor
Panel_Trade.DES_Label.Caption = "SELECTED DESTINATION"
Me.CB_Route.ListIndex = Worksheets("Werte").Cells(53, 5).Value - 1
End If
End If


End Sub

as soon as I selected a destination.

Sub Trade_Advisor()

Dim z As Long, c As Long, b As Long, lLZeile As Long, Station_ID_S As Long, Station_ID_Z As Long, x As Long
Dim txt1 As String, txt2 As String, txt3 As String, txt4 As String
Dim iName1 As Variant, iName2 As Variant, iName3 As Variant, iName4 As Variant
ReDim ArProfit(1 To AzGoods, 1 To 4) As Variant

txt1 = "TA_Good"
txt2 = "TA_Price"
txt3 = "TA_Profit"
txt4 = "TA_Stock"


z = 0
Worksheets("Trade_Advisor").Range("A2:D129").ClearContents
If DES_Unregistered = False And DES_StationID <> 0 Then
Station_ID_S = POS_StationID
Station_ID_Z = DES_StationID
For c = 3 To AzGoods + 2
DoEvents
If ArData_Buy(c, Station_ID_S + 2) <> 0 And ArData_Buy(c, Station_ID_S + 2) <> "" And ArData_Sell(c, Station_ID_Z + 2) <> 0 And ArData_Sell(c, Station_ID_Z + 2) <> "" And ArData_Sell(c, Station_ID_Z + 2) - ArData_Buy(c, Station_ID_S + 2) > 0 And ArData_Stock(c, Station_ID_S + 2) <> 0 Then
z = z + 1
ArProfit(z, 1) = ArData_Buy(c, 2)
ArProfit(z, 2) = ArData_Buy(c, Station_ID_S + 2)
ArProfit(z, 3) = ArData_Sell(c, Station_ID_Z + 2) - ArData_Buy(c, Station_ID_S + 2)
ArProfit(z, 4) = ArData_Stock(c, Station_ID_S + 2)
End If
Next c

Worksheets("Trade_Advisor").Range("A2:D" & z + 1) = ArProfit
Worksheets("DES_Import").Activate
ActiveWorkbook.Worksheets("Trade_Advisor").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Trade_Advisor").Sort.SortFields.Add Key:=Range( _
"C2:C1001"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Trade_Advisor").Sort
.SetRange Range("A1:D1001")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With

ArProfit = Worksheets("Trade_Advisor").Range("A2:D" & z + 1)
End If

If z < 12 Then
Panel_Trade.TA_ScrollBar.Enabled = False
Panel_Trade.TA_ScrollBar.Max = 0
x = z
Else
Panel_Trade.TA_ScrollBar.Max = z - 11
Panel_Trade.TA_ScrollBar.Enabled = True
x = 11
End If
Panel_Trade.TA_ScrollBar.BackColor = TCE_Color_Dark

For b = 1 To x
iName1 = txt1 & b
iName2 = txt2 & b
iName3 = txt3 & b
iName4 = txt4 & b
If ArProfit(b, 1) <> "" Then
Panel_Trade.Controls(iName1).Caption = UCase(ArProfit(b, 1))
Panel_Trade.Controls(iName1).Visible = True
Panel_Trade.Controls(iName2).Caption = Format(ArProfit(b, 2), "##,##0") & " CR."
Panel_Trade.Controls(iName2).Visible = True
Panel_Trade.Controls(iName3).Caption = "+ " & Format(ArProfit(b, 3), "#,##0") & " CR."
Panel_Trade.Controls(iName3).Visible = True
Panel_Trade.Controls(iName4).Caption = Format(ArProfit(b, 4), "##,###,##0")
Panel_Trade.Controls(iName4).Visible = True
End If
Next b
For c = b To 11
iName1 = txt1 & c
iName2 = txt2 & c
iName3 = txt3 & c
iName4 = txt4 & c
Panel_Trade.Controls(iName1).Visible = False
Panel_Trade.Controls(iName2).Visible = False
Panel_Trade.Controls(iName3).Visible = False
Panel_Trade.Controls(iName4).Visible = False
Next c


End Sub

But to test it further I opened the DATABASE - STAR SYSTEM

and that show up completely empty !



Another thing that is probably related to the Hide problem.
The excel window's behavior is different.

Before, when I alt-tab to excel, I would only see a blank white window with a message,
telling me to enable macro if TCE was not working.

Found and fixed it next version
 
Last edited:
Here its greyed out, because i am the admin.

I didn't think about that because I always run with admin right.

Found and fixed it next version

Cool !



Another insignificant thing I just noticed,
I do not think it was this way before.

The black "background" on the top menu is not even.
Most of it is now kind of greyish but the AUTO DESTINATION box
still has the same beautiful deep black it had before.
Top menu.jpg
Was that intended ?
 
Last edited:
Hello and welcome,

TCE needs admin rights to access the AppConfig file. Activate it at the shortcut of TCE:
View attachment 25191

Here its greyed out, because i am the admin.

Try it and tell me, if it is working.



Found and fixed it next version

Thanks Eventure, regarding the first issue, I am already in the Admin group so mine is greyed as well. I have turned UAC off for now and it all works correctly so I'll leave that turned off until I find a solution that works with UAC turned on.
 
Last edited:
Auto Select destination is selected but only works some of the time.
Many times, it doesn't update at the same time as the CURRENT STATION
so it ends up being the same station as the current one.


Looks like stopped being on auto when I manually selected a station.
I would have expected it to go back to auto by itself on the next jump, but it didn't.

I got it working again by removing the check for Auto-Select in Control - Options
hiding the panel and going back in to check it again later.
 
Last edited:
Update (V1.38 beta 10) released:
- Adjusted splash screen
- Fixes in some functions which produces runtime errors
- Small hotkey adjustment
- Star System Database panel fix, not showing values
 
Status
Thread Closed: Not open for further replies.
Back
Top Bottom