render-with-notepad
render-with-notepad copied to clipboard
Error: Pattern not found -- in Ray Tracing
It gives me this error, the notepad opens well and the program starts writing lines, then it stops as the error appears. Am I missing something or doing anything wrong?
I opened the repo is VS and Built the project from the source and ran the exe file with the path to the notepad as it's parameter.
I'm using windows 7,64x bit 8 gb of RAM and GEFORCE graphics card
Had the same problem with both Raytracing and Snake
Likely need to use System32
instead of system32
(@epic-guy @saxobroko). Copy the full path for notepad.exe for good measure (i.e. RayTracer.exe C:/Windows/System32/notepad.exe
)
@LloydTao Nope, that did not work, same error
my point is that, the notepad is detected and opened, but later it just says the error after writing some 4 lines
This looks like it's timing issue, if it's outputting "pattern not found" before it finishes filling the notepad screen. I have a hardcoded wait in the code, but you may need to adjust that duration for your machine (or do something more intelligent with it).
Right now what looks like is happening is that your machine is looking for the byte pattern for the entire window, but at the time of searching, notepad's on screen text buffer only has a subset of them.
@khalladay if this aint too much to ask, can u tell me which line u have defined the wait code? atleast which file, might me good enough
https://github.com/khalladay/render-with-notepad/blob/master/Render-With-Notepad/RayTracer/notepad_frontend.cpp , line 192.
Just change the Sleep call to something like Sleep(30000) and see if it fixes it (bearing in mind that this will pause the program for 30s, so your notepad window might fill and then hang out for a bit before it tries to acquire the pattern).