Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Match comments
#5
@kevin thanks a lot
The following comments are not deleted
Line 23
Line 35
Line 51 58

In addition, how to merge multiple blank lines into one blank line
For example:
Line 36-39    
Line 44-45    
Line 47-49    

Macro Macro3
Code:
Copy      Help
out
_s.getsel
str s ss
int i
ARRAY(str) result
if _s.len
,findrx(_s "goto(\s.+)" 0 8 s 1); s.rtrim()
,foreach ss _s
,,if(StrCompareEx(ss s 1)<>0)
,,,ss.replacerx("^\040.+$|\040\;\;.+" "")
,,if ss.len
,,,result[]=ss
,mes result
else
,mes "nothing is selected"
#ret
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,QmRegisterDropTarget(id(3 hDlg) hDlg 0)
,__Font-- f.Create("Courier New" 8 0) ;;comment
,;__Font-- f.Create("Consolas" 8 0) ;;comment
,f.SetDialogFont(hDlg "3")
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_QM_DRAGDROP
,QMDRAGDROPINFO& di=+lParam
,sel wParam
,,case 3 ;;drop
,,str s
,,if(!di.GetText(s 1)) s=di.files
,,s.setsel(0 di.hwndTarget)
,,ret DT_Ret(hDlg 1)
,,;ret DT_Ret(hDlg 1) ;;comment
,,
,,


ret
;messages2
sel wParam
,case IDOK
,
,
,case IDCANCEL
,
,
,
ret 1

;sel wParam
,;case IDOK
,;int hcb3=id(3 hDlg)
,;int cp=SendMessage(h SCI.SCI_GETCURRENTPOS 0 0) ;;currentpos: begin of the line
,;out cp
,;case IDCANCEL
;ret 1


Messages In This Thread
Match comments - by macman - 01-26-2021, 03:25 AM
RE: Match comments - by redbull2k - 01-26-2021, 12:46 PM
RE: Match comments - by macman - 01-26-2021, 11:41 PM
RE: Match comments - by Kevin - 01-26-2021, 11:54 PM
RE: Match comments - by macman - 01-27-2021, 01:44 AM
RE: Match comments - by Kevin - 01-27-2021, 02:16 AM
RE: Match comments - by macman - 01-27-2021, 03:03 AM
RE: Match comments - by macman - 01-29-2021, 12:50 AM
RE: Match comments - by Kevin - 01-29-2021, 04:26 AM
RE: Match comments - by macman - 01-29-2021, 05:44 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)