This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| huga(); // =>false | |
| function huga(a) { | |
| hoge = a || false; | |
| alert(hoge); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /******************************************************************************* | |
| * [概要] ドキュメント内の全段落と全セルについてフォントの置換を行う | |
| *******************************************************************************/ | |
| function replaceFont() { | |
| var storyObj = app.documents[0].stories; | |
| for (var si = storyObj.length - 1; si >= 0; si--){ | |
| var tsrObj = storyObj[si].textStyleRanges; | |
| for (var tsri = tsrObj.length - 1; tsri >= 0; tsri--){ | |
| var fontObj = tsrObj[tsri].appliedFont; | |
| var fontName = fontObj.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 2871 MM DCCC LXX I | |
| def roman_numeral | |
| # 1000 = 'M' | |
| # 500 = 'D' | |
| # 100 = 'C' | |
| # 50 = 'L' | |
| # 10 = 'X' | |
| # 5 = 'V' | |
| # 1 = 'I' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var doc = app.documents.add(); | |
| dW = doc.documentPreferences.pageWidth; | |
| dH = doc.documentPreferences.pageHeight; | |
| maU = doc.marginPreferences | |
| tfBon = [maU.top, maU.left, dH-maU.bottom, dW-maU.right]; | |
| var tf = doc.textFrames.add({geometricBounds : tfBon}); | |
| var filePath = File.openDialog ("select txt"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (var ${20:i}=0, ${21:iL}=${1:Things}.length; ${20:i} < ${21:iL} ; ${20:i}++) { | |
| ${100:${1:Things}[${20:i}]}$0 | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (var ${2:i} in ${1:Things}) { | |
| ${100:${1:Things}[${2:i}]}$0 | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| puts RUBY_DESCRIPTION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var doc = app.activeDocument; | |
| var mySwatch = doc.colors; | |
| var flag = 0; | |
| for (var i=0; i < mySwatch.length; i++){ | |
| if (mySwatch[i].model == ColorModel.SPOT){ | |
| flag += 1; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(){ | |
| /* | |
| * 2011.1.8 InDesign Script勉強会お題① | |
| * CSV(二次元配列)の2番目と4番目をフレームに入れる | |
| */ | |
| var csv = [ | |
| ["aaa1","bbb1","ccc1","ddd1"], | |
| ["aaa2","bbb2\rbbb2","ccc2","ddd2"], |