본문 바로가기
Tips!? Tips!!

[source insight] 간단한 Comment Macro

by cafrisun 2009. 6. 2.
 

나중에 수정해 쓰겠다고 해놓고선 아직도 쓰고 있는 그지같은 코멘트 매크로..

macro myMacro()
{
 myBuffer = GetCurrentBuf()

 Input_text = Ask("Type the description :")

 today = GetSysTime(1)

 date = ""
 date = cat(date, today.Year)

 if (today.Month < 10)
  date = cat(date,"0")

 fdate = cat(fdate, today.Month)

 if (today.Day < 10)
  date = cat(date, "0")

 fdate = cat(date, today.Day)

 hWnd = GetCurrentWnd()
 LineFirst = GetWndSelLnFirst(hWnd)

 string = GetBufLine(myBuffer, LineFirst)

 DelBufLine(myBuffer, LineFirst)

 if (strlen(string) > 0)
  InsBufLine(myBuffer, LineFirst, "@string@ //@date@ HongGilDong - @Input_text@")
 else
  InsBufLine(myBuffer, LineFirst, "@string@//@date@ HongGilDong - @Input_text@")
}

반응형