Windows Application Icon

Chipp Walters chipp at chipp.com
Tue Feb 17 02:05:32 EST 2004


Mark,
Here's some stuff from ButtonGadget which might help. I believe it will do
what you need it to (ButtonGadget extension is .plg). I put
doRegistryStuffin the startup handler, so it runs each time.

on doRegistryStuff

  put the fileName of this stack into tPath
  set itemDel to "/"
  delete last item of tPath
  replace "/" with "\" in tPath
  put tPath&"\ButtonGadget.exe" into tPath

  if queryregistry("HKEY_CLASSES_ROOT\.plg\") <> "ButtonGadget" then
    get setRegistry("HKEY_CLASSES_ROOT\.plg\","ButtonGadget")
  end if

  if queryregistry("HKEY_CLASSES_ROOT\ButtonGadget\") <> "ButtonGadget
document" then
    get setRegistry("HKEY_CLASSES_ROOT\ButtonGadget\","ButtonGadget
document")
  end if

  put tPath&",1" into tVar
  if queryregistry("HKEY_CLASSES_ROOT\ButtonGadget\DefaultIcon\") <> tVar
then
    get setRegistry("HKEY_CLASSES_ROOT\ButtonGadget\DefaultIcon\",tVar)
  end if

  put tPath&" %1" into tVar
  if queryregistry("HKEY_CLASSES_ROOT\ButtonGadget\shell\open\command\") <>
tVar then
    get
setRegistry("HKEY_CLASSES_ROOT\ButtonGadget\shell\open\command\",tVar)
  end if

end doRegistryStuff

>
> Yes I finally got most of it to work. I looked at what was getting
> added with regEdit and I'm still having problems getting the document
> icon to associate with newly created documents. I forced an association
> with folder tools available on Windows XP Pro. I just need an automatic
> way to do this so the user does not have to force an association.
>
> Mark
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list