Re: Delete extension
Re: Delete extension
- Subject: Re: Delete extension
- From: Ehsan Saffari <email@hidden>
- Date: Sun, 30 Sep 2001 21:33:19 -0600
On 30/09/2001 "Wpm - Dan" <email@hidden> wrote:
>
Hi Ehsan, above all thanx a lot for your answer. I succeded in solving the
>
problem in part with your script. But i go to describe the situation i have
>
so you can understand the problem i've now.
>
>
I have to install windows media player 7 for mac to see some videos with
>
extension .wmv. But what happen is:
>
>
Windows Media Player install in the Pc Exchange two line one with generic
>
wmv association without associng the player to open this type of file and
>
another one with exact association wmv associng wmv files to wmp program...
>
>
And what succed is that, when i open the file name.wmv the Mac, before it
>
finds in pc exchange the generic wmv association and returns error, then it
>
finds the right wmv association and open the file!!! But the user has to
>
click ok on the error window it returns! ...and this's a big problem.
>
>
So i ask you if is possible after the installation of wmp delete the wrong
>
wmv association leaving only the right one.
>
>
If i launch the script, it deletes the first wmv association and it can
>
happen that it erases the right one!!
>
>
So is it possible to write a scipt that deletes ALL wmv association from pc
>
exchange and than create only one new right extension with the line "make
>
new extension on mapping...."?
>
>
I know maybe this is possible to do... have you got an idea how to solve it?
>
>
Thanx a lot.
>
Dan
Normally I would try to get all matching extension mappings, loop thru
them and delete the unneeded one and leave the right one alone, but file
exchange doesn't support this construct:
get every extension mapping whose PC extension is "wmf"
or get the first extension mapping for "wmf" with application "wmp", but
that does not seem to be possible either.
If there are multiple mappings with the same name, File Exchange only
returns the first one.
The only way I can think of to do what you want is to delete all mappings
for "wmf" and then create a new mapping for "wmf" with application "wmp".
tell application "File Exchange"
activate
set current panel to PC exchange
make new extension mapping with properties {PC extension:".wmf", creator
type:"", file type:""}
end tell
(insert appropriate creator and file type instead of "")
hth
ehsan