header image
 

flashlog.txtを一発で開くためのxyzzyのマクロ

xyzzyで、Flash Playerのデバッグ版が吐くログファイルを一発で開くためのマクロ。
.xyzzy ファイルに追記すればok。
自分の環境では「Ctrl-C f l」キーに割り当ててます。


; flashlog.txtを開く
;
; ログファイルの場所:
; [Win95/98/ME/2000/XP]
; C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs
; [Windows Vista]
; C:\Users\username\AppData\Roaming\Macromedia\Flash Player\Logs
(defun read-flashlog ()
"flashlog.txtを読み込みます"
(interactive)
(let* ((filename "flashlog.txt")
(flashlog (concat
(si:getenv "USERPROFILE")
"\\Application Data\\Macromedia\\Flash Player\\Logs\\"
filename)))
(if (not (file-exist-p flashlog))
(error "~Aがなかったです。" filename)
(let ((buf (or (get-file-buffer flashlog)
(create-file-buffer flashlog))))
(when buf
(set-buffer buf)
(read-file flashlog *encoding-utf8n*))))))
; C-c f l
(global-set-key ‘(#\C-c #\f #\l) ‘read-flashlog)

~ by dseg on 8pm 05/20/10.

Uncategorized

Leave a Reply