/* * 検索対象文字 */ function foundZKey(str) { return pos(str, "ビ") != 0; } /* * 検索対象外文字列 */ function foundNkey(str) { return pos(str, "ビル") != 0 || pos(str, "ビジネス") != 0; } hKey = "*"; B = Bottom; for(; y <= B; y++){ if(pos([2, y], hKey) == 0) { if (foundZKey([x, y]) && !foundNkey([x, y])) { moveto(x, y); y = B + 2; } } } if (y == B + 1) { moveto(x, B); }