2009-02-28から1日間の記事一覧

パスを取得する

on open dropLIst repeatwith thisItem in dropLIst --リストがなくなるまで処理を繰り返す display dialog (thisItem as string) & return & return& "OKでクリップボードにコピー。" set the clipboard to thisItem as string endrepeat end open 参照元 …

ファイルを1行ずつ読み込む

--ファイルを1行ずつ読み込む set FH to open for access file fPath repeat try set lineData to read FH until ASCII character (10) display dialog lineData on error exit repeat end try end repeat close access FH 参考 【Lesson1】テキストファイル…

\を打つ

mac

optionキー(alt) + ¥ です。 参考 バックスラッシュを素早く入力

AppleScriptとPerlの連係の仕方

perlからの返り値の取り方とかAppleScriptとPerlの連係

空文字列の比較

空文字列以外を表示。 ... if lineData is not {"" as string} then display dialog lineData end if ... as string って付けないとだめだったりする。 デフォルトの文字コードとかが違うのかな?

文字列のつなげ方

&でつなぐ。 set img_link_tag to "<a href=" & lineData & " target=\"_blank\"><img src=" & lineData & " height=50% width=50%></a>"

AppleScript で高速データ処理

referenceで参照渡し、contentsで中身にアクセス。って感じかな? ネタ元 AppleScript で高速データ処理