2010年06月14日
Blueprint用Fireworksのコマンド @ ウェブ
Blueprint用のガイドラインをFireworksで引きたかったので、コマンド化してみました。下記のスクリプトを拡張子jsfで保存して、/Users/ユーザー名/Library/Application Support/Adobe/Fireworks CS5/Commands に保存して使って下さい。
横幅950pxを基準にしているので、違う値にしたい場合は、コラムとかガッターは辻褄の合う数字に変更して下さい。
var docWidth = fw.getDocumentDOM().width
//var pageWidth = prompt("ページの幅",docWidth);
//var col = prompt("コラムの幅","30");
//var gutter = prompt("溝の幅","10");
var pageWidth = docWidth;
var col = 30;
var gutter = 10;
var orgColor = fw.getDocumentDOM().pathAttributes.fillColor;
fw.getDocumentDOM().pathAttributes.fillColor = "#D5FEFF";
fw.getDocumentDOM().addNewLayer("Guide", false);
fw.getDocumentDOM().addGuide(0, "vertical");
for (i = 1; i < pageWidth/(col+gutter); i++) {
fw.getDocumentDOM().addGuide(i*(col+gutter)-gutter, "vertical");
fw.getDocumentDOM().addGuide(i*(col+gutter), "vertical");
fw.getDocumentDOM().addNewRectanglePrimitive({left:(i-1)*(col+gutter), top:0, right:i*(col+gutter)-gutter, bottom:fw.getDocumentDOM().height}, 0);
}
fw.getDocumentDOM().addNewRectanglePrimitive({left:pageWidth-col, top:0, right:pageWidth, bottom:fw.getDocumentDOM().height}, 0);
fw.getDocumentDOM().addGuide(pageWidth, "vertical");
fw.getDocumentDOM().setLayerLocked(-1, -1, true, false);
fw.getDocumentDOM().setLayerDisclosure(1, false);
fw.getDocumentDOM().pathAttributes.fillColor = orgColor;
後になって気付いたのですが、現在のBoksはPDFで、ガイドの画像を吐き出してくれるので、それを読み込んで、ガイドラインだけ引けば良かったです。不要な人は、addNewRectanglePrimitiveを削除して下さい。
使い勝手を考えるとパネルにしておいた方が良いかも。
関連日記
- 2008年10月17日 CSS Nite in HIROSHIMA powered by Webさわり会議 (6433)@ 広島
- 2007年10月05日 Fireworks CS3でMXML その1 (5789)@ Flash
- 2005年10月28日 Fireworks 8とFlash 8をペンタブで試してみた (5297)@ Mac
- 2008年01月10日 Flex BuilderでActionScriptプロジェクト (5155)@ Flash
- 2007年06月20日 Adobe Fireworks CS3でOsakaフォント (4862)@ Mac
- 2008年11月21日 書籍「Dreamweaver & FireworksによるオープンソースCMSテンプレートデザイン Joomla/Nucleus/Zen Cartにもデザインを!」 (4686)@ ウェブ
- 2008年01月28日 Flex Skin Design Extensions (4534)@ Flash
- 2007年10月05日 初めてのAIR(Flex SDK編) (4444)@ Flash
- 2009年12月29日 Adobe Illustratorのアンチエイリアス (4427)@ Shade
- 2010年08月22日 iPhoneアプリのダミーアイコン自動生成 (4236)@ iPod touch
- 2012年04月26日 Dreamweaver CS6 の可変グリッドレイアウト (4219)@ ウェブ
- 2009年12月10日 jQuery API extension for Dreamweaver (4148)@ Mac
- 2010年11月15日 Fireworksテーブルエクステンション (4078)@ Mac
- 2005年08月08日 Macromedia - Studio 8 (3933)@ ウェブ
- 2013年05月07日 Fireworksの未来? (3928)@ ウェブ
- 2007年03月26日 Adobe Creative Suite CS3 (3896)@ Mac
- 2005年12月06日 アドビによるマクロメディア社の買収が完了 (3879)@ ウェブ
- 2009年09月02日 Fireworksで3Dっぽい文字 (3827)@ Mac
- 2007年12月28日 Flex Builder 2 (3826)@ Flash
- 2007年10月07日 Flash Player 10 (Astro) (3796)@ Flash
- 2009年06月28日 Fireworksのガイドラインをスクリプトで作る (3726)@ Mac
- 2012年04月24日 Adobe CS6(ウェブ関連) (3568)@ ウェブ
- 2002年08月05日 フォントのアウトライン変換 (3523)@ Mac
- 2010年08月07日 iPadとiPhoneのアイコンサイズ (3504)@ 携帯電話
- 2008年08月19日 Fireworks CS4 Beta (3495)@ Windows
- 2008年08月25日 Adobe FireworksでOsakaフォント (3432)@ Mac
- 2007年10月18日 Fireworks CS3からのMXML書き出し (3331)@ Flash
- 2009年05月02日 Flash CS3が具合悪い (3297)@ Flash
- 2008年05月28日 Dreamweaver CS4とFireworks CS4のベータ版 (3237)@ Mac
- 2008年08月19日 Fireworks CS4 Beta、起動できず (3158)@ Mac
アマゾン広告
この日記ページは閲覧数などの条件に応じて、閲覧制限を行っています。他からリンクしていただいても、そのリンクから辿った閲覧者が当ページの内容をご覧頂けない場合があります。ご了承下さい。