From: | Nick Clover |
Date: | 27 Aug 2001 at 16:13:21 |
Subject: | Re: Tooltypes Libraries? |
Hello David
On 27-Aug-01, you wrote:
> Howdy!
> I wish to have my program read [& eventually write]
> tooltypes. I see there are 2 libraries that deal w/ this: the New
> Command Set, & the RI set. Should i prefer either of these? Which
> is more reliable, easy to use, etc??
> Advance Thanks,
ok, here's a routine that reads tooltype info, grabbed from stats&funcs
at least it will get you started while you're deciding what library to
use.
; Function : ToolString { icon, tooltype }
; Author : James L Boyd - jamesboyd@all-hail.freeserve.co.uk
; - adapted from someone else's source!
; Returns tooltype's contents (if any)...
; or "NotFound" if not found :) - added by Nick Clover
Function.s ToolString {icon$,tool$}
If Right$(icon$,5)=".info" Then icon$=Left$(icon$,Len(icon$)-5)
*Icon.DiskObject=GetDiskObject_(&icon$)
; *Icon.DiskObject=GetDiskObjectNew_(&icon$)
; ^ this uses the default-type icon if there isn't one...
a$="NotFound"
If *Icon
a.l=FindToolType_(*Icon\do_ToolTypes,&tool$)
If a
a$=Peek$(a)
Else a$=""
EndIf
FreeDiskObject_ *Icon
Else Function Return ""
EndIf
Function Return a$
End Function
; demo :
; NOTE - you'll need to change this to something
; on your system!
; NPrint ToolString {"SYS:Tools/HDToolBox","SCSI_DEVICE_NAME"}
; MouseWait
; End
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie