home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (BR) Volume 3 #5 / CDRV3N5.ISO / demo / introdm.dir / Internal_230.ls < prev    next >
Encoding:
Text File  |  1996-07-12  |  721 b   |  28 lines

  1. on setpath apath
  2.   openXLib("MovUtils.DLL")
  3.   set pathName to apath
  4.   delete char integer(the number of chars in pathName) of pathName
  5.   if objectp(utilObj) then
  6.     utilObj(mdispose)
  7.   end if
  8.   set utilObj to MovUtils(mnew)
  9.   set result to value(utilObj)
  10.   if result < 0 then
  11.     alert("Error" && result && "trying to create the Object")
  12.     exit
  13.   end if
  14.   if objectp(utilObj) then
  15.     set result to utilObj(mSetDefaultPath, pathName)
  16.     if result = -1 then
  17.       alert("(" & pathName & ")" & "No such directory exists. Please try again...")
  18.       exit
  19.     end if
  20.   else
  21.     alert("Sorry...no object has been created")
  22.   end if
  23.   if objectp(utilObj) then
  24.     utilObj(mdispose)
  25.   end if
  26.   closeXLib("MovUtils.DLL")
  27. end
  28.