> It works, tho FindFirst() is picky, and I had to add prep and post
> stuff in the first and third lines, when all I really wanted was
> the second, to see if any files exist there. I don't want to
> actually do anything with string s, just see if there is one.
I can understand that... What we chose to do was make the DOS FindFirst
function available in order to allow the needed flexibility that has
been requested by numerous users.
However, I don't see where you need to do all of the setup that you are
currently doing... Really, the only reason for all of the things that
you are doing is to display a message. You should be able to simplify
your macro to:
public proc PruneAutoSave()
string dta[80]=''
SetDTA(dta)
if FindFirst(GetEnvStr("AS")+"\*.*")
Dos("@select/haoe del/q (%AS\*.*)^@0d wky^@1d wkg",_dont_prompt_)
UpdateDisplay(_statusline_refresh_)
else Message(" AutoSave directory empty.") endif
end PruneAutoSave
And, if you used PickFile(), you could internalize the whole thing as a
macro so you don't have to shell to 4DOS. (Although this may be a bit
more involved than you would like...) If you're interested in looking
into this a bit more, look at the supplied EDITFILE.S in the macro
subdirectory. In particular the mPickFile() (and related procs) work
with the PickFile() handling in TSE.
GDB> proc SetVidBorder(integer b)
> I don't profess to understand this, but it does seem to work,
Unfortunately, this was the only way I could think of handling this
situation. DOS doesn't make it easy to set the border attribute unless
you go down to low level code.
> me. It's David Marcus's PickList one of May 1993, and I've
> copied the sample setup almost word-for-word, and it doesn't
> work right.
Yikes! That's really old code -- written for the 1.0 "Pre-Release" of
TSE.
> Nothing ever inserts any text, tho if I escape from the (oddly
> small and offcentered) window, I do get the no-entry message.
> Where'm I going wrong?
Honestly, I don't know... Lots of things changed between the
1.0 "Pre-Release" and 2.0, so I wouldn't have even tried taking this
macro to 2.0 or 2.5.
I think you'll need to as David Marcus if he's updated PickList to
working with 2.5.
George J. De Bruin
SemWare Technical Support
------------------------------------------------------------------------------
SemWare Corporation Phone: (770) 641-9002 FAX: (770) 640-6213
WEB: http://www.semware.com FTP: ftp.semware.com
george.de.bruin@semware.com
------------------------------------------------------------------------------
---
þ TSEmr 1.0 #10000 þ The SemWare Editor Pro. 2.5 & TSE Jr 4.0 DOS, Mem-Res,
OS/2
--- FidoPCB v1.4 [ff151/a]
---------------
* Origin: SemWare Support BBS * 404-641-8968 * (1:133/314)
|