#ARexx TTX script Gurus
11 messages in this thread
Bill,
I've been using this ARexx script I dl'd from the AForums to replace the
TurboText file requester with the asl.library version. It has been working
fine until I upgraded from 2.1 to WB3.1, and now I get a software error
each time I use it. I've switched back to the TTX_Standard.dfn default
settings in TTX but would like to find and fix the problem with this ARexx
.ttx file. The author requests that you leave him e-mail to identify
problems but failed to include his PPN, nor can I find him in the
membership directory. I also cannot locate the original archive in my
library of downloads or here in AForums libraries. Actually, there are
about eight Dan Barbers listed in CIS membership but none that I can find
in the Amiga Forums, but before I send blanket CMail to all of them I
thought I'd direct my query here, specifically toward you.
I was hoping that you (or someone else who sees this and is versed in
ARexx, maybe even Dan himself) might be able to quickly see the change
needed to correct this script.
Any suggestions are greatly appreciated.
/*******************************************************************
** name: mfr.ttx
** date: 03 Jan 1993
** time: 21:23:02
** purpose: Allow user of TTX to utilize standard file requesters
** version: 1.0
** author: Dan Barber
** limitations: If you select to open a doc and you have changed
** current doc, it will prompt you for the new file
** first, then TTX will take over and tell you DO YOU
** REALLY WANT TO DO THIS? Still accepts that but it
** is a little annoying. Could be fixed using TTX
** GetFileInfo information.
** note: I am not responsible for any damages whatsoever
** this rexx may cause. Please leave me compuserve
** mail to itentify any problems/suggestions.
******************************************************************/
arg option_ind pattern_str path_str
options results
lib = 'rexxarplib.library'
if ~show('L',lib) then do
call addlib(lib,0,-30,0)
if ~RESULT then exit(1)
end
/***********************************/
/* Get path info to tell requester */
/***********************************/
if path_str = "" then do
GetCurrentDir
path_str = RESULT
end
/*********************************************************/
/* Get file name in current doc for default in requester */
/*********************************************************/
GetFileInfo
parse var RESULT num_lines changed '"' default_file_name '"'
/**************************/
/* setup requester prompt */
/**************************/
if option_ind = "S" then prompt_str = "Save file as"
else prompt_str = "Select file to load"
/*****************/
/* ARP requester */
/*****************/
file =
GetFile(10,10,path_str,default_file_name,prompt_str,,,,,,pattern_str)
/******************************/
/* Get path name and tell TTX */
/******************************/
path_str = get_path_name(file)
SetCurrentDir path_str
if file ~= "" then do
select
when option_ind = "N" then OpenDoc NAME file
when option_ind = "S" then SaveFileAs NAME file
otherwise OpenFile file
end
end
exit(0)
/**********************************************************/
/* a little rexx function to parse full path from GetFile */
/**********************************************************/
get_path_name:
arg full_file_name
i = lastpos("/",full_file_name)
path_str = substr(full_file_name,1,i)
return path_str
TIA
Christopher
Chris,
As there weren't any changes in ARexx itself going to AmigaDOS 3.1, my
assumption would be that the problem is in the requestor code. The ARexx
program looks straightforward, but you could try putting a TRACE R instruction
near the beginning and then watch the trace output to see where the problems
occur.
-Bill Hawes
Chris,
First, try increasing the stacksize in the Turbotext program. 3.1
seems to use more stack and some programs crash. I've had some strange goings
on too, until I increased the program stacksize.
Second, if you have an Emplant installed be sure to get the new
RsrvMemV program. RsrvMemIV causes all sorts of problems with Turbotext and
Edge under 3.1.
Steven,
I did increase TTX's stack size. No good. I did fix my shell windows title
problem with Bill's suggestion with the script that calls
DHOpts CON:0/11/640/200/DisplayHandler!/CLOSE STACK 5000
so that is working fine, now I need to fix this .ttx script problem.
I'm going to disable Khalid's FR_Bypass program that allows me to replace
asl.library with kd_freq.library. Honestly, I hope that isn't the problem
because I much prefer Khalid's file requester over all the others
available, 'specially ASL.
Christopher
Chris,
You didn't mention if you have an Emplant. If so, be sure to get
RsrvMemV to replace RsrvMemIV which does cause TTX to fail.
Chris –
I once tried the "patch" that enabled ASL (and hence Aldoseri's) file req.
in TurboText, but it kept crashing, so I reverted to the original
TTX_Startup.dfn
NOW my problem is that whenever I have mounted the "foreign" devices on my
2-machine ArcNet, then the Aldoseri requester crashes on first opening,
not merely locking the system, but fully crashing it (black screen, red
banner).
**SIGH**
jsaklad@welchlink.welch.jhu.edu . . JimDoc, on AutoPilot
Chris,
I've been using an ARexx script to launch decompression programs on
downloads which also uses RexxArpLib and the GetFile function therein.
Since upgrading to 3.1, this program frequently, but not always, crashes
when entering or leaving the file requester. I don't know for sure, but
there may be a problem this function in RexxArpLib under 3.1.
Darron
Are you using one of the utilities that patches calls to the ASL requesters?
>>Are you using one of the utilities that patches calls to the ASL
>>requesters?
Robert,
I don't know about Darron but I'm using Khalid's File Requester and that
uses FR_Bypass. Hmmm, guess to test it I should disable it and see if I
still get the software error.
I guess I'd better turn TRACE ON also. So, is that all I do to the ARexx
script is add that command line?
Christopher
Chris,
To turn on tracing in ARexx, try putting a
TRACE R
instruction near the beginning of the program. (Anywhere after the opening
comment is fine.) This will display the results of all expressions as the
program is executed, and you'll be able to determine where the trouble begins.
After you've narrowed down the problem, you can move the TRACE instruction to
the specific area oof a program you're debugging.
-Bill
No — I'm not using a patch for the ASL requesters. There's only so much
complexity I can stand for the sake of a little added convenience or
aesthetic appeal 😉