-- card: 7489 from stack: in.1 -- bmap block id: 9525 -- flags: 0000 -- background id: 3468 -- name: filename -- part 1 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=350 top=108 right=132 bottom=386 -- title width / last selected line: 0 -- icon id / first selected line: 1015 / 1015 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: New Button ----- HyperTalk script ----- on mouseUp visual iris open slow to inverse go card filecard end mouseUp -- part contents for background part 2 ----- text ----- FileName -- part contents for background part 4 ----- text ----- FileName([]) -- part contents for background part 1 ----- text ----- The XFCN execution returns a dialog box which contains a list of only those files which match the filetype. The value returned by the function is the full name of the file including location (e.g., "HD-20:Hyper Stacks:Home") Restypes: "TEXT" - ASCII text files "STAK" - HyperCard stack files "APPL" - Applications ------------------------------ examples A. on mouseUp get FileName("TEXT") if it is not empty then put it into newfile open newfile read from file newfile until return put it into field maintext close newfile end mouseUp B. on mouseUp put filename("STAK") into fname if fname is empty then exit mouseUp deprotect fname if the result is empty then answer "Deprotect Successful" with "OK" else if the result is -49 then answer "Sorry, that file is busy." else if the result is -44 then answer "Sorry, the disk is locked." else answer "Failed: unexpected file system error: " & the result with "OK" end mouseUp -- part contents for background part 9 ----- text ----- XFCN -- part contents for background part 8 ----- text ----- Steve Maller