I have a list of files with different extensions in a custom window. Using a menu I can grab the filename and use /run to view the file e.g.
menu @window {
dclick: {
%file = $line(@window,$1,1)
viewfile %file
}
The viewfile alias could become quite long if I have to accommodate every file extension registered on the computer.
alias viewfile {
%extension = $gettok($1,2,46)
if %extension == txt { run notepad.exe $1 }
if %extension == jpg { run thumbsplus.exe $1 }
if %extension == mp3 { run winamp.exe $1 }
etc
etc
}
I would like to be able to doubleclick the file and have mirc invoke the correct program for viewing/playing/editing the file.
Any hints?
Regard the code above as pseudocode. I haven't tested it, but I hope you get the picture.
Cheers