Changeset 1030 for trunk/guitools/shared/smbtree.vrs
- Timestamp:
- Jun 7, 2017, 5:17:03 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/guitools/shared/smbtree.vrs
r1023 r1030 23 23 say time()' _RefreshTree() started' 24 24 FirstRun = 0 25 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", " Refreshing network")25 call _StatusBarWrapper "Refreshing network" 26 26 ok = SysFileDelete(samba.!msg) 27 27 parse var debuglevel .'='level … … 72 72 if errstat = "READY:" then do 73 73 if file2stem(samba.!error,"treeError.") > 1 then do 74 ok = VRSet("DT_STATUSBAR","Caption", " "||treeError.2)74 call _StatusBarWrapper treeError.2 75 75 end 76 76 end … … 78 78 stat = stream(samba.!serverlist,'c','open read') 79 79 if stat <> "READY:" then do 80 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')80 call _StatusBarWrapper '+.' 81 81 return 82 82 end … … 280 280 do I = 1 to smbmachine.0 281 281 call charout , ' Going for "'smbmachine.I'", got ' 282 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')282 call _StatusBarWrapper '+.' 283 283 stat = stream(smbmachine.I,'c','open read') 284 284 say ' Try to open "'smbmachine.I'" for reading: "'stat'"' … … 476 476 if UserCred = '-N' then UserCred = '' 477 477 478 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", " Ready.")478 call _StatusBarWrapper "Ready." 479 479 say time()' _AddSharesDisplay() loop end' 480 480 return … … 519 519 address cmd 'detach 'samba.!smbtreeexe' 'BroadCast' -D 'UserCred' 'debuglevel' >'samba.!msg 520 520 521 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Enumerating workgroups")521 call _StatusBarWrapper "Enumerating workgroups" 522 522 do while stream(samba.!msg,'c','open read') <> "READY:" 523 523 ok = SysSleep(1) 524 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')524 call _StatusBarWrapper '+.' 525 525 end 526 526 call VRSet VRWindow(), 'Pointer', '<default>' … … 581 581 address cmd 'detach 'samba.!nmblookupexe' 'machine' 'debuglevel' >'samba.!msg 582 582 583 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Obtaining IP from "machine)583 call _StatusBarWrapper "Obtaining IP from "machine 584 584 do while stream(samba.!msg,'c','open read') <> "READY:" 585 585 ok = SysSleep(0.33) 586 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')586 call _StatusBarWrapper '+.' 587 587 end 588 588 call VRSet VRWindow(), 'Pointer', '<default>' … … 608 608 address cmd 'detach 'samba.!nmblookupexe' -A 'machine' 'debuglevel' >'samba.!msg 609 609 610 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Obtaining capabilities from "machine)610 call _StatusBarWrapper "Obtaining capabilities from "machine 611 611 do while stream(samba.!msg,'c','open read') <> "READY:" 612 612 ok = SysSleep(0.33) 613 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')613 call _StatusBarWrapper '+.' 614 614 end 615 615 call VRSet VRWindow(), 'Pointer', '<default>' … … 643 643 address cmd 'detach 'samba.!nmblookupexe' -S 'machine' 'debuglevel' >'samba.!msg 644 644 645 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Querying "machine" for roles")645 call _StatusBarWrapper "Querying "machine" for roles" 646 646 do while stream(samba.!msg,'c','open read') <> "READY:" 647 647 ok = SysSleep(0.33) 648 if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')648 call _StatusBarWrapper '+.' 649 649 end 650 650 call VRSet VRWindow(), 'Pointer', '<default>' … … 723 723 say time()' file2stem() ['stemcount' added, 'skipped' skipped] done' 724 724 return stemcount 725 726 _StatusBarWrapper: 727 StatusWText = arg(1) 728 if VRIsValidObject("DT_STATUSBAR") then do 729 if left(StatusWText,1) = "+" then do 730 ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||substr(StatusWText,2)) 731 end 732 else do 733 ok = VRSet("DT_STATUSBAR","Caption", " "||StatusWText) 734 735 if VRIsValidObject("TM_STATUSBAR") then do 736 ok = VRSet("TM_STATUSBAR","DELAY", 4000) 737 ok = VRSet("TM_STATUSBAR","Enabled", 1) 738 trStWT = translate(StatusWText) 739 select 740 when pos("LOGIN SUCCESSFUL", trStWT) > 0 then ok = VRSet("DT_STATUSBAR","BACKCOLOR","GREEN") 741 when pos("NT_STATUS_OK", trStWT) > 0 then ok = VRSet("DT_STATUSBAR","BACKCOLOR","GREEN") 742 when pos("NT_STATUS_ACCESS_DENIED", trStWT) > 0 then ok = VRSet("DT_STATUSBAR","BACKCOLOR","YELLOW") 743 when pos("ERROR", trStWT) > 0 then ok = VRSet("DT_STATUSBAR","BACKCOLOR","RED") 744 when pos("NT_STATUS_", trStWT) > 0 then ok = VRSet("DT_STATUSBAR","BACKCOLOR","RED") 745 otherwise ok = VRSet("TM_STATUSBAR","Enabled", 0) 746 end 747 end 748 end 749 end 750 return 751 752 _StatusBarReset: 753 ok = VRSet("DT_STATUSBAR","BACKCOLOR","<default>") 754 ok = VRSet("TM_STATUSBAR","Enabled", 0) 755 return
Note:
See TracChangeset
for help on using the changeset viewer.