I have a shell script producing a html page. It then opens it in a webbrowser, using the simple syntax
opera result.html
However, if I run this script several times, I get as many tabs/windows as runs. I tried to load another page containing a script that opens ‘result.html’ into a definite target-window, but this script page will not close using window.close() or self.close() [presumably because it was not opened by a javascript…], so it’s the script page that is repeated…
Is there a way, either to have a webbrowser open a file into a target using the commandline, or to auto-close a window that was opened thru command line?
Which platform are you using? For Unix, there is an
-activetabswitch you can use.See Opera’s Command Line Options page for different platform switches that may be suitable.