Abandoned [RELEASE] Trade Computer Extension

Status
Thread Closed: Not open for further replies.
I have NVidea
I have been running 2 monitors all night with no FireFox and TCE/EliteOCR have been running without the normal issues that I see (blank screenshots & "Image Too Small" in the EliteOCR debug).
I have seen "Excel has stopped working" errors in Windows about 3 times in 3/4 hours.
Next time I am on I will bring back the third monitor and see what happens.

What resolutions are you running? Are your displays configured seperately? i think for nvidia there's something similiar to eyefinity for setting up multiple displays as one 'virtual' screen. what resolution are you using in ED? i believe everything below full HD could cause problems with eliteocr.
 
What resolutions are you running? Are your displays configured seperately? i think for nvidia there's something similiar to eyefinity for setting up multiple displays as one 'virtual' screen. what resolution are you using in ED? i believe everything below full HD could cause problems with eliteocr.

@punkerich, One of us missed something, because he said :

Only using ED on main monitor.
I have TCE on side monitor as I prefer to not clutter the main screen.
Definitely not spreading ED around monitors though

So not virtual screen here or any need of eyefinity-like software.

So that leaves only the resolution of his main screen which should be set to a minimum of 1920x1080 (if at all possible)



@BennyBoyW


punkerich has a good point, I don't remember seeing anything about your video drivers !
You have updated them to the latest version from the Nvidia web site off course, right !!!

Assuming that is true, then,

You have been naming way too many variables for proper trouble shooting,
It will take you forever to find the problem this way !!! If you ever do.


Go one step at a time !

I would do it this way to find out exactly what is causing the problem :

1. Setup you 3 monitors the way you like them (resolution wise) with the main at a minimum of 1920x1080 (if at all possible)
2. Stop all non essential software, including your antivirus. Even kill all processes you are sure are not needed !
3. Start ED on main monitor and make sure it runs fine for a while (at the very least 10 to 15 minutes) nothing else running, nothing on the other monitors !
4. Start TCE with all panels on Main monitor and use that for an hour or 2. (nothing else running, nothing on the other monitors !)
5. No crash yet ? move some of TCE's panel to your 2nd and 3rd screen but not the MAIN MENU or POSITION/DESTINATION panel yet.
(use that for an hour or 2. nothing else running, nothing on the other monitors ! :) )
6. Still good ? move POSITION/DESTINATION off the main screen and use that for an hour or 2. nothing else running...
7. Next move the MAIN MENU off to another screen. A good chance this is where crashes will begin so run that for a few hours with not...
8. if you still have not experience any crashes then you know TCE is not the problem !!!
Start adding other software that you were running before, one by one.
Always running with that one new program for a good while before adding another one.
I would do your antivirus first, then firefox.
I'm pretty sure you will have found the culprit by then but if not,
just keep adding whatever else you normally ran
and if you get through the list and are still good,
then restart your machine and kill one less un-needed process.
rince and repeat...

It might take a while but nowhere as long as the way you have been doing it so far !!!
 
Last edited:
TCE_V1.39c_update(test-version64bit)

Working with 32bit Excel, so i miss the problem. Because i cant test 64bit, i will release a test-version for all 64bit users, that should fix the problem. If it goes well, i release the 1.39d version asap with this fix. Till the release i suggest using the 1.39b version.

Test-Version (1.39c 64bit) released:

Changelog:
- Should fix the compile error at the screencap routine for Excel 64bit.

Note: This release is only for Excel 64bit users. If you using Excel 32bit, you dont need to download it.

I can see you have removed some lines, but the problem is still happening at basically the same place in the code !

Option Explicit

' Module Name: ModFindWindowLike
' (c) 2005 Wayne Phillips (http://www.everythingaccess.com)
' Written 02/06/2005

#If VBA7 Then
Private Declare PtrSafe Function EnumWindows Lib "user32" _
(ByVal lpEnumFunc As LongPtr, _
ByVal lParam As LongPtr) As LongPtr

Private Declare PtrSafe Function GetWindowText Lib "user32" _
Alias "GetWindowTextA" _
(ByVal hWnd As LongPtr, _
ByVal lpString As String, _
ByVal cch As LongPtr) As Long

Private Type FindWindowParameters

