{"id":738,"date":"2018-02-28T16:37:02","date_gmt":"2018-02-28T07:37:02","guid":{"rendered":"http:\/\/note.clovana.net\/?p=738"},"modified":"2018-03-04T01:38:13","modified_gmt":"2018-03-03T16:38:13","slug":"%e3%83%90%e3%83%83%e3%83%86%e3%83%aa%e3%83%bc%e4%bd%bf%e7%94%a8%e7%8a%b6%e6%b3%81%e3%81%ae%e3%83%ad%e3%82%b0%e3%82%92%e5%8f%96%e3%82%8b","status":"publish","type":"post","link":"https:\/\/note.clovana.net\/?p=738","title":{"rendered":"\u30d0\u30c3\u30c6\u30ea\u30fc\u4f7f\u7528\u72b6\u6cc1\u306e\u30ed\u30b0\u3092\u53d6\u308b"},"content":{"rendered":"<p>Tasker\u306eWite File\u3092\u4f7f\u3063\u3066\u30d0\u30c3\u30c6\u30ea\u30fc\u6d88\u8cbb\u91cf\u306e\u63a8\u79fb\u3092\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3059\u3002<\/p>\r\n<p>\u4eca\u307e\u3067\u306f\u6642\u5831\u306e\u969b\u306b\u30d0\u30c3\u30c6\u30ea\u30fc\u6b8b\u91cf\u3092\u8868\u793a\u3055\u305b\u3066\u3044\u305f\u3051\u3069\u5bdd\u3066\u308b\u9593\u306b\u901a\u77e5\u304c\u6e9c\u307e\u3063\u3066\u3057\u307e\u3063\u3066\u90aa\u9b54\u306b\u306a\u308b\u306e\u3067\u3001\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\uff08CSV\u5f62\u5f0f\uff09\u3067\u66f8\u304d\u51fa\u3059\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\r\n<!--more-->\r\n\r\n<h3>2018\/03\/03 \u8ffd\u8a18<\/h3>\r\n<p>1\u65e5\u51fa\u529b\u3055\u305b\u7d9a\u3051\u3066\u307f\u305f\u3068\u3053\u308d\u3001<code>%DATE<\/code>\u306b\u683c\u7d0d\u3055\u308c\u308b\u65e5\u4ed8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u304c\u5e74-\u6708-\u65e5\u3060\u3063\u305f\u308a\u65e5-\u5e74-\u6708\u3060\u3063\u305f\u308a\u3068\u30de\u30c1\u30de\u30c1\u306a\u306e\u3067<code>%DATE<\/code>\u4ee5\u5916\u3092\u4f7f\u3063\u3066\u65e5\u4ed8\u3092\u51fa\u529b\u3055\u305b\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\r\n<p>\u52d5\u4f5c\u78ba\u8a8d\u306b\u4f7f\u3063\u305f\u306e\u306fAndroid 7.1.1(Nougat)\u642d\u8f09\u306eNexus6\u3002<br \/>\r\n\u5225\u7aef\u672b\u306e\u30bf\u30d6\u30ec\u30c3\u30c8\u2026Android 6.0(Mashmarrow)\u642d\u8f09\u306ed-01J\u2026\u3067\u306f\u65e5\u4ed8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u304c\u5e74-\u6708-\u65e5\u56fa\u5b9a\u3060\u3063\u305f\u3002<br \/>\r\nNexus6\u3067\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u30d0\u30e9\u3064\u304d\u304c\u3001\u6a5f\u7a2e\u4f9d\u5b58\u306e\u3082\u306e\u306a\u306e\u304b\u3001Android\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u308b\u3082\u306e\u306a\u306e\u304b\u3001\u8a2d\u5b9a\u306e\u9055\u3044\u3084\u30a2\u30d7\u30ea\u306e\u9055\u3044\uff08\u30b9\u30de\u30db\u7248\u3068\u30bf\u30d6\u30ec\u30c3\u30c8\u7248\uff1f\uff09\u306a\u306e\u304b\u3001\u6839\u672c\u7684\u306a\u539f\u56e0\u304c\u3069\u3053\u306b\u3042\u308b\u306e\u304b\u306f\u5206\u304b\u3089\u306a\u304b\u3063\u305f\u3002<\/p>\r\n\r\n<p>\u4ee5\u4e0b\u306f\u6539\u826f\u7248\u306eTASK\u306e\u8a2d\u8a08\u3002<\/p>\r\n\r\n<h3>CSV\u5f62\u5f0f\u306e\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u3092\u51fa\u529b\u3059\u308bTASK\u3092\u4f5c\u308b<\/h3>\r\n<p>\u30ea\u30b9\u30c8\u306b\u5fc5\u8981\u306a\u8981\u7d20\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3002<br \/>\r\nCSV\u5f62\u5f0f\u306a\u306e\u3067\u30ab\u30f3\u30de\u533a\u5207\u308a\u3068\u3059\u308b\u3002<\/p>\r\n<ul>\r\n <li>\u30ea\u30b9\u30c8\u756a\u53f7<ul>\r\n  <li>3\u6841\u8868\u8a18\u3068\u3059\u308b\u3002\u6841\u304c\u5c11\u306a\u3044\u5834\u5408\u306f0\u3092\u88dc\u5b8c\u3059\u308b<\/li>\r\n <\/ul><\/li>\r\n <li>\u5e74\/\u6708\/\u65e5<ul>\r\n  <li>4\u6841\/2\u6841\/2\u6841\u3068\u3059\u308b\u3002\u4e0a\u8ff0\u306e\u901a\u308a<code>%DATE<\/code>\u306f\u4f7f\u308f\u306a\u3044<\/li>\r\n <\/ul><\/li>\r\n <li>\u65e5:\u6642<ul>\r\n  <li>2\u6841:2\u6841\u3068\u3057\u3001\u79d2\u306f\u4e0d\u8981\u300224\u6642\u9593\u8868\u8a18\u3068\u3059\u308b<\/li>\r\n <\/ul><\/li>\r\n <li>\u30d0\u30c3\u30c6\u30ea\u30fc\u6b8b\u91cf<ul>\r\n  <li>n%\u8868\u8a18\u3068\u3059\u308b\u3002<code>%BATT<\/code>\u3092\u305d\u306e\u307e\u307e\u4f7f\u3046<\/li>\r\n <\/ul><\/li>\r\n <li>\u30b9\u30c6\u30fc\u30bf\u30b9<ul>\r\n  <li>\u5145\u96fb\u958b\u59cb\u3001\u5145\u96fb\u7d42\u4e86\uff08\u5b8c\u4e86\u3067\u306f\u306a\u3044\uff09\u3001\u6642\u5831\uff08\u9ce9\u6642\u8a08\uff09\u3001\u624b\u52d5\u51fa\u529b\u306e\uff14\u7a2e<\/li>\r\n <\/ul><\/li>\r\n<\/ul>\r\n\r\n<h4>\u30ea\u30b9\u30c8\u756a\u53f7\u3092\u51fa\u529b\u3059\u308b<\/h4>\r\n<p>\u30ea\u30b9\u30c8\u756a\u53f7\u3092\u51fa\u529b\u3059\u308b\u30023\u6841\u8868\u8a18\u3067\u3001\u6841\u304c\u8db3\u308a\u306a\u3044\u5834\u5408\u306f0\u3092\u88dc\u5b8c\u3059\u308b\u3002<\/p>\r\n<p>\u30ea\u30b9\u30c8\u756a\u53f7\u3092\u683c\u7d0d\u3059\u308b\u9069\u5f53\u306a\u5909\u6570\u540d\u306b\u3001<code>+ 1<\/code>\u3059\u308c\u3070\u547c\u3073\u51fa\u3059\u5ea6\u306b\u5909\u6570\u540d\u306b\u683c\u7d0d\u3055\u308c\u305f\u6570\u5024+1\u3055\u308c\u308b\u3002<br \/>\r\n\u4eca\u56de\u306f<code>%Count<\/code>\u3068\u3057\u305f\u3002\u5927\u6587\u5b57\u30921\u6587\u5b57\u3082\u542b\u307e\u306a\u3044\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u3060\u3068\u547c\u3073\u51fa\u3059\u5ea6\u306b\u6570\u5024\u304c\u30ea\u30bb\u30c3\u30c8\u3055\u308c\u308b\uff08\u3088\u308a\u6b63\u78ba\u306b\u306f\u4fdd\u5b58\u3055\u308c\u306a\u3044\uff09\u306e\u3067\u3001\u5fc5\u305a1\u6587\u5b57\u4ee5\u4e0a\u306e\u5927\u6587\u5b57\u3092\u542b\u3093\u3060\u5909\u6570\u540d\u3092\u4f7f\u3046\u3053\u3068\u3002<\/p>\r\n\r\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nVariable Set [ Name:%Count To:%Count + 1 Recurse Variables:Off Do Maths:Off Append:Off ]\r\n<\/pre>\r\n\r\n<p>3\u6841\u8868\u8a18\u306b\u3057\u305f\u3044\u306e\u3067\u3001\u6761\u4ef6\u5206\u5c90\u3092\u4f7f\u3063\u3066<code>%Count<\/code>\u306b0\u3092\u88dc\u5b8c\u3057\u3066\u518d\u5ea6\u6570\u5024\u3092\u66f8\u304d\u8fbc\u3080\u3002<br \/>\r\n\u6761\u4ef6\u5206\u5c90\u306b\u306f\u4ee5\u4e0a\/\u4ee5\u4e0b\u304c\u306a\u3044\u306e\u3067\u3001\u3088\u308a\u5927\u304d\u3044\/\u3088\u308a\u5c0f\u3055\u3044\/\u4e00\u81f4\u306e\uff13\u3064\u3092\u4f7f\u3063\u3066\u632f\u308a\u5206\u3051\u308b\u3002<\/p>\r\n<ol>\r\n <li>00X &#8230; <code>%Count &lt; 10<\/code> \uff0810\u3088\u308a\u5c0f\u3055\u3044\uff09<\/li>\r\n <li>0XX &#8230; <code>%Count ~ 10 | %Count &lt; 100<\/code>\uff0810\u3068\u540c\u3058 or 100\u3088\u308a\u5c0f\u3055\u3044\uff09<\/li>\r\n <li>XXX &#8230; <code>%Count ~ 100 | %Count &gt; 100<\/code>\uff08100\u3068\u540c\u3058 or 100\u3088\u308a\u5927\u304d\u3044\uff09<\/li>\r\n<\/ol>\r\n<p>\u4e0a\u304b\u3089\u9806\u306bIf, Else If\u3092\u4f7f\u3063\u3066\u5206\u5c90\u3055\u305b\u308b\u306e\u3067\u3001\u4e00\u756a\u4e0a\u306e\u6761\u4ef6\u306b\u6e80\u305f\u306a\u3044\u5834\u5408\u306f\uff12\u756a\u76ee\u3001\uff12\u756a\u76ee\u306b\u3082\u6e80\u305f\u306a\u3044\u5834\u5408\u306f\uff13\u756a\u76ee\u3068\u3044\u3046\u3088\u3046\u306b\u5206\u5c90\u3057\u3066\u3044\u304f\u3002<br \/>\r\n<code>%Count<\/code>\u304c10\u3088\u308a\u5c0f\u3055\u3044\u304b\uff1f \u2192 10\u3068\u540c\u3058\u3001\u3082\u3057\u304f\u306f100\u3088\u308a\u5c0f\u3055\u3044\u304b\uff1f \u2192 100\u3068\u540c\u3058\u3001\u3082\u3057\u304f\u306f100\u3088\u308a\u5927\u304d\u3044\u304b\uff1f\u306e\u9806\u3067\u5206\u5c90\u3059\u308b\u3002<br \/>\r\n\u5358\u7d14\u8a08\u7b97\u3067\u30ed\u30b0\u304c999\u4ef6\u306b\u306a\u308b\u306b\u306f40\u65e5\u4ee5\u4e0a\u304b\u304b\u308b\u306e\u3067\u3001\u6708\u6bce\u306b\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u3092\u7ba1\u7406\u3059\u308b\u306a\u3089\uff14\u6841(1000\u4ee5\u4e0a\uff09\u306f\u8003\u616e\u5916\u3068\u3057\u305f\u3002<\/p>\r\n\r\n<p>\u4f7f\u7528\u3059\u308b\u6f14\u7b97\u5b50\u306f\u4ee5\u4e0b\u306e\uff14\u3064\u3002<\/p>\r\n<ul>\r\n <li>Matches <code>~<\/code> \uff08\u4e00\u81f4\uff09<\/li>\r\n <li>Maths: Less Than <code>&lt;<\/code> \uff08\u3088\u308a\u5c0f\u3055\u3044\uff09<\/li>\r\n <li>Maths: Greater Than <code>&gt;<\/code> \uff08\u3088\u308a\u5927\u304d\u3044\uff09<\/li>\r\n <li>Maths: Equals <code>=<\/code> \uff08\u30a4\u30b3\u30fc\u30eb\u30fbMatches\u3067\u4ee3\u66ff\u53ef\u80fd\uff09<\/li>\r\n<\/ul>\r\n\r\n<h4>\u5e74\/\u6708\/\u65e5, \u65e5:\u6642 \u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u65e5\u6642\u3092\u51fa\u529b\u3059\u308b<\/h4>\r\n<p><code>%DATE<\/code>\u304c\u4f7f\u3048\u306a\u3044\u306e\u3067\u4ee5\u4e0b\u306e\u65b9\u6cd5\u3092\u4f7f\u7528\u3059\u308b\u3002<\/p>\r\n<a href=\"https:\/\/groups.google.com\/forum\/#!topic\/tasker\/ZZ9_fxOzofM\" title=\"[bug report] Format of %DATE in Tasker and kids isn't identical with Chinese as device's language - Google \u30b0\u30eb\u30fc\u30d7\">Google\u306e\u30d5\u30a9\u30fc\u30e9\u30e0<\/a>\u306b\u3042\u3063\u305fJava-Scriplet\u306e\u30b3\u30fc\u30c9\u3092\u4e00\u90e8\u4fee\u6b63\u3057\u3066\u3001\u5e74\/\u6708\/\u65e5, \u6642:\u5206\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u5909\u6570\u306b\u683c\u7d0d\u3059\u308b\u3002<\/p>\r\n\r\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nvar now = global('TIMEMS');\r\nvar mydate = new Date(parseInt(now));\r\nvar logtimestamp = ((mydate.getFullYear()).toString()).slice(-4) + '\\\/' + ('0' + (mydate.getMonth()+1)).slice(-2) + '\\\/' + ('0' + mydate.getDate()).slice(-2) + ', ' + ('0' + mydate.getHours()).slice(-2) + ':' + ('0' + mydate.getMinutes()).slice(-2);\r\n<\/pre>\r\n\r\n<h4>\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u51fa\u529b\u3059\u308b<\/h4>\r\n<p>\u3053\u3053\u307e\u3067\u3092\u57fa\u672c\u5f62\u3068\u3057\u3066\u3001\u5145\u96fb\u958b\u59cb\/\u5145\u96fb\u7d42\u4e86\/\u6642\u5831\/\u624b\u52d5\u51fa\u529b\u306e\uff14\u30d1\u30bf\u30fc\u30f3\u306b\u5897\u3084\u3059\u3002<br \/>\r\nWrite File\u3092\u5168\u3066\u66f8\u304d\u63db\u3048\u308b\u306e\u304c\u624b\u9593\u306a\u306e\u3067\u3001<code>%status<\/code>\u306b\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u683c\u7d0d\u3057\u3066\u3001Write File\u3067\u66f8\u304d\u8fbc\u3080\u3002<\/p>\r\n\r\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nWrite File [ File:Tasker\/cache\/Batt-Log.txt Text:%Count, %logtimestamp, %BATT%, %status Append:On Add Newline:On ]\r\n<\/pre>\r\n\r\n<ul>\r\n <li>\u5145\u96fb\u958b\u59cb \u2026 <code>charge-in<\/code><\/li>\r\n <li>\u5145\u96fb\u7d42\u4e86 \u2026 <code>charge-out<\/code><\/li>\r\n <li>\u6642\u5831 \u2026 <code>hato<\/code><\/li>\r\n <li>\u624b\u52d5\u51fa\u529b\uff08\u30c1\u30a7\u30c3\u30af\uff09 \u2026 <code>check<\/code><\/li>\r\n<\/ul>\r\n\r\n<h3>Description<\/h3>\r\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nBatteryLog @ \u5145\u96fb\u958b\u59cb\r\n\tA1: Variable Set [ Name:%status To:charge-in Recurse Variables:Off Do Maths:Off Append:Off ] \r\n\tA2: JavaScriptlet [ Code:var now = global('TIMEMS');\r\n        var mydate = new Date(parseInt(now));\r\n        var logtimestamp = ((mydate.getFullYear()).toString()).slice(-4) + '\\\/' + ('0' + (mydate.getMonth()+1)).slice(-2) + '\\\/' + ('0' + mydate.getDate()).slice(-2) + ', ' + ('0' + mydate.getHours()).slice(-2) + ':' + ('0' + mydate.getMinutes()).slice(-2); Libraries: Auto Exit:On Timeout (Seconds):45 ] \r\n\tA3: Variable Set [ Name:%Count To:%Count + 1 Recurse Variables:Off Do Maths:Off Append:Off ] \r\n\tA4: If [ %Count &lt; 10 ]\r\n\tA5: Flash [ Text:00%Count, %logtimestamp, %status Long:On ] \r\n\tA6: Write File [ File:Tasker\/cache\/Batt-Log.txt Text:00%Count, %logtimestamp, %BATT%, %status Append:On Add Newline:On ] \r\n\tA7: Else If [ %Count ~ 10 | %Count &lt; 100 ]\r\n\tA8: Flash [ Text:0%Count, %logtimestamp, %status Long:On ] \r\n\tA9: Write File [ File:Tasker\/cache\/Batt-Log.txt Text:0%Count, %logtimestamp, %BATT%, %status Append:On Add Newline:On ] \r\n\tA10: Else If [ %Count ~ 100 | %Count &gt; 100 ]\r\n\tA11: Flash [ Text:%Count, %logtimestamp, %status Long:On ] \r\n\tA12: Write File [ File:Tasker\/cache\/Batt-Log.txt Text:%Count, %logtimestamp, %BATT%, %status Append:On Add Newline:On ] \r\n\tA13: End If \r\n\tA14: Flash [ Text:System-lock @ 3sec. Long:On ] \r\n\tA15: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ] \r\n\tA16: System Lock \r\n<\/pre>\r\n\r\n<p><code>%Count<\/code>\u3067\u6761\u4ef6\u5206\u5c90\u3055\u305b\u3066\u5225\u5909\u6570\u306b\u683c\u7d0d\u3057\u3001\u3072\u3068\u3064\u306eWrite File\u3067\u51fa\u529b\u3059\u308b\u65b9\u6cd5\u3092\u3068\u3063\u3066\u3044\u305f\u3051\u3069\u30010\u304c\u88dc\u5b8c\u3055\u308c\u305f\u308a\u3055\u308c\u306a\u304b\u3063\u305f\u308a\u3067\u30de\u30c1\u30de\u30c1\u3060\u3063\u305f\u306e\u3067\u3001\u6761\u4ef6\u5206\u5c90\u3055\u305b\u3066\u5225\u5909\u6570\u306b\u683c\u7d0d\u305b\u305a\u305d\u306e\u307e\u307e\u51fa\u529b\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002<br \/>\r\n\u3053\u306e\u65b9\u6cd5\u306724\u6642\u9593\u306735\u4ef6\u307b\u3069\u306e\u30ed\u30b0\u51fa\u529b\u3092\u884c\u3063\u305f\u304c\u3001\u6f0f\u308c\u306a\u304f0\u304c\u88dc\u5b8c\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Tasker\u306eWite File\u3092\u4f7f\u3063\u3066\u30d0\u30c3\u30c6\u30ea\u30fc\u6d88\u8cbb\u91cf\u306e\u63a8\u79fb\u3092\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3059\u3002 \u4eca\u307e\u3067\u306f\u6642\u5831\u306e\u969b\u306b\u30d0\u30c3\u30c6\u30ea\u30fc\u6b8b\u91cf\u3092\u8868\u793a\u3055\u305b\u3066\u3044\u305f\u3051\u3069\u5bdd\u3066\u308b\u9593\u306b\u901a\u77e5\u304c\u6e9c\u307e\u3063\u3066\u3057\u307e\u3063\u3066\u90aa\u9b54\u306b\u306a\u308b\u306e\u3067\u3001\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\uff08CSV\u5f62\u5f0f\uff09 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":584,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[71],"tags":[72],"_links":{"self":[{"href":"https:\/\/note.clovana.net\/index.php?rest_route=\/wp\/v2\/posts\/738"}],"collection":[{"href":"https:\/\/note.clovana.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/note.clovana.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/note.clovana.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/note.clovana.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=738"}],"version-history":[{"count":5,"href":"https:\/\/note.clovana.net\/index.php?rest_route=\/wp\/v2\/posts\/738\/revisions"}],"predecessor-version":[{"id":747,"href":"https:\/\/note.clovana.net\/index.php?rest_route=\/wp\/v2\/posts\/738\/revisions\/747"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/note.clovana.net\/index.php?rest_route=\/wp\/v2\/media\/584"}],"wp:attachment":[{"href":"https:\/\/note.clovana.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/note.clovana.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/note.clovana.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}