OS/2, eCS & ArcaOS - Technical > Multimedia

How do I change this default behaviour?

<< < (3/4) > >>

Lars:
On second thought, it's likely much easier to write a new WPS class that registers for certain file types/extensions and then to override the "open" method (invoked on a double click). And that is what the CWMM classes likely do. Then they just invoke some app with the filename. And the app seems to be configurable via some INI key or config file.

Rich Walsh:
Here's something I vaguely remember from a FixPack readme that supposedly works for the IBM MM classes but *not* for CWMM.

You can create a dummy object of a given class and use a setup string that will set the default 'OpenAs' for the entire class. I unpacked 'mmparts.dll' and confirmed that the string is in there. Here's how to do it using 'oo' - you could use REXX instead:

--- Code: ---oo /n MMMPG mmtest.mpg "<WP_DESKTOP>" "CLASSDEFAULTVIEW=4096;"

--- End code ---
After the file is created on the Desktop, you can delete it.

The default view value of '4096' means "the first associated program". I have no way to test this since I have CWMM installed, so I'd be interested to know if it actually works.

Dariusz Piatkowski:
Hi Rich,


--- Quote from: Rich Walsh on November 30, 2021, 06:58:09 am ---...You can create a dummy object of a given class and use a setup string that will set the default 'OpenAs' for the entire class. I unpacked 'mmparts.dll' and confirmed that the string is in there. Here's how to do it using 'oo' - you could use REXX instead:

--- Code: ---oo /n MMMPG mmtest.mpg "<WP_DESKTOP>" "CLASSDEFAULTVIEW=4096;"

--- End code ---
After the file is created on the Desktop, you can delete it.

The default view value of '4096' means "the first associated program". I have no way to test this since I have CWMM installed, so I'd be interested to know if it actually works.

--- End quote ---

Nah, no luck Rich. I created the object, even re-booted just in case, but no change. What was curious is that the default 'Open as' for that object was 'Video editor', meanwhile the other AVI files are pointing to 'Play' instead.

Anyways, l suspect there is some other stuff that's causing the problem here. In fact I went as far as to deregister the MMAVI class but following re-boot I still had the same AVI file behaviour.

What a real PITA this has turned out to be...LOL!

Lars:
Yes, the complexity is ridiculous. But if Rich's suggestion means that the "first associated program" will open the file, then you'll also need to associate your desired program and it will have to the "the first".

And in order to do that, I suspect that you need to set up a program object for your desired progam and then, on the association page, to assign by file type and/or file extension the files you want to have handled by this program (the *.AVI files in your case). What I don't know is how to convince the system that this is the "first" program for the files of given file type and/or file extension. I hope that you can specify the usual placeholder parameters in the "command line" entry field to have the program started with additional parameters and the filename.

Since with Rich's suggestion, on a double click, the open action now is "the first associated program" and no longer the default action (which was "Play"), your program should then be called with the filename as the argument instead of the "Play" action invoked (which likely is to invoke the default MM device specified through MMPM2.INI ...).

So I hope at least.

Dariusz Piatkowski:
Lars, everyone...


--- Quote from: Lars on December 01, 2021, 10:28:50 am ---Yes, the complexity is ridiculous. But if Rich's suggestion means that the "first associated program" will open the file, then you'll also need to associate your desired program and it will have to the "the first".
--- End quote ---

That's the thing you guys, this has already been done. It's like the default associations have absolutely NO bearing on what MMOS2 will actually do. Take a look at this definition of mplayer object: the object types associated cover the MMAVI and MMMPG classes, then to top it all off I even included the file extensions.


--- Quote from: Lars on December 01, 2021, 10:28:50 am ---...Since with Rich's suggestion, on a double click, the open action now is "the first associated program" and no longer the default action (which was "Play"), your program should then be called with the filename as the argument instead of the "Play" action invoked (which likely is to invoke the default MM device specified through MMPM2.INI ...)...
--- End quote ---

Yeah, my hope was that this would work. What was strange is that the newly created object (with Rich's command) was the ONLY AVI object that was changed to 'Video editor', all other AVIs that I have remained exactly as they were, even after a re-boot.

You know, I spent a little time yesterday looking at how to override the default behaviour in 'Play'. I expected to find a program object named 'Play', but did not. I also looked for 'Video editor', did not find that either. So that makes me think this is all internally implemented in the MM class, perhaps in one of the DLLs?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version