You know how you can "Associate" files to load with a certain application? well you can.
I'm trying to work out how to do this in MMF2 and I would like it if someone could give me some pointers on what to do.
Kthnx
You know how you can "Associate" files to load with a certain application? well you can.
I'm trying to work out how to do this in MMF2 and I would like it if someone could give me some pointers on what to do.
Kthnx












Use the YASO object, which comes with Bonus Pack #1.
.:::.Joshtek.:::.

I personally don't like using YASO, although it's an option.
Another alternative (if you dare) is MaNuALLy aLtEriNg tHe RegIsTRy ::spine-chilling music o' doom, crack o' thunder, etc::
Let me talk you through it
In Windows, the registry is basically like another set of files and folders.
The top five or so folders inside the registry are called Root Keys. They all start with 'HKEY_' in capital letters.
The one we want is 'HKEY_CLASSES_ROOT' -- the registry folder that Windows uses to handle file types/classes.
inside HKEY_CLASSES_ROOT, you create a folder for the extension you want. So if we're going to create a file extension of '.foo', we create a folder called '.foo' (remember the dot!)
so basically, we're gonna go on a folder-creating spree. Note that in the registry, you can create Items (kind of like files) to hold data. If you leave the Item Name blank, then it a nameless "(Default)" item. Nameless items are used a LOT.
So we create the following folders in the Registry. In this example, we're creating a .foo filetype:
HKEY_CLASSES_ROOT\.foo\
(set default value to "Some_Name_That_I_Chose")
HKEY_CLASSES_ROOT\Some_Name_That_I_Chose\
(set default value to "A description of my Foo file")
HKEY_CLASSES_ROOT\Some_Name_That_I_Chose\DefaultIc on\
(set default value to "c:\wherever\my\icon\file\is\located.ico")
HKEY_CLASSES_ROOT\Some_Name_That_I_Chose\shell\ope n\command\
(set default value to "c:\the\path\of\my\program.exe +plus_any_commandlines")
And THAT, I believe, is it.
It's more complicated by far, and there's the risk that you may stuff it up (not likely, but possible). But it's also very slick, and gives you the power to do a LOT more things.












Note: To use the Registry in MMF2 you need the Registry 2 object which comes with build 243. The beta of 243 is out now but you could wait for the release candidate.
.:::.Joshtek.:::.


I learned how with the YASO extention from this post:
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Board=2&Number=19318&S earchpage=1&Main=2209&Words=YASO&topic=0&Search=tr ue#Post19318