$volume:=Replace string(System folder;"System";"Applications") $name:=Select document($volume;"";"";Package selection ) If (OK=1) $volume:=Replace string($volume;"Applications:";"") If (Substring(DOCUMENT;1;Length($volume))=$volume) $path:=Substring(DOCUMENT;Length($volume);Length(DOCUMENT)-Length($volume)+1) Else $path:=":Volumes:"+DOCUMENT End if $path:=Replace string($path;":";"/") AddToDock ($name;$path) End if