Hi ciryon,
Your question is a little ambiguous (could be read several ways) so I'll reply the best I can and if I am off base you can let me know in a reply.
There are two different ways right off the top I would address your question. The first is handling your exact example. Netscape (Mozilla) definitely provides you an option to supply it an URL on the command line (even if it is already running) and displaying that URL in the browser. There are a number of options that the script used to launch the application provides.
The more complicated issue (and probably more directly related to your question) is manipulating the clipboard from within a Perl application. All my experience is with Perl/Tk so I cannot directly address Perl/GTK or wxPerl (which I'm dying to learn because I understand is the GUI of choice for Perl these days). From Perl/Tk there is a Tk::clipboard module that provides you direct access to the clipboard through the $widget->clipboardClear and $widget->clipboardAppend methods. This would enable you to load the clipboard (in X and presumably WinXX as well) with pretty much any data you like. From there it would be a manual process to paste that data into your application. That is to say there is method provided by Perl/Tk that allows you force your clipboard into some widget of another application. I also highly doubt that any language would provide for such a method.
The clipboard isn't generally used as a shared memory area where one application can put data for another to automatically pick that information up. It possibly could be treated that way, but it would be very sensitive to user interruption. KDE has a nice applet that tries to intelligently handle information you put in the clipboard and may also provide you with some of the functionality you desire. However this applet performs the action I first discussed - it calls the application with data on the command line.
In summary I don't think what you are asking for is directly possible, but playing with the clipboard using Perl is. The documentation for Perl/Tk is pretty good so if you have it check it out. wxPerl may provide you with additional options I am not aware of.
Good luck!
{NULE} |