Hi everybody I tried to show a window containing a message using TextWindow.new() but it always gave me a message that tshark stopped working when I run the file, the try is in a lua file that doesn't containing anything except TextWindow.new() and its method functions like append and so on, What's the problem? I did this because I wanted to try it alone before I merge it inside a big lua file. By the way my os is vista. Thanks a lot. asked 16 Dec '12, 07:37 Leena |
One Answer:
TextWindow.new and tshark? How would tshark open a new Window? That function is only usable within Wireshark. You can check for gui support with gui_enabled(), see the following example.
Regards answered 16 Dec '12, 13:06 Kurt Knochner ♦ |
Is this(the message I got) what is meant by helloworld answers:
-- If not running from Wireshark, enable the tap immediately, then
-- abort, or else we'll get an error below for trying to do GUI
-- stuff from the command line.
in the question:http://ask.wireshark.org/questions/9682/trigger-an-executable-file-once-wireshark-finds-a-keyword-on-live-capture
?? Thanks.
In the answer of @helloworld you can see, that the code checks if the GUI is available. If no, it takes a different route.
if not gui_enabled() then make_tap(_filter) return end
So, you'll have to do similar things in your code. If the LUA script runs in tshark, you can't open a GUI window, as that is not possible.