おまけ:numbers の生成
スクリプトエディタ版
app = Application.currentApplication(); app.includeStandardAdditions =true; function numbers(x){ return ( "0000" + Math.floor( Math.random()*Math.pow(10,x) ) ).substr(-x) } app.displayAlert( numbers( 3 ) + String.fromCharCode(13) + numbers( 4 ) );
Automator版
function run() { function numbers(x){ return ( "0000" + Math.floor( Math.random()*Math.pow(10,x) ) ).substr(-x) } return numbers(3) + String.fromCharCode(13) + numbers(4); }
結果は省略