home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Basic / MAXONB32.DMS / in.adf / Beispiele_1.3 / Examples / asltest.bas < prev    next >
Encoding:
BASIC Source File  |  1994-04-14  |  755 b   |  29 lines

  1. '
  2. '    Simple Example of using the ASL File Requester
  3. '    Note that the names used are the new names introduced in V38
  4. '    not the tag names shown in the RKM manuals which are now obsolete
  5. '     This program will work with any version of the ASL library from
  6. '    V36 up.
  7. DEFINT a-z
  8. REM $include asl.bh
  9. LIBRARY OPEN "asl.library"
  10. CONST TAG_DONE&=0
  11. DIM frtags&(20)
  12. TAGLIST VARPTR(frtags&(0)),ASLFR_TitleText&,"HiSoft BASIC File Requester", _
  13.         ASLFR_InitialFile&,"", _
  14.         ASLFR_InitialDrawer&, CURDIR$, _
  15.         TAG_DONE&
  16.  
  17. fr&=AllocAslRequest&(ASL_FileRequest&,VARPTR(frtags&(0)))
  18. IF fr& THEN
  19.     IF AslRequest&(fr&,0) THEN
  20.         PRINT "file "+PEEK$(PEEKL(fr&+fr_File))
  21.         PRINT "dir "+PEEK$(PEEKL(fr&+fr_Drawer))
  22.     ELSE
  23.            PRINT "Canceled"
  24.     END IF
  25.     FreeASlRequest fr&
  26. END IF
  27.     
  28.             
  29.