Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Deleting open Documents [was: ^!IfTrue ^$IsCtrlKeyDown$]

Expand Messages
  • melchior prisi
    Hi, ... Here is another way do delete (all or some) open Documents: ;----- CLIP ----- H= DESTROY ^!sethintinfo works ^!clearvariables ^!set
    Message 1 of 1 , Feb 1 1:31 PM
    • 0 Attachment
      Hi,

      Jody wrote:
      > ^!RecycleFile ^**
      > ^!RecycleFile ^##
      > ^!Close Discard
      > ^!IfTrue ^$IsCtrlKeyDown$ Loop

      Here is another way do delete (all or some) open Documents:

      ;----- CLIP -----
      H="DESTROY"
      ^!sethintinfo works
      ^!clearvariables
      ^!set %ct%=^$getdoccount$
      :loop
      ^!set %pf%=^$getdocname$
      ^!set %nf%=^$getname(^$getdocname$)$
      ^!append %docs%=^%nf%^=^%pf%|
      ^!append %adocs%=^%nf%
      ^!dec %ct%
      ^!if ^%ct% = 0 endloop
      ^!keyboard ctrl+tab
      ^!goto loop
      :endloop
      ^!setarray %ddocs%=^?{(T=A;H=25)DESTROY DOC==DESTROY ALL|^%docs%}
      ^!set %dc%=^%ddocs0%
      ^!ifdiff "^$StrCount("DESTROY ALL";"^%ddocs%";n;n)$" "0" dall
      :zoop
      ^!destroydoc ^%ddocs^%dc%%
      ^!dec %dc%
      ^!if ^%dc% < 1 endzoop
      ^!goto zoop
      :endzoop
      ^!goto exit
      :dall
      ^!continue ¿ REALLY DESTROY ALL OPEN DOCs ?
      ^!set %ddocs%=^%adocs%
      ^!set %dc%=^$getdoccount$
      ^!goto zoop
      ;----- /CLIP -----


      Regards,

      Melchior
    Your message has been successfully submitted and would be delivered to recipients shortly.