========applescript===========
tell application \"Safari\"
tell document \"在版ポジG 見える進ちょく\"
set fm_tuki to do JavaScript \"document.getElementById(\'id01\').value;\"
set fm_keikaku to do JavaScript \"document.getElementById(\'id02\').value;\"
set fm_1c to do JavaScript \"document.getElementById(\'id03\').value;\"
set fm_2c to do JavaScript \"document.getElementById(\'id04\').value;\"
set fm_kanryo to do JavaScript \"document.getElementById(\'id05\').value;\"
set fm_zaiko to do JavaScript \"document.getElementById(\'id06\').value;\"
set fm_yotei to do JavaScript \"document.getElementById(\'id07\').value;\"
end tell
end tell
set jisseki_tuki to fm_tuki --\"6\" --月
set seisankeikaku to fm_keikaku --\"4500\" --生産計画
set kanryou_ph to fm_kanryo --\"1200\" --完了ph
set kanryou_ph_graf to (kanryou_ph div 8) as string --完了phグラフ
set ato_ph to seisankeikaku - kanryou_ph
set ato_ph_graf to (ato_ph div 8) as string --あとphグラフ
set keikaku_1c to fm_1c --\"3000\" --1c
set keikaku_4c to fm_2c --\"1500\" --2c
set tasseiritu_tassei to ((round (kanryou_ph / ato_ph) * 100)) as string --(円グラフ達成)
set tasseiritu_nokori to (100 - tasseiritu_tassei) as string --(円グラフ未達成)
set zaiko to fm_zaiko -- \"1200\" --在庫
set nyuukouyotei to fm_yotei --\"120\" --予定
set kousin_jikoku to do shell script \"date \'+%Y.%m.%d %R\'\" --\"2017.6.7 13:50\" --更新日
set html_soce to \"
<!DOCTYPE html>
<html lang=\\\"ja\\\">
<head>
<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\">
<title> 在版ポジG 見える進ちょく</title>
<style type=\\\"text/css\\\">
div top_title{
background-color: #008CF8;
width: 1000px;
height: 30px;
font-size: 20px;
color: #ffffff;
font-family: sans-serif;
}
h1 {
font-size: 150%;
}
body{
font-family: sans-serif;
color: #7C7C7C
}
div font_blue_base {
color: #008CF8;/*ブルー*/
}
/* 上部と左側の線のみ非表示。下部と右側は残っている */
.td-css11 {
width: 2px; border-top: 2px dashed #008CF8;
}
canvas {
display: block;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body>
<div style=\\\"background-color: #008CF8; width: 1030px; height: 44px; font-size: 30px; color: #ffffff; font-family: sans-serif;\\\"> <b>在版ポジG 見える進ちょく</b></div>
<br>
<h1>\" & jisseki_tuki & \"月の進行状況</h1>
<br>
<table border=\\\"0\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">
<!--
うさぎ画像 W=30 H45
旗画像 W=46 H45
-->
<tr valign=\\\"bottom\\\">
<td align=\\\"right\\\" colspan=\\\"2\\\" width =\\\"30px\\\"><img src=\\\"./img/usagi_sm.png\\\"></td>
<td> </td>
<!-- <td><img src=\\\"./img/hata.png\\\"></td></td> -->
</tr>
<!-- グラフ -->
<tr valign=\\\"bottom\\\" height=\\\"8px\\\">
<td div style=\\\"width: 30px; border-bottom: 2px dashed #008CF8;\\\"></td>
<td div style=\\\"width: \" & kanryou_ph_graf & \"px; height: 8px; margin-bottom: 0px; background-color: #008CF8;\\\"> </td>
<td><div style=\\\"width: \" & ato_ph_graf & \"px; height: 2px; margin-bottom: 0px; background-color: #008CF8;\\\" </div></td>
</tr>
<!-- 数値 -->
<tr valign=\\\"baseline\\\" align=\\\"right\\\" style=\\\"font-size: 13px; color: #008CF8; font-family: sans-serif;\\\">
<td width=\\\"30\\\"> </td>
<td cellspacing=\\\"2\\\" width=\\\" \" & kanryou_ph_graf & \"px\\\" height=\\\"8\\\"> <em style=\\\"font-size: 14pt;\\\"> \" & kanryou_ph & \"</em><br> <i>Ph </i>
</td>
<td cellspacing=\\\"2\\\" width=\\\"\" & ato_ph_graf & \"\\\" height=\\\"8\\\"> あと<em style=\\\"font-size: 14pt;\\\">\" & ato_ph & \"</em><br> <i>Ph </i></td>
</tr>
</table>
<br>
<table cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" border=\\\"0\\\"\\\" width=\\\"1030px\\\">
<tr align=\\\"center\\\" >
<td td rowspan=\\\"2\\\" style=\\\"color: #008CF8;\\\"><em style=\\\"font-size: 40pt;\\\">\" & seisankeikaku & \"</em> <i>Ph</i> <br> 1c=\" & keikaku_1c & \"<i>Ph</i>/2c以上=\" & keikaku_4c & \"<i>Ph</i></td>
<td> <canvas id=\\\"canvas1\\\" width=\\\"120\\\" height=\\\"120\\\"> </canvas></td>
<td rowspan=\\\"2\\\" style=\\\"color: #008CF8;\\\"><em style=\\\"font-size: 40pt;\\\">\" & zaiko & \"</em> <i>Ph</i></td>
<td rowspan=\\\"2\\\"><em style=\\\"font-size: 40pt;\\\">\" & nyuukouyotei & \"</em> <i>Ph</i></td>
</tr>
<tr align=\\\"center\\\">
<td style=\\\"color: #008CF8;\\\"><em style=\\\"font-size: 20pt;\\\">\" & tasseiritu_tassei & \"</em> %</td>
</tr>
<tr align=\\\"center\\\">
<td colspan=\\\"4\\\" class=\\\"td-css11\\\"></td>
</tr>
<tr align=\\\"center\\\">
<td> <b>計画</b></td>
<td> <b>達成率</b></td>
<td> <b>在庫</b></td>
<td> <b>入稿予定</b></td>
</tr>
</table>
<br>
<br>
<br>
<table cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" border=\\\"0\\\"\\\" width=\\\"1030px\\\">
<tr align=\\\"center\\\" >
<td>
<input type=\\\"button\\\" value=\\\"更新\\\" onclick=\\\"location.reload();\\\" style=\\\"border-style:solid; border-width:1px; border-color:#008CF8; background:#FFFFFF; font-size:10pt; color:#008CF8\\\"/>
</td>
</tr>
<tr align=\\\"center\\\" >
<td>\" & kousin_jikoku & \"
</td>
</tr>
<tr align=\\\"center\\\" >
<td style=\\\"color: #008CF8;\\\"><br><br>製造部|業務開発担当
</td>
</tr>
</table>
<script type=\\\"text/javascript\\\">
(function() {
var canvas1 = document.getElementById(\'canvas1\');
var datas = [
[\" & tasseiritu_tassei & \", \'#00A0E9\'] , [\" & tasseiritu_nokori & \", \'#eeeeee\' ]
];
var pieChart_opts = {
center_x: canvas1.width/2,
center_y: canvas1.height/2,
r: canvas1.width/2
};
pieChart(canvas1, datas, pieChart_opts);
function pieChart(canvas_obj, datas, opts){
var c = canvas_obj.getContext(\'2d\');
// circle
var pos1 = 0;
var pos2;
for(var i = 0; i < datas.length; i++){
circle(c, datas[i][0], datas[i][1], opts);
}
function circle(context, ratio, color, opts) {
context.beginPath();
context.moveTo(opts.center_x, opts.center_y);
pos2 = pos1 + ratio/100 * 2 * Math.PI;
//円
context.arc(opts.center_x, opts.center_y, opts.r, pos1 - 0.5 * Math.PI, pos2 - 0.5 * Math.PI, false);
context.closePath();
context.fillStyle = color;
context.fill();
pos1 = pos2;
}
}
})();
</script>
<SCRIPT LANGUAGE=\\\"JavaScript\\\">
<!--
setTimeout(\\\"location.reload()\\\",1000*600);
//-->
</SCRIPT>
</body>
</html>
\"
set the clipboard to html_soce
do shell script \"pbpaste | iconv -f SJIS -t UTF8 > ~/Desktop/zaihan_shinchoku/zaihan_shinchoku.html\"
do shell script \"open ~/Desktop/zaihan_shinchoku/zaihan_shinchoku.html\"
=============フォームHTML==========
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
\"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">
<title>在版ポジG 見える進ちょく</title>
</head>
<body>
<h3> 在版ポジG 見える進ちょく 入力フォーム</h3>
<form method=\"post\" action=\"CGIのURI\">
<p>
1.対象月:<input id=\"id01\" type=\"text\" name=\"fm_tuki\" size=\"20\" value=\"\" /><br>
2.計画:<input id=\"id02\" type=\"text\" name=\"fm_keikaku\" size=\"20\" value=\"\" /><br>
3.1c:<input id=\"id03\" type=\"text\" name=\"fm_1c\" size=\"20\" value=\"\" /><br>
4.2c以上:<input id=\"id04\" type=\"text\" name=\"fm_2c\" size=\"20\" value=\"\" /><br>
5.完了Ph:<input id=\"id05\" type=\"text\" name=\"fm_kanryo\" size=\"20\" value=\"\" /><br>
6.在庫:<input id=\"id06\" type=\"text\" name=\"fm_zaiko\" size=\"20\" value=\"\" /><br>
7.入稿予定:<input id=\"id07\" type=\"text\" name=\"fm_yotei\" size=\"20\" value=\"\" /><br>
</p>
</form>
</body>
</html>
===========
最新の画像[もっと見る]
- 戻りフォーム 8年前
- 戻りフォーム 8年前
- VBA入力フォーム 9年前
- 2016.2.7-3 9年前
- 2016.2.7-3 9年前
- 2016.2.7-3 9年前
- 2016.2.7-3 9年前
- 2016.2.7-3 9年前
- 2016.2.7-3 9年前
- 2016.2.7-3 9年前
※コメント投稿者のブログIDはブログ作成者のみに通知されます