for i = 0 to 9999
number = replace(format(i, 4), " ", "0")
sendstr(0, number)
クリップボードに文字列が入っているので処理する
next

こんな感じではいかんの?