///////// 誕生日入力テンプレート(by こーき氏) //--------------------------------------- OnInputBirthday { userBD = "" inputBD = reference[0] CVSTR(inputBD) "\![raise,OnBdArrangement]" } OnBdArrangement { if SUBSTR(inputBD, 0, 1) == "0"{userBD = userBD + "0";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "1"{userBD = userBD + "1";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "2"{userBD = userBD + "2";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "3"{userBD = userBD + "3";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "4"{userBD = userBD + "4";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "5"{userBD = userBD + "5";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "6"{userBD = userBD + "6";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "7"{userBD = userBD + "7";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "8"{userBD = userBD + "8";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "9"{userBD = userBD + "9";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "0"{userBD = userBD + "0";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "1"{userBD = userBD + "1";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "2"{userBD = userBD + "2";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "3"{userBD = userBD + "3";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "4"{userBD = userBD + "4";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "5"{userBD = userBD + "5";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "6"{userBD = userBD + "6";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "7"{userBD = userBD + "7";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "8"{userBD = userBD + "8";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "9"{userBD = userBD + "9";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "/" || SUBSTR(inputBD, 0, 1) == "-" || SUBSTR(inputBD, 0, 1) == "," || SUBSTR(inputBD, 0, 1) == "." || SUBSTR(inputBD, 0, 1) == "-"{userBD = userBD + ",";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "年" || SUBSTR(inputBD, 0, 1) == "月" || SUBSTR(inputBD, 0, 1) == "・"{userBD = userBD + ",";inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 2) == "ねん" || SUBSTR(inputBD, 0, 2) == "がつ"{userBD = userBD + ",";inputBD = ERASE(inputBD, 0, 2)} elseif SUBSTR(inputBD, 0, 1) == "日"{inputBD = ERASE(inputBD, 0, 1)} elseif SUBSTR(inputBD, 0, 1) == "にち"{inputBD = ERASE(inputBD, 0, 2)} else{inputBD = ERASE(inputBD, 0, 1)} -- if inputBD != "" { OnBdArrangement } else { if ARRAYSIZE(userBD) == 1 { userBD = INSERT(userBD, 4, ",") userBD = INSERT(userBD, 7, ",") } elseif ARRAYSIZE(userBD) != 3 { "\s[0]おかしな数字、入れてませんか?\e" } } -- if TOINT(userBD[2]) >= 32 || TOINT(userBD[1]) >= 13 { "\s[0]%TOINT(userBD[0])年%TOINT(userBD[1])月%TOINT(userBD[2])日?\n\s[0]そんな日付、ないですよ。\e" } elseif TOINT(userBD[2]) >= 31 { if TOINT(userBD[1]) == 2 || TOINT(userBD[1]) == 4 || TOINT(userBD[1]) == 6 || TOINT(userBD[1]) == 9 || TOINT(userBD[1]) == 11 { "\s[0]%TOINT(userBD[0])年%TOINT(userBD[1])月%TOINT(userBD[2])日?\n\s[0]そんな日付、ないですよ。\e" } } elseif TOINT(userBD[2]) >= 30 { if TOINT(userBD[1]) == 2 { "\s[0]%TOINT(userBD[0])年%TOINT(userBD[1])月%TOINT(userBD[2])日?\n\s[0]そんな日付、ないですよ。\e" } } elseif TOINT(userBD[0]) > year { "\s[0]%TOINT(userBD[0])年%TOINT(userBD[1])月%TOINT(userBD[2])日?\n\s[0]その日はまだ、来てないです。\e" } elseif TOINT(userBD[0]) == year { if TOINT(userBD[1]) > month { "\s[0]%TOINT(userBD[0])年%TOINT(userBD[1])月%TOINT(userBD[2])日?\n\s[0]その日はまだ、来てないです。\e" } elseif TOINT(userBD[1]) == month { if TOINT(userBD[2]) > day { "%TOINT(userBD[0])年%TOINT(userBD[1])月%TOINT(userBD[2])日?\n\s[0]その日はまだ、来ていないです。\e" } } } -- "\0\s[6]%TOINT(userBD[0])年%TOINT(userBD[1])月%TOINT(userBD[2])日ですね。\n\w9…\w5…\w5\s[5]はい、覚えました。\e" }