strTitle As String 'INPUT
hWnd As LongPtr 'OUTPUT

End Type
#Else
Private Declare Function EnumWindows Lib "user32" _
(ByVal lpEnumFunc As Long, _
ByVal lParam As Long) As Long

Private Declare Function GetWindowText Lib "user32" _
Alias "GetWindowTextA" _
(ByVal hWnd As Long, _
ByVal lpString As String, _
ByVal cch As Long) As Long
Private Type FindWindowParameters

strTitle As String 'INPUT
hWnd As Long 'OUTPUT

End Type
#End If

'Custom structure for passing in the parameters in/out of the hook enumeration function
'Could use global variables instead, but this is nicer.


Public Function FnFindWindowLike(strWindowTitle As String) As Long


'We'll pass a custom structure in as the parameter to store our result...
Dim Parameters As FindWindowParameters
Parameters.strTitle = strWindowTitle ' Input parameter


Call EnumWindows(AddressOf EnumWindowProc, VarPtr(Parameters))

FnFindWindowLike = Parameters.hWnd

End Function


Private Function EnumWindowProc(ByVal hWnd As Long, _
lParam As FindWindowParameters) As Long

Dim strWindowTitle As String


strWindowTitle = Space(260)
Call GetWindowText(hWnd, strWindowTitle, 260)
strWindowTitle = TrimNull(strWindowTitle) ' Remove extra null terminator

If strWindowTitle Like lParam.strTitle Then

lParam.hWnd = hWnd 'Store the result for later.
EnumWindowProc = 0 'This will stop enumerating more windows

Else


EnumWindowProc = 1


End If

End Function


Private Function TrimNull(strNullTerminatedString As String)


Dim lngPos As Long


'Remove unnecessary null terminator
lngPos = InStr(strNullTerminatedString, Chr$(0))

If lngPos Then
TrimNull = Left$(strNullTerminatedString, lngPos - 1)
Else
TrimNull = strNullTerminatedString
End If

End Function


and even if I do not scan, after a while it pops errors in the background.

I could not get to the debug to get the code, the same 2 errors kept repeating over and over:

Error in EDLog_Read
Error Line 10
Error: (52) Bad file name or number

and

Error in EDLog_Read
Error Line 20
Error: (9) Subscript out of range
 
Last edited:
@bragolatch: sorry, i missed that point obviously. :eek:

you mentioned antivirus software:
in my case, using 360 total security, it blocked not tce but eliteocr. even quarantined it (eliteocrcmd.exe)!
so it's definately worth checking that out at first!
 
I can see you have removed some lines, but the problem is still happening at basically the same place in the code !

Option Explicit

' Module Name: ModFindWindowLike
' (c) 2005 Wayne Phillips (http://www.everythingaccess.com)
' Written 02/06/2005

#If VBA7 Then
Private Declare PtrSafe Function EnumWindows Lib "user32" _
(ByVal lpEnumFunc As LongPtr, _
ByVal lParam As LongPtr) As LongPtr

Private Declare PtrSafe Function GetWindowText Lib "user32" _
Alias "GetWindowTextA" _
(ByVal hWnd As LongPtr, _
ByVal lpString As String, _
ByVal cch As LongPtr) As Long

Private Type FindWindowParameters

strTitle As String 'INPUT
hWnd As LongPtr 'OUTPUT

End Type
#Else
Private Declare Function EnumWindows Lib "user32" _
(ByVal lpEnumFunc As Long, _
ByVal lParam As Long) As Long

Private Declare Function GetWindowText Lib "user32" _
Alias "GetWindowTextA" _
(ByVal hWnd As Long, _
ByVal lpString As String, _
ByVal cch As Long) As Long
Private Type FindWindowParameters

strTitle As String 'INPUT
hWnd As Long 'OUTPUT

End Type
#End If

'Custom structure for passing in the parameters in/out of the hook enumeration function
'Could use global variables instead, but this is nicer.


Public Function FnFindWindowLike(strWindowTitle As String) As Long


'We'll pass a custom structure in as the parameter to store our result...
Dim Parameters As FindWindowParameters
Parameters.strTitle = strWindowTitle ' Input parameter


Call EnumWindows(AddressOf EnumWindowProc, VarPtr(Parameters))

