Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Match comments
#3
@redbull2k

Thanks for your help
It doesn't work in the actual test

In the following code, I use the function aa.getsel, select the target code [Macro comment test] and test it

Macro comment test
Code:
Copy      Help
;lable1
run "notepad" ;;comment
;run "notepad" ;;comment2
_i+1
if _i=3
,ret
goto lable1
;coment3

Macro redbull2k_code
Trigger Aq     Help - how to add the trigger to the macro
Code:
Copy      Help
str aa.getsel
ARRAY(str) result
str line
foreach line aa
,str pattern= ";\D*."
,line.replacerx(pattern "")
,if(line.len)
,,result[]=line

str answer= result
answer.replacerx("$[]" "")
mes answer


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: 3 Guest(s)