On Sun, 13 Feb 2005 10:22:36 -0800, Mark Knecht <[EMAIL PROTECTED]> wrote:

> 
>    Within Gnome is there a way that I could double click on a file in
> their browser and then cause the system to start executing a program
> that asks me questions about what to do?

I don't know what you mean by "their browser." In Firfox and all the
mozilla/netscape derivatives, you can establish Mime relationships
that cause a program or script to be invoked when you click (single
click is enough) on a file with the registered file type.  From the
description below, the registered program would need to be a
moderately complex script.

> I have some files that are
> used in a specialized audio program. Each individual file contain
> multiple instruments. I'd like the script to:
> 
> 1) Check the file for available instruments. I know how to do this
> (sort of) at the command line using something like "gigdump
> filename.gig | grep Instrument". That almost works well enough for
> this task but it does produce one extra line I'll need to get rid of.

In a bash script you can easily pipe the output of your `gigdump
filename.gig | grep Instrument` (note the backticks rather than
quotes) commands into variables and iterate through these.

> 
> 2) Pop up a window and tell me about the instrument list.
> 
> 3) Ask me which on I want to use
> 
> 4) Ask me a couple more questions that I answer

All of this is doable in a script.

> 
> 5) Take the set of answers and send it over the network using some command 
> like
> 
> echo "command 1" | nc localhost 8888
> echo "command 2" | nc localhost 8888

Also not a problem in a script.

> 
>    I know nothing of doing stuff like this but it would be very
> helpful. The windows program that uses these files of course has a
> fancy file browser that allows you to do this with a couple of click &
> drag operations. The Linux program has nothing so I'm doing this by
> hand and it's very tedious.
> 

Yes, Linux does not have a builtin script to do this, but you can roll
your own. The question is: are you ready to learn bash or perl or
python or php or ??? and to do a little research to build your
knowledge of the browser interface and the use of these tools? A
little knowledge can be a dangerous thing.



-- 
 Collins

--
[email protected] mailing list

Reply via email to