var x = 0 - Editor.ExpandParameter("$x"); var y = 0 - Editor.ExpandParameter("$y"); Editor.SelectAll(); var s = Editor.GetSelectedString(0); Editor.CancelMode(); s = s.replace(/\?/g, "adurkdlxw09s"); var old = Editor.GetClipboard(0); Editor.SetClipboard(0, s); s = Editor.GetClipboardByFormat("CF_TEXT", 0, 1); Editor.SetClipboard(0, old); var pos = s.indexOf("?"); if( -1 != pos ){ var arr = []; var pos = 0; var start = 0; while( pos < s.length ){ var code = s.charCodeAt(pos); if( code == 0x0a || code == 0x0d ){ if( pos + 1 < s.length && code == 0x0d || s.charCodeAt(pos + 1) == 0x0a ){ pos++; } arr[arr.length] = s.substring(start, pos + 1); start = pos + 1; } pos++; } if( start < s.length ){ arr[arr.length] = s.substring(start); } var targety = 0; for(; targety < arr.length; targety++ ){ if( -1 != arr[targety].indexOf("?") ){ break; } } var findpos = arr[targety].indexOf("?"); var linereal = arr[targety].substr(0,findpos).replace(/adurkdlxw09s/g, "?"); Editor.MoveCursor(targety + 1, linereal.length + 1, 0); Editor.InfoMsg( "SJIS以外の文字が見つかりました\n" + (targety + 1) + "," + (linereal.length + 1) ); }else{ Editor.MoveCursor(y, x, 0); }