FnFindWindowLike = Parameters.hWnd

End Function


Private Function EnumWindowProc(ByVal hWnd As Long, _
lParam As FindWindowParameters) As Long

Dim strWindowTitle As String


strWindowTitle = Space(260)
Call GetWindowText(hWnd, strWindowTitle, 260)
strWindowTitle = TrimNull(strWindowTitle) ' Remove extra null terminator

If strWindowTitle Like lParam.strTitle Then

lParam.hWnd = hWnd 'Store the result for later.
EnumWindowProc = 0 'This will stop enumerating more windows

Else


EnumWindowProc = 1


End If

End Function


Private Function TrimNull(strNullTerminatedString As String)


Dim lngPos As Long


'Remove unnecessary null terminator
lngPos = InStr(strNullTerminatedString, Chr$(0))

If lngPos Then
TrimNull = Left$(strNullTerminatedString, lngPos - 1)
Else
TrimNull = strNullTerminatedString
End If

End Function


Thanks for testing. I will check, if there is a solution, elsewise i remove this routine and go back to the old one for the V1.39d.

@Found a solution.
 
Last edited:
Hi All
My side monitors run at 1920*1080
My main monitor is running at 3840*2160

I agree I have been changing too many things due to frustration. I am currently bringing things back one by one tilll I see the problem again.
Current setup is main monitor + 1 side monitor
ED running in 2560*1440 on main monitor - I brought it down from 3840*2160 because of smoother frame rate.
TCE Main * Commodity panels on main monitor - all other TCE on side monitor
All NVidea drivers are at the latest versions.
No Firefox or other programs running
I did not see the problem all last night with the setup and am going to play again with the same for an hour or so - then I will bring monitor 3 back into play

Thanks for all the tips and advice - they are very much appreciated.
Ben
 
Last edited:
V1.39d

Update (V1.39d) released:


Changelog:
- Bugfix in new screenshot routine for Excel 64bit.
- Bugfix in Destination panel.

Just scanned and saved my first commodities list with V1.39d without any problems ! :)

I do not have the time for much more testing now, but I will of course bug you about it if I find anything else later on lol

and thank you for placating my OCD with the centered tool tips :)


Couldn't help myself and I extended my play time well past what would have been reasonable, again lol
Now I really have to go but I had time to scan a few stations, use the trade scout, lock a route, run it, hide/unhide...
all without a single glitch !!!
 
Last edited:
Hey guys.
I don't know if TCE allows you to change it's colors but:
1. EliteOCR supports now custom HUD colors (you just need to run color calibration)
2. Most prominent colors from screenshots used for calibration can be found in EliteOCR settings (color palette)

What I want to say is: you could change HUD in game, make screenshots, calibrate with EliteOCR and use the color palette to modify the colors of TCE to fit the theme.

It's only a suggestion.

EDIT: I also strongly recommend to "train" EliteOCR with 4-5 screenshots to maximize your accuracy (Settings->Learning Wizard) before using it in automatized mode...
 
Last edited:
well, ninjad.

i was about to inform that the newest eliteocr now is safe to use with tce.
but listen to seebek, follow the setup routine for calibration and the training in the proggie itself!
don't just overwrite your old folder and hope for the best.
setup, calibration and training will take approx. 15min, take your time.
and do a few screenshots of the markets by yourself and have them at hand.

now, let's go and use the ever living hell out of it.
 
eventure, how exactly do u use the eliteocrcmd function? is there a wait command or somesuch? referring to seeebek, the ocr part itself should be way faster. can we do something about this?
 
eventure, how exactly do u use the eliteocrcmd function? is there a wait command or somesuch? referring to seeebek, the ocr part itself should be way faster. can we do something about this?

Don't forget it is not just OCR. Has to take screenshot, OCR that, save results and import into DB as well as display results.
 
Just found this today. Got it installed but, as I am currently more than halfway to SagA, using it will have to wait. Regardless, I have to say I am impressed so far. It's a fine piece of work and considering it had to be designed around Frontier's "stay out of our files" policy, even moreso!
 
Don't forget it is not just OCR. Has to take screenshot, OCR that, save results and import into DB as well as display results.

i know, and i doesn't want to sound like that. i'm not very good expressing myself in english, you know...

