From: | James L Boyd |
Date: | 13 Mar 2001 at 18:20:47 |
Subject: | Re: Memorylocation reference question + Intuifont incbining |
> You could do something like:
>
> cmd.s= "Assign Fonts: Ram: ADD"
> Execute_ cmd,0,0
This is in my StatsFuncs file on Aminet, if you want to avoid running stuff
via Execute_ () -- I always did! I haven't tested this since I wrote it, so
no guarantees ;)
-----------------
; Function : OSAssign { assign name, path, type }
; Author : James L Boyd - thesurfaces@rockers.co.uk
; This function creates an assign and returns True if
; successful, false if not.
; The parameters are the assign name (eg. "MyAss:"), the
; path which this assign refers to (eg. "Work:Gfx/Pics"),
; and the type of assign - True (-1) for Path, or False (0)
; for a Late assign.
; Path assigns are activated immediately, Late assigns
; only activate when you try to use them (saves clogging
; up file/path requesters for a start :)
; I've called it OSAssign to avoid confusion with the BSS command
; Assign.
; Also, the function checks for the existence of the path
; you specify, since you CAN assign a name to a non-existent
; drawer! It returns False (0) if the path doesn't exist.
; Sore Point : Don't know how to remove it, except for :
; Execute_ "run >NIL: assign <assign> REMOVE",0,0
Function.b OSAssign {name$,path$,PathOrLate.b}
If Exists(path$)
Select PathOrLate
Case 0 ; LATE assign...starts when accessed.
If AssignLate_(&name$,&path$)
Function Return -1
Else Function Return 0
EndIf
Case -1 ; PATH assign...starts immediately.
If AssignPath_(&name$,&path$)
Function Return -1
Else Function Return 0
EndIf
Default
Function Return 0
End Select
Else Function Return 0
EndIf
End Function
; demo :
;; NOTE : To remove the assign after testing, go to the CLI and
;; type "assign MyAss: REMOVE" (without the quotes!).
; If OSAssign {"MyAss","SYS:C/",-1} ; -1=path assign...
; Request "","Success! MyAss: is assigned to the SYS:C/ drawer!","OK"
; Else Request "","Couldn't assign MyAss: !","OK"
; EndIf
; End
----------------
See ya,
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list/-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list/-help@netsoc.ucd.ie