TIP: Click on subject to list as thread! ANSI
echo: qedit
to: GEORGE DE BRUIN
from: JORJ STRUMOLO
date: 1995-10-25 18:38:00
subject: TSE: more internalizing

GDB> Try the FindFirst() / FindNext() commands
 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.
public proc PruneAutoSave()
    string dta[80]='',s[80] SetDTA(dta)
    if FindFirst(GetEnvStr("AS")+"\*.*")
    s=DecodeDTA(dta) Message(s)
    Dos("@select/haoe del/q (%AS\*.*)^@0d wky^@1d wkg",_dont_prompt_)
    UpdateDisplay(_statusline_refresh_)
    else Message(" AutoSave directory empty.") endif
end PruneAutoSave
GDB> proc SetVidBorder(integer b)
   >     register r
   >     r.bx = b shl 8    // attr in bh
   >     r.ax = 1001h      // for Int 10h function 01h call
   >     intr(10h, r)      // set the border
   > end
 I don't profess to understand this, but it does seem to work,
 which means that two of the things I had to shell to DOS to do
 have been internalized.  That really only leaves one more thing,
 which should be easy to do in TSE, with a macro already done for
 it.  Problem is, I've never gotten the tagline macro to work for
 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.
proc sample_picklist_use()
     string tag[254] = ''        // max length for selected text
     SetGlobalStr('picklist_fn',      'your_picklist_file_name')
     SetGlobalStr('picklist_title',   'your_picklist_title')
     SetGlobalInt('picklist_maxwidth', Length(tag))
     ...
     ExecMacro('picklist')
     if GetGlobalInt('picklist_return')
          tag=GetGlobalStr('picklist_result')
          ....
     else
          Warn('No entry selected!')
     endif
     ....
end
public proc PickTag()
     string tag[100] = ''
     SetGlobalStr('picklist_fn','C:\SR\Wave\Data\Omni.tag')
     SetGlobalStr('picklist_title','Select Tag')
     SetGlobalInt('picklist_maxwidth',Length(tag))
     ExecMacro('PickList')
     if GetGlobalInt('picklist_return')
     tag=GetGlobalStr('picklist_result')
     InsertText(tag)                              // varies
     else Message(' No entry selected.') endif
end
    For the line that varies, I've also tried
     InsertText(GetGlobalStr("picklist_result"))
     InsertText(GetGlobalStr("picklist_return"))
     InsertText(GetGlobalStr(tag))
 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?
 -- SPEED 2.00 #1019: For the Snark WAS a Boojum, you see. * Carroll
--- QScan/PCB v1.17b / 01-0175
---------------
* Origin: Eagle's Nest Comm., Inc Prov, RI 401-621-4600 (1:323/150)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.