Ignore:
Timestamp:
Dec 9, 2016, 10:06:20 AM (4 years ago)
Author:
Herwig Bauernfeind
Message:

GUITools: All changes that have built over time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/shared/smbtree.vrs

    r925 r990  
    55    say time()' _RefreshTree() started'
    66    FirstRun = 0
    7     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", "Refreshing network")
     7    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", " Refreshing network")
    88    ok = SysFileDelete(samba.!msg)
    99    parse var debuglevel .'='level
     
    5454    if errstat = "READY:" then do
    5555        if file2stem(samba.!error,"treeError.") > 1 then do
    56             ok = VRSet("DT_STATUSBAR","Caption", treeError.2)
     56            ok = VRSet("DT_STATUSBAR","Caption", " "||treeError.2)
    5757        end
    5858    end
     
    458458    if UserCred = '-N' then UserCred = ''
    459459
    460     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", "Ready.")
     460    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", " Ready.")
    461461    say time()' _AddSharesDisplay() loop end'
    462462return
     
    501501    address cmd 'detach 'samba.!smbtreeexe' 'BroadCast' -D 'UserCred' 'debuglevel' >'samba.!msg
    502502
    503     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Enumerating workgroups")
     503    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Enumerating workgroups")
    504504    do while stream(samba.!msg,'c','open read') <> "READY:"
    505505        ok = SysSleep(1)
     
    563563    address cmd 'detach 'samba.!nmblookupexe' 'machine' 'debuglevel' >'samba.!msg
    564564
    565     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Obtaining IP from "machine)
     565    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Obtaining IP from "machine)
    566566    do while stream(samba.!msg,'c','open read') <> "READY:"
    567567        ok = SysSleep(0.33)
     
    590590    address cmd 'detach 'samba.!nmblookupexe' -A 'machine' 'debuglevel' >'samba.!msg
    591591
    592     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Obtaining capabilities from "machine)
     592    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Obtaining capabilities from "machine)
    593593    do while stream(samba.!msg,'c','open read') <> "READY:"
    594594        ok = SysSleep(0.33)
     
    625625    address cmd 'detach 'samba.!nmblookupexe' -S 'machine' 'debuglevel' >'samba.!msg
    626626
    627     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Querying "machine" for roles")
     627    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Querying "machine" for roles")
    628628    do while stream(samba.!msg,'c','open read') <> "READY:"
    629629        ok = SysSleep(0.33)
     
    665665file2stem:
    666666    say time()' file2stem() started'
    667     msgfile = arg(1)
    668     msgstem = arg(2)
    669     delmsgfile = translate(arg(3))
     667    msgfile = arg(1) /* file to create stem of */
     668    msgstem = arg(2) /* name of the stem */
    670669    if right(msgstem,1) <> '.' then msgstem = msgstem'.'
     670    delmsgfile = translate(arg(3)) /* erase file after transfer */
     671    skipwords = strip(arg(4)||' creating lame tdb( ***') /* skip lines with these words */
     672    do J = 1 to words(skipwords)
     673        skip.J = translate(word(skipWords,J))
     674    end
     675    skip.0 = J
     676   
    671677    say '  file2stem("'msgfile'","'msgstem'")'
    672678    dyn = 'drop 'msgstem
    673679    interpret dyn
    674680    stemcount = 0
     681    skipped = 0
    675682    do while lines(msgfile) > 0
    676683        stemcount = stemcount + 1
    677684        inline = linein(msgfile)
    678         if pos('creating lame',inline) > 0 | pos('tdb(',inline) > 0 then do
    679             stemcount = stemcount - 1
    680             iterate
    681         end
    682         dyn = msgstem||stemcount' = inline'
    683         interpret dyn
     685        SkipIt = 0
     686        do J = 1 to skip.0
     687        if pos(skip.J,translate(inline)) > 0 then do
     688                skipit = 1
     689                stemcount = stemcount - 1
     690                skipped = skipped + 1
     691                leave
     692            end
     693        end
     694        if \SkipIt then do
     695            dyn = msgstem||stemcount' = inline'
     696            interpret dyn
     697        end
    684698    end
    685699    dyn = msgstem||"0 = "stemcount
     
    689703   
    690704    drop msgfile msgstem
    691     say time()' file2stem() ['stemcount'] done'   
     705    say time()' file2stem() ['stemcount' added, 'skipped' skipped] done'   
    692706return stemcount
Note: See TracChangeset for help on using the changeset viewer.