From: | James L Boyd |
Date: | 14 Sep 2000 at 02:06:47 |
Subject: | Re: Appicons (again) and DefaultTools |
> However, deftool$ just contains a load of gibberish. How do I go about
> finding out a file's default tool?
Hang your head in shame -- it's in StatsFuncs! ;)
; --------------------------------------------------------------------------
---------
; Function : DefaultTool { file }
; Author : James L Boyd - thesurfaces@rockers.co.uk
; Tries to read a file's icon to see which tool is set as the
; default program to load the particular file. If there is no icon,
; the routine checks the default icon for that type of file.
; Don't supply ".info" in your filename!
Function.s DefaultTool {d$}
*do.DiskObject=GetDiskObjectNew_(&d$)
If *do
d$=Peek$(Peek.l(*do+50))
FreeDiskObject_(*do)
If d$ Then Function Return d$
Else Function Return ""
EndIf
End Function
; demo :
; a$="HELP:visage.guide" ; *** Change to suit ***
; Print "Default tool of "+a$+" : "
; a$=DefaultTool {a$}
; If a$
; NPrint a$
; Else NPrint "No default tool"
; EndIf
; MouseWait
; End
; --------------------------------------------------------------------------
---------
> Secondly, AppIcons using proper system commands :) I've been messing about
Ah, don't look at me for that one ;)
See ya,
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie