I recently tried using the announcement filter utility that came with the Lazy Newb Pack and was constantly annoyed by its problems (Not scrolling for new announcements being the biggest). So I started writing a python program that fixed those issues, this is what I came up with.
(http://i.imgur.com/aNx8dl2.png)
The program will give you a live feed of your announcements and combat reports, so you don't need to pause the game to read them. It should work on any version of python above v2.3.x.
There are two windows you can configure filters for, allowing you to separate important announcements from the never ending combat reports (or the less important stuff: "Urist mcHauler cancels Store Item in Stockpile: Item inaccessible."). The filters that it matches are loaded from a text file and can be edited however you want, as long as you have a basic understanding of regular expression syntax.
You can find the project on github: https://github.com/NuAoA/AnnouncementWindow
v1.1b
* Executable will now launch properly via the Lazy Newb Pack
* Will locate DF install when creating setting.cfg (aka on first launch. Only works if launched from LNP utilities folder)
* Added option for windows users to remove borders and force window to stay on top
v1.1
* Improved the UI for editing filters
* Works with Python 3
* Works on OS X and Linux now
v1.0
* Initial release
I compiled a .exe for windows that you can find on the releases page. If you are on OS X or Linux you will need python to run this program (Which should already be installed on your os). I can't test the program on those systems myself, so please let me know if you discover any bugs/crashes.
Finally got around to trying this and really like it. Great job, this is definitely going on my list of always-run exes for DF.
I'd also like to add a +1 to the idea of allowing the user to specify extra panes, allowing them to display messages in any number of customisable divisions.
PTW - this is already great, and it looks like ongoing development will be more reliable than it's predecessors.
I tried adding my utility (http://www.bay12forums.com/smf/index.php?topic=153777.0) to the utility folder (the .exe i've compiled with py2exe), and I get the following error when I try and open it through the LNP.
Weird. I also get an error, and launching it from a .bat script works... except through PyLNP.
I have this problem from PyLNP as well. I can run AnnouncementWindow.exe fine by double clicking on it (no need for a BAT), but executing it from PyLNP gives me a bunch of errors in the log about not being able to find TCL:
Traceback (most recent call last):
File "run.pyc", line 4, in <module>
File "Window.pyo", line 161, in __init__
File "Tkinter.pyo", line 1814, in __init__
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
{C:\Users\tomjo\AppData\Local\Temp\_MEI71642\_MEI\tcl} C:/Users/tomjo/AppData/Local/Temp/_MEI71642/_MEI/tcl8.5 C:/Games/DWARFF~1/LNP/Utilities/lib/tcl8.5 C:/Games/DWARFF~1/LNP/Utilities/lib/tcl8.5 C:/Games/DWARFF~1/LNP/lib/tcl8.5 C:/Games/DWARFF~1/LNP/Utilities/library C:/Games/DWARFF~1/LNP/library C:/Games/DWARFF~1/LNP/tcl8.5.15/library C:/Games/DWARFF~1/tcl8.5.15/library
C:/Users/tomjo/AppData/Local/Temp/_MEI71642/_MEI/tcl/init.tcl: version conflict for package "Tcl": have 8.5.15, need exactly 8.5.2
version conflict for package "Tcl": have 8.5.15, need exactly 8.5.2
while executing
"package require -exact Tcl 8.5.2"
(file "C:/Users/tomjo/AppData/Local/Temp/_MEI71642/_MEI/tcl/init.tcl" line 20)
invoked from within
"source C:/Users/tomjo/AppData/Local/Temp/_MEI71642/_MEI/tcl/init.tcl"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list source $tclfile]"
This probably means that Tcl wasn't installed properly.
The errors all relate to a temporary directory, and I've looked in my Temp folder and see a couple named as above, eg _MEI81642, containing files relating to PyLNP. For example, containing LNP.ICO, PyLNP.exe.manifest, and then a bunch of Python DLLs, including tcl85.dll.
So it seems that an option for packaging Python EXEs on Windows is as archives which expand library and other files to a temp folder and then execute from there. At least, this is one way Python executables can run on Windows - not a method seemingly used by AW, but used by PyLNP and at least one other Python app on my system (I see I have another _MEI* folder from some other app, not PyLNP - possibly Google Drive in fact.)
Both PyLNP and AnnouncementWindow use TCL: AW uses version 8.5.2 and PyLNP is 8.5.15. So the problem is that when AW runs from PyLNP it seems to include PyLNP's temp folder in its search for tcl*.dll, and look there first - before its own folder. This causes it to fail on the package requirements, because it finds PyLNP's 8.5.15 tcl85.dll, and its rules specify that it requires only version 8.5.2 (package require -exact Tcl 8.5.2) It's probably an environment problem, inheriting PyLNP's environment which specifies PyLNP's Temp folder at the start.
Maybe there's a setting you can specify that can change where the Windows version looks for includes, such on Windows it only looks for TCL in the same directory where AW.exe is found? Or looks there first at least; ignoring any environment PATH.
Or, perhaps you can make the EXE the same way that PyLNP is made, such that it has tcl85.dll bundled in the Exe and it expands this into a Temp folder before running? If it had its own temp folder it would presumably look there before any other Python temp folder. That would also mean you could distribute fewer files, in the same way that PyLNP distributes only an Exe: with the DLLs and other files baked into that Exe.
Or perhaps the quickest fix for now would be to just change AW's packaging requirement rules to specify that TCL can be any 8.5 version from 8.5.2 onwards. The logs show "package require -exact Tcl 8.5.2", so if this could be changed to whatever syntax accepts 8.5.* then it could use either its own 8.5.2 or PyLNP's 8.5.15 version of tcl.dll. (This is of course assuming that nothing breaks with a higher 8.5 version! Hopefully not as the versioning suggests it should only be bugfixes from 8.5.2 -> 8.5.15.)
I suppose that might not be the best long term solution, as it requires that AW can always work with every version of 8.5.* TCL that might be found on a system. But it should work quickly for now, if the fundamental environment search path issue can't be fixed as quickly/easily.
Hope that helps and thanks again for the great tool, really like it.
Ok, i've released version 1.1b. It has a few new features and it works fine with the old (python 2.7.5) and new (2.7.10) LNP package.
I've also hacked together a method to locate gamelog.txt when it's opened for the first time from a LNP utility folder.
v1.1b
* Executable will now launch properly via the Lazy Newb Pack
* Will locate DF install when creating setting.cfg (aka on first launch. Only works if launched from LNP utilities folder)
* Added option for windows users to remove borders and force window to stay on top