Close all Notepad windows

Share your macros, knowledge, solutions, services, ...
Post Reply
Petr
Posts: 106
Joined: Tue Oct 18, 2016 1:12 pm

Close all Notepad windows

Post by Petr » Wed Nov 23, 2016 5:48 pm

This sample macro closes all Notepad windows.

Code: Select all

<#> Start of the macro
<cmds>

<#> Do Not Display Errors during macro execution  
<me_error_nodisplay>

<#> Name of the point to jump to  
<label>("CloseNext")

<#> Try to close Notepad window  
<winclose>("[|Notepad|#164|#18]",0)

<#> If success   
<if_str>("_vErr==NO")
   <#> Try to close next Notepad window  
   <goto>("CloseNext")
<else>
   <#> No Notepad window closed, clear error messages  
   <me_error_clear>
<endif>

<#> Enable showing error messages  
<me_error_display>

<#> End of the macro

Post Reply