home *** CD-ROM | disk | FTP | other *** search
- on mouseUp
- checkFile()
- beep()
- alert("Cool!!! Your Web Browser has been set")
- go("begin")
- end
-
- on checkFile
- global myfile
- set myfile to new(xtra("fileio"))
- set finalPath to field "OSPath"
- openFile(myfile, finalPath & "Browser", 0)
- if status(myfile) = 0 then
- delete(myfile)
- closeFile(myfile)
- end if
- writeToFile()
- end
-
- on writeToFile
- global myfile
- set myfile to new(xtra("fileio"))
- set theLocation to displayOpen(myfile)
- put theLocation into field "BrowserLoc"
- set finalPath to field "OSPath"
- createFile(myfile, finalPath & "Browser")
- openFile(myfile, finalPath & "Browser", 0)
- writeString(myfile, theLocation)
- closeFile(myfile)
- set myfile to 0
- end
-