home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel
/
CAROUSEL.cdr
/
mactosh
/
hc
/
xfcn_fil.sit
/
Files
/
card_2901.txt
< prev
next >
Wrap
Text File
|
1988-02-20
|
4KB
|
183 lines
-- card: 2901 from stack: in
-- bmap block id: 0
-- flags: 0000
-- background id: 2769
-- name:
-- part 1 (button)
-- low flags: 00
-- high flags: 2001
-- rect: left=18 top=31 right=74 bottom=65
-- title width / last selected line: 0
-- icon id / first selected line: 1011 / 1011
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Home
----- HyperTalk script -----
on mouseUp
if the optionkey is down then
pass mouseup
end if
go home
end mouseUp
-- part 8 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=145 top=36 right=60 bottom=375
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 14
-- style flags: 1280
-- line height: 18
-- part name:
-- part 10 (field)
-- low flags: 80
-- high flags: 0004
-- rect: left=118 top=79 right=265 bottom=416
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: About
-- part 11 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=26 top=72 right=316 bottom=197
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 14 (field)
-- low flags: 01
-- high flags: 0007
-- rect: left=231 top=76 right=260 bottom=486
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Files
-- part 15 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=234 top=272 right=294 bottom=334
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Files
----- HyperTalk script -----
on mouseUp
global path
ask "Get files in what directory (complete path)" with path
if it is not empty then
put it into path
Put Files(it) into card field "files"
end if
end mouseUp
-- part 22 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=371 top=272 right=295 bottom=461
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Syntax
----- HyperTalk script -----
on mouseUp
show card field "info"
repeat until the mouse is down
end repeat
hide card field "info"
end mouseUp
-- part 23 (field)
-- low flags: 81
-- high flags: 0004
-- rect: left=60 top=75 right=315 bottom=475
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: info
-- part contents for card part 8
----- text -----
FILES XFCN
-- part contents for card part 11
----- text -----
Files() is a XFCN to get a list of files in a HFS directory.
You can specify the path name to the files and the file type you want to retreive.
This is freeware!
Guy de Picciotto.
CIS: 73300,3637
GENIE: G.PICCIOTO
-- part contents for card part 23
----- text -----
Files() can take 2 parameters:
The first one is the path name to look for files. If it does not exist or is empty, the default directory is used (I hope so)
The second parameter is the file type. You can look for multiple types. If no second parameter is supplied, files will return all files.
In case of an error, the routine will beep and return an empty string.
Ex. get Files("mydisk:hypercard","STAK,TXT")
get Files("mydisk:hypercard")
get Files("","STAK")
get Files()
(CLick anywhere to return)