|   |  
 マクロはもちろん好きなように直して使っていただければいいし、copyright 
も何も無い扱いでというか、TATEさんが作ったマクロだということにして誰か他 
の人に教えてあげたり公開したりしていただいても何も問題無いです。 
 
 とりあえずこちらで簡単に直したみた所では以下のようなマクロになりました。 
簡単なテストしかしてないので、何かおかしい所があったらまたご指摘お願いし 
たいですけども。 
 
    #xStart = x; #yStart = y; 
    #readonly = readonly; 
    #browsemode = browsemode; 
    if( #browsemode ) { 
        browsemodeswitch; 
    } 
    gofiletop; 
    searchdown2 "[0-9]+/[0-9]+([日月火水木金土])", regular; 
    if( !result ) { 
        if( #browsemode ) { 
            browsemodeswitch; 
        } 
        moveto #xStart, #yStart; 
        endmacro; 
    } 
    if( #readonly ) { 
        readonlyswitch; 
    } 
Loop: 
    #x = x; #y = y; 
    beginsel; 
    golineend2; 
    tohankaku; 
    $text = gettext( #x, #y, x, y ); 
    undo; 
    moveto #x, #y; 
    if( #readonly ) { 
        readonlyswitch; 
    } 
    if( #browsemode ) { 
        browsemodeswitch; 
    } 
    loaddll "hmjre.dll"; 
    #n = dllfunc("FindRegular" 
                , "([0-9]+)/([0-9]+)\\(([日月火水木金土])\\)" 
                , $text, 0); 
    if( #n != 0 ) { 
        endmacro; 
    } 
    $month = leftstr($text, dllfunc("GetLastMatchTagLength",1)); 
    $day = midstr($text, dllfunc("GetLastMatchTagPosition",2) 
                    , dllfunc("GetLastMatchTagLength",2)); 
    $week = midstr($text, dllfunc("GetLastMatchTagPosition",3) 
                    , dllfunc("GetLastMatchTagLength",3)); 
    #month = val($month); 
    #day = val($day); 
 
    loaddll "tkinfo.dll"; 
    #yearNow = val( dllfuncstr("CurrentDate","YYYY" ) ); 
    #monthNow = val( dllfuncstr("CurrentDate","M" ) ); 
    if( #month < #monthNow ) { 
        #yearNow = #yearNow + 1; 
    } 
    $mon[1] = "Jan"; 
    $mon[2] = "Feb"; 
    $mon[3] = "Mar"; 
    $mon[4] = "Apr"; 
    $mon[5] = "May"; 
    $mon[6] = "Jun"; 
    $mon[7] = "Jul"; 
    $mon[8] = "Aug"; 
    $mon[9] = "Sep"; 
    $mon[10] = "Oct"; 
    $mon[11] = "Nov"; 
    $mon[12] = "Dec"; 
    $date = str(#day) + " " + $mon[#month] + " " + str(#yearNow) 
         + " 00:00:00 +0900"; 
    $week2 = dllfuncstr("FormatDate", $date, "W" ); 
    if( $week2 != $week ) { 
        message "曜日が違います。正しい曜日 = " + str(#month) + "/" +  
        str(#day) 
                 + "(" + $week2 + ")"; 
        #n = dllfunc("SetCancel", 1); 
        endmacro; 
 
    } 
 
    searchdown "[0-9]+/[0-9]+([日月火水木金土])", regular; 
    if( result ) { 
  goto Loop; 
 } 
 
			 | 
		  
	 |