home *** CD-ROM | disk | FTP | other *** search
- on mouseUp
- writeToFile()
- end
-
- on writeToFile
- global myfile, theLocation, finalPath
- if objectp(myfile) then
- set myfile to 0
- end if
- set myfile to new(xtra("fileio"))
- setFilterMask(myfile, "ALL FILES, *.*, TEXT FILES, *.TXT")
- set theLocation to displayOpen(myfile)
- if not voidp(theLocation) then
- checkFile()
- else
- alert("You did not select your Web Browser.")
- end if
- closeFile(myfile)
- set myfile to 0
- end
-
- on checkFile
- global myfile, theLocation, finalPath
- put theLocation
- set finalPath to field "OSPath"
- if the machineType = 256 then
- openFile(myfile, finalPath & "\BROWSER.TXT", 0)
- else
- openFile(myfile, finalPath & "BROWSER.TXT", 0)
- end if
- if status(myfile) = 0 then
- delete(myfile)
- closeFile(myfile)
- end if
- put theLocation into field "browserLoc"
- set finalPath to field "OSPath"
- if the machineType = 256 then
- createFile(myfile, finalPath & "\BROWSER.TXT")
- openFile(myfile, finalPath & "\BROWSER.TXT", 0)
- else
- createFile(myfile, finalPath & "BROWSER.TXT")
- openFile(myfile, finalPath & "BROWSER.TXT", 0)
- end if
- writeString(myfile, theLocation)
- end
-