in fact, it wouldn't need to be way faster, cause we have to scroll down and correctly align the page, move the cursor out before taking the new shot. on my machine, it takes approx. 12 secs for tce to do, scan and import one market screenshot.
if that could be reduced to somewhat ~8 secs, i would be more than happy. seeebek measured an astounding 1,2 secs for ocr'ing a screenie with the cmd-version. no way we can get even near that, and no need to.
 
i know, and i doesn't want to sound like that. i'm not very good expressing myself in english, you know...

in fact, it wouldn't need to be way faster, cause we have to scroll down and correctly align the page, move the cursor out before taking the new shot. on my machine, it takes approx. 12 secs for tce to do, scan and import one market screenshot.
if that could be reduced to somewhat ~8 secs, i would be more than happy. seeebek measured an astounding 1,2 secs for ocr'ing a screenie with the cmd-version. no way we can get even near that, and no need to.

I measuring the time, i need here for a single scan. Your 12 secs are indeed a lot. I added a timer to get the exact times.

So here it is:
- Preparation for the scan: 0,03 secs
- Taking screenshot: 0,05 secs
- OCR process: 2,25 secs
- Import of file: 0,23 secs
- Read data: 0,01 secs
- Buffer data: 1,76 secs
- Display data: 0,3 secs

As you see, the OCR part takes the longest. Buffering the data takes nearly equal time, but as i see, there is room for improvement there.
 
Last edited:
I measuring the time, i need here for a single scan. Your 12 secs are indeed a lot. I added a timer to get the exact times.

So here it is:
- Preparation for the scan: 0,03 secs
- Taking screenshot: 0,05 secs
- OCR process: 2,25 secs
- Import of file: 0,23 secs
- Read data: 0,01 secs
- Buffer data: 1,76 secs
- Display data: 0,3 secs

As you see, the OCR part takes the longest. Buffering the data takes nearly equal time, but as i see, there is room for improvement there.

we'll have to take into account that i use a res. of 5760*1080, so perhaps it's just the time it takes to save the shots? ocr'ing one screen in the gui eliteocr is even under 1 sec on my machine, after the screenshot is loaded into. my cpu is fast(oced), writing is done on ssd. eventure, do you use triple-mon / eyefinity yourself?
 
we'll have to take into account that i use a res. of 5760*1080, so perhaps it's just the time it takes to save the shots? ocr'ing one screen in the gui eliteocr is even under 1 sec on my machine, after the screenshot is loaded into. my cpu is fast(oced), writing is done on ssd. eventure, do you use triple-mon / eyefinity yourself?
I would recommend to provide punkerich the version with the timer so he can see which part uses the most time.
To check how long eliteocrcmd.exe needs for you, create a bat file. e.g. test.bat with something like this:
Code:
echo %time%
EliteOCRcmd.exe -i "C:\Users\xxxxxx\Pictures\Frontier Developments\Elite Dangerous\Screenshot_0000.bmp"
echo %time%
Run it and calculate the time from those two timestamps.
If EliteOCR takes longer on your setup I might try to find the reason and improve it.
 
I would recommend to provide punkerich the version with the timer so he can see which part uses the most time.
To check how long eliteocrcmd.exe needs for you, create a bat file. e.g. test.bat with something like this:
Code:
echo %time%
EliteOCRcmd.exe -i "C:\Users\xxxxxx\Pictures\Frontier Developments\Elite Dangerous\Screenshot_0000.bmp"
echo %time%
Run it and calculate the time from those two timestamps.
If EliteOCR takes longer on your setup I might try to find the reason and improve it.

now thats one thing to try! i'll give it a go and post results late in the evening! thanks mate!
 
we'll have to take into account that i use a res. of 5760*1080, so perhaps it's just the time it takes to save the shots? ocr'ing one screen in the gui eliteocr is even under 1 sec on my machine, after the screenshot is loaded into. my cpu is fast(oced), writing is done on ssd. eventure, do you use triple-mon / eyefinity yourself?

No, i am using on my single monitor a res of 1920 x 1200 and using also a SSD. The file size of my screenshot is 6,7 MB, what is yours?
 
Status
Thread Closed: Not open for further replies.
Back
Top Bottom