[futurebasic] Re: QuickTime Get Files dialog...

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1997 : Group Archive : Group : All Groups

From: John Morrison <jsmorr@...>
Date: Tue, 18 Nov 1997 15:15:10 -0500
Try this...

% _acount,0

CLEAR LOCAL MODE
LOCAL FN SFPGetFilePreview(where&,@prompt&, fileFilter&, numTypes%,
typeList&, dlgHook&, @sfReply&, dlgID%, filterProc&)
'--------------------------------------------------------
`
`   MOVE.L ^where&, -(sp)        ;point
`   MOVE.L ^prompt&, -(sp)       ;prompt string address
`   MOVE.L ^fileFilter&,-(sp)    ;fileFilter procPtr
`   MOVE.W ^numTypes%, -(sp)     ;number of file types
`   MOVE.L ^typeList&,-(sp)      ;array address of 4 longs (DIM
myTypes&(3),pass as @myTypes&(0))
`   MOVE.L ^dlgHook&, -(sp)      ;dialog hook routine ptr
`   MOVE.L ^sfReply&, -(sp)      ;address of 88 byte StandardFileReply
RECORD
`   MOVE.W ^dlgID, -(sp)         ;dialog ID
`   MOVE.L ^filterProc&, -(sp)   ;dialog filterproc
`   DC.W    $303C,$0042,$AAA3     ;trap number
`
END FN

CLEAR LOCAL
LOCAL FN openPreview
prompt$ = ""
FN SFPGetFilePreview(0,prompt$, 0, 0, 0, 0, sfReply&, dlgID%,
filterProc&)
LONG IF PEEK(@sfReply& + _sfGood)
WINDOW 1
fileName$;63 = (@sfReply& + 10)
volRefNum% = {@sfReply& + 6}
PRINT volRefNum%
PRINT fileName$
XELSE
volRefNum = 0
dirID& = 0
END IF

END FN

FN openPreview

DO
UNTIL FN BUTTON
SYSTEM


It will even preview sounds, QT's etc.


John M.