GetFile()
6 messages in this thread
Ok, here I am again asking questions you never thought there was a need to
ask. :^)
I wrote a ARexx script that will launch from the PAR software and prompt
the user with a File requester using the rexxarplib.library call of
GetFile() but it keeps opening the file requester on the WB screen yet I
assigned it the PAR designation of DDR. Here is what it looks like:
Call getfile(150,100,"DDR:","","Choose PAR Anim","Cancel","DDR")
Am I doing something wrong? The script works but I would like to be able
to do everything from the PAR window instead of jumping back and forth.
Thanks in advance…
<<< Tony D. Tracer >>>
(Any render time >0 needs acceleration.)
Anthony:
Your syntax for the GetFile() call is a little off. That "Cancel" is
where the pubscreen name should be. This should fix it:
result = getfile(150,100,"DDR:",,"Choose PAR Anim","DDR")
I don't know what you intended the "Cancel" for. Also notice that you
don't have to use the null string ("") for the filename argument, just
putting the comma will suffice.
Stay cool B-)
-Larry
Thanks Larry. Since I don't have any ARexx documentation other than the
ARexx manual, I don't have ANY info on the ARexx libraries. What i have
done has been by looking at other ARexx scripts.
Thanks for clearing me up.
Is there some ARexx documentation somewhere?
<<< Tony D. Tracer >>>
(Any render time >0 needs acceleration.)
Tony:
Rexxarplib.library isn't a standard part of ARexx. It's what they call an
"external function library". Arexx was designed to be extensible by
allowing calls to ".library" files which have been written to handle ARexx
calls (and not all are).
Rexxarplib was written by Willy Langeveld, and *should* be in the
libraries either here or in AmigaUser. A new version, 3.3, just came out.
Full documentation for rexxarplib will be in the archive.
Stay cool B-)
-Larry
<<< Tony D. Tracer >>>,
I have goofed around with ARexx enough that I am pretty sure I can
easily get you into the same state of confusion I am over this one 🙂
Since I suffer from a severe case of SuperInfoHiWay DataStream Lag, you
can completely ignore these ramblings if someone else has already provided
you with the guiding light! Please note that these ramblings are based on
WB 2.04+ with rexxarplib.library version 3.0 and probably don't apply to
earlier versions.
If I understand your intentions correctly, you want the file requester
to open up on the PAR screen instead of the WB screen. The docs for
rexxarplib V3.0 reveal the fields of the GetFile() function to be:
result = GetFile(x, y, pathname, filename, hailstring, publicscreen,
options, stemname, width, height, pattern)
In your sample code then, "Cancel" would be the publicscreen name you are
trying to open the file requester on! Somehow I do not think the PAR uses
"Cancel" as a publicscreen name but I could be wrong! Since "Cancel"
probably doesn't exist, the requester opens on the default WB screen. I
recommend you determine what, if any, publicscreen name the PAR uses.
Unfortunately, I do not know of an easy way to determine this with ARexx
itself, but there are several utilites out in the Amiga Universe that will
let you control WB2.04+ publicscreens including revealing their names
(check out SelectScreen on the FredFish collections as a good example!).
Who knows, maybe the PAR documentation has it buried away someplace for
you to discover.
I noticed you are using the Call function with the GetFile() function.
This means you need to specify a stemname so that you can extract the path
and file name that was selected in the requester. Perhaps this is what
you wanted to do with "Cancel" in your sample code, in which case you need
to remember field order is important in the GetFile() function and you
must use commas to maintain it! For example, if you want to use PATHFILE
as the stemname and you wanted to use a pattern matching algorithm in the
requester to show only files that end in ".anim" then your GetFile()
function would look something like:
getfile(150,100,"DDR:","","Choose PAR Anim",<PSN>,,PATHFILE,,,"#?.anim")
where <PSN> is Public Screen Name
I am not sure what you are trying to accomplish but I cannot help wonder
if you could not simplify things by using the path and file name returned
directly from the GetFile() function. This would only work if you
expected a single file name, but would look something like this:
PathAndFile = getfile(15,10,"DDR:",,"Choose PAR Anim",<PSN>,,,,,"#?.anim")
Of course if you are expecting multiple file names to be selected from the
requester then you must use the stemname field and do not forget to put
MULTISELECT in the options field!
Now that we're completely confused. I suppose your are going to tell me
that you are using WB1.3 <g>
Ed, thanks for the thorough explanation. After getting the info from you
guys I was able to do what I wanted.
>I am not sure what you are trying to accomplish but I cannot help wonder
>if you could not simplify things by using the path and file name returned
>directly from the GetFile() function.
I tried what you suggested but if I didn't select a file it did some wierd
things (I can't remember right now) so I used a way that worked.
What I did was write a ARexx script for the PAR board to export a Anim
frame by frame so LW can use it as a Image Sequence and then save it back
out to another PAR Anim. With the File Requesters the user can select the
Anim to export, Path to export to, LW scene to Render, and the New PAR
anim to save to.
No, I am using WB2.1 in a A3000.
Thanks guys, I now have it working how I want it to.
<<< Tony D. Tracer >>>
(Any render time >0 needs acceleration.)