home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 10 / MacAddict_010_1997_06.iso / media / Demos.Dxr / 00070.ls < prev    next >
Encoding:
Text File  |  1997-03-26  |  696 b   |  32 lines

  1. on mouseUp
  2.   checkFile()
  3.   beep()
  4.   alert("Cool!!! Your Web Browser has been set")
  5.   go("begin")
  6. end
  7.  
  8. on checkFile
  9.   global myfile
  10.   set myfile to new(xtra("fileio"))
  11.   set finalPath to field "OSPath"
  12.   openFile(myfile, finalPath & "Browser", 0)
  13.   if status(myfile) = 0 then
  14.     delete(myfile)
  15.     closeFile(myfile)
  16.   end if
  17.   writeToFile()
  18. end
  19.  
  20. on writeToFile
  21.   global myfile
  22.   set myfile to new(xtra("fileio"))
  23.   set theLocation to displayOpen(myfile)
  24.   put theLocation into field "BrowserLoc"
  25.   set finalPath to field "OSPath"
  26.   createFile(myfile, finalPath & "Browser")
  27.   openFile(myfile, finalPath & "Browser", 0)
  28.   writeString(myfile, theLocation)
  29.   closeFile(myfile)
  30.   set myfile to 0
  31. end
  32.