home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
600-699
/
ff634.lha
/
APIG
/
apig33.lzh
/
aslfile3.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-02-05
|
2KB
|
82 lines
/* Example of using ASL Library FILE requester with tags */
/* */
x = addlib("apig.library",0,-30,0)
call set_apig_globals()
freq = ALLOCASLREQUEST(ASL_FILEREQUEST,null())
portname = "aslfile3_port"
p = openport(portname)
WaitForPort portname
wintitle = "ASL FILE Requester Example"
winidcmp = CLOSEWINDOW
winflags = WINDOWCLOSE+WINDOWDRAG+WINDOWSIZING+WINDOWDEPTH+GIMMEZEROZERO
win = openwindow(portname,0,0,640,200,2,4,winidcmp,winflags,wintitle,null(),0,0,0)
asltags = makeasltaglist() /* tags for the ASL Requester */
do forever /* present requester until canceled */
selectedfiles = ASLREQUEST(freq,asltags)
if selectedfiles = null() then
leave
say selectedfiles
end
call FREEASLREQUEST(freq)
call CLOSEWINDOW(win)
exit
makeasltaglist:
asltags = makepointer(freq,0,200,MEMF_CLEAR) /* freq owns this memory */
hailstring = makepointer(freq,0,80,MEMF_CLEAR)
call export(hailstring,"Select A File(s)... or CANCEL")
oktext = makepointer(freq,0,80,MEMF_CLEAR)
call export(oktext,"ALRIGHT")
canceltext = makepointer(freq,0,80,MEMF_CLEAR)
call export(canceltext,"NO WAY!")
initpattern = makepointer(freq,0,80,MEMF_CLEAR)
call export(initpattern,"#?.rexx")
initdir = makepointer(freq,0,80,MEMF_CLEAR)
call export(initdir,"ram:")
call SETTAGSLOT(asltags,0,ASL_HAIL,'p',hailstring)
call SETTAGSLOT(asltags,1,ASL_LEFTEDGE,'n',20)
call SETTAGSLOT(asltags,2,ASL_TOPEDGE,'n',20)
call SETTAGSLOT(asltags,3,ASL_WIDTH,'n',540)
call SETTAGSLOT(asltags,4,ASL_HEIGHT,'n',190)
call SETTAGSLOT(asltags,5,ASL_OKTEXT,'p',oktext)
call SETTAGSLOT(asltags,6,ASL_CANCELTEXT,'p',canceltext)
call SETTAGSLOT(asltags,7,ASL_PATTERN,'p',initpattern)
call SETTAGSLOT(asltags,8,ASL_DIR,'p',initdir)
/* aslfuncflags newidcmp, include pattern gadget, multiple file selection */
aslfuncflags = FILF_NEWIDCMP + FILF_PATGAD + FILF_MULTISELECT
call SETTAGSLOT(asltags,9,ASL_FUNCFLAGS,'n',aslfuncflags)
call SETTAGSLOT(asltags,10,ASL_WINDOW,'p',win)
call SETTAGSLOT(asltags,11,TAG_DONE,'n',0)
return asltags