This file contains 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
/* | |
仕様 | |
2022/11/26 記述 | |
ダイアログを開き、処理するファイルが格納されたフォルダを選択。 | |
「いくつおきに処理しますか?」のダイアログで何枚おきに処理するかの数値を入力します。 | |
「おきに」とは「置きに」と書きます。 | |
例; | |
「0」と入力 | |
1、2、3、4、5、6、7、8、9、10..... | |
「1」と入力 |
This file contains 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
mainScript: { //処理中断のためのラベル | |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
// ドキュメントの有無による処理判別 | |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
try { | |
if (app.activeDocument) { | |
//alert("OK"); | |
} | |
} catch (e) { | |
alert("ドキュメントが開いていません。\r\n新規ドキュメントを作成してから実行してください。"); |
This file contains 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
#target illustrator-22 | |
#targetengine main | |
/*////////////////////////////////////////////////// 変数定義 ////////////////////////////////////////////////////////////////////*/ | |
var doc = app.activeDocument; //ドキュメント | |
/*/////////////////////////////////////////////// 入力ダイアログ表示 ////////////////////////////////////////////////////////*/ | |
win = new Window("palette", "指定行数に長体処理", [200, 150, 350, 300]); | |
var para01Btn = win.add("button", [10, 10, 70, 30], "1行"); | |
var para02Btn = win.add("button", [10, 35, 70, 55], "2行"); |
This file contains 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 win = app.dialogs.add({ | |
name: "ドキュメントサイズを選択" | |
}); | |
var dlgClmn = win.dialogColumns.add(); | |
var btnGrp = dlgClmn.radiobuttonGroups.add(); | |
var a4Btn = btnGrp.radiobuttonControls.add({ | |
staticLabel: "A4 (210 x 297mm)", | |
minWidth: 150, | |
checkedState: true |
This file contains 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Lチカ もどき</title> | |
<style> | |
/*リセットCSS*/ | |
* { | |
margin: 0; |
This file contains 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
//#target illustrator | |
//#targetengine mainProcess | |
/*////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
入力ダイアログ表示 | |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/ | |
win = new Window("palette", "ランダムに着色", [200, 150, 480, 300]); | |
win.add("statictext", [10, 15, 200, 30], "対象を選んでください。"); | |
var fillValue = win.add("radiobutton", [30, 40, 100, 60], "塗り"); | |
fillValue.value = true; | |
fillValue.active = true; |
This file contains 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
MAIN: { //ラベル | |
flag = false; | |
while (flag == false) { | |
var fol = Folder.selectDialog("画像が格納されているフォルダを選択してください。"); //フォルダを選択 | |
if (fol == null) { //キャンセルの場合 ※ゴミ箱を選んでもnullが返る | |
alert("キャンセルします。"); | |
break MAIN; | |
} | |
var selFiles = fol.getFiles(); //ファイルを取得 |
This file contains 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 docWidth = 841.89; //ページの横幅。297mm | |
var docHeight = 595.276; //ページの縦幅。210mm | |
var docObj = documents.add(DocumentColorSpace.RGB, docWidth, docHeight); //RGB空スペースでドキュメント作成 | |
var recObj = docObj.pathItems.rectangle(0, 0, 841.89, -595.276); //ドキュメントサイズに矩形を作成 | |
recObj.filled = false; //塗りなし | |
recObj.stroked = false; //線なし | |
//▼日付を取得 | |
var date = new Date(); |
This file contains 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
MAIN: { //ラベル | |
/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
入力ダイアログ表示 | |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/ | |
var flag = false; //フラグの初期化 | |
while (flag == false) { | |
var myDialog = new Window('dialog', '書き出し設定', [800, 250, 1060, 450]); //見出し | |
myDialog.staticText = myDialog.add("statictext", [10, 5, 275, 25], "保存するファイル形式を選択してください。"); //固定テキスト | |
myDialog.dropDownList = myDialog.add("dropdownlist", [10, 30, 250, 50], ["PNG", "JPEG", "GIF"]); //ドロップダウンリスト | |
myDialog.dropDownList.selection = 0; //デフォルトで一番上のものを選択 |
This file contains 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style> | |
h1 { | |
font-size: 31.24px; | |
font-family: HGS行書体; |
NewerOlder