Basically I need a tool (preferably for linux) for getting some data from webpage, opening some others, filling form on them, closing windows and clicking on some buttons.
What would be the tool for doing this in whole? Some scripting language like Perl or Python can do it for me?
This is maybe difficult so give me the way that is most user friendly. :-)
I am not familiar with Perl or Python, but I am strong in my will to make it work because it is important to me. Notify that I can't do anything on the server, so everything that needs to be done is from clientside/web browser.

open webpage
on that page click on the link to open webpage in new window
on new page click on two radio buttons and submit
close that window and return to previous
extract part of the text from  tag that follows text "IP Address: " to the end of the line and save it to the variable
extract part of the text from  tag that follows text "Timestamp: " to the end of the line and save it to the variable
extract part of the text from  tag that follows text "File Name: " to the end of the line and save it to the variable (these three are similar to make)
open URL in the new window
fill in the form with the data that is extracted from the previous page and submit
if there is "answer"(result is table) from the form do "procedure1"(copy entire table with result and concat its cells, close window and return to previous, again click some buttons/links on that page etc.....)
if there is "no answer"(empty table) from the form do "precedure2"(opening new window, filling form with data in variables, clicking some buttons and closing that window) than proceed to "procedure1"

Thank you all for helping me.
Short answer: In Python, you can use mechanize together with BeautifulSoup to achieve what you want. Try it and figure out from the docs of these packages how to use them, then come back here with specific questions when things don't work.
Some scriping language for my task?