ポチエス
外部アプリケーション。Shift+Enterに割り当て。ファイル判別をさせている。
KC_main = { ; PPcメイン窓
\ENTER ,%Ob D:\bin\esExt\esExt5.exe %FCD
}
esExt5.ini;基本動作設定 ; [system] @menu=active @icon @context=0 %end ;ここから関連付け設定 ; ; #[folder] D:\bin\ppw\PPCW.EXE | PPx >-r "%P" %end #[.txt][.ini][.bat][.rb][.cfg][.l][.xyzzy][.howm][.tex] D:\bin\ttPage-R\ttPage.exe | &ttPage-R D:\bin\xyzzy\xyzzy.exe | &Xyzzy D:\bin\oedit\oedit.exe | &oedit D:\bin\xyzzy\xyzzy.exe | Xyzzyで印刷 >-p "%P" %end #[.html] C:\Program Files\Crescent Eve\Eve.exe | &Eve %end #[.py][.pyw] D:\bin\xyzzy\xyzzy.exe | &Xyzzy %end [.mp3][.ogg][.mpg][.wma][.oma][.flac][.wmv][.m3u] C:\Program Files\AIMP2\AIMP2.exe | AIMP2 %end [.kif] D:\bin\KIFUW\Kifuw.exe | KifuForWin %end [.PDF] D:\bin\SumatraPDF\SumatraPDF.exe | スマトラPDF %end #[.gif] D:\bin\MassiGra\MassiGra.exe | MassiGra %end #[.jpeg][.jpg][.bmp][.tif][.png] D:\bin\azpt\AzPainter2.exe | AzPainter D:\bin\MassiGra\MassiGra.exe | MassiGra D:\bin\smahe\SmaHey.exe | 画像縮小 %end ;例外拡張子の設定 #[.*] @system %end ;ここで設定されている'#'マークを除くすべての拡張子に関連付け ;[all] ;@system | 実行 ;%end
ClipPath
ファイルパスの取得に利用するメニュー。Shift+Nに割り当てている。
KC_main = { ; PPcメイン窓
\N ,%M_ClipPath,C
}
M_ClipPath = { ** comment **
CopyFileName = *cliptext %R
Copy&DirName = *cliptext %1
Copy&FileName(拡張子無し) = *cliptext %Y
CopyFilePath = *cliptext %FCD
ファイルの内容をクリップボードにコピー = %Ob D:\data\AHKScript\ClipFile.ahk %FCD
ファイルの内容をクリップボードに追加コピー = %Ob D:\data\AHKScript\ClipFileAdd.ahk %FCD
}
ClipFile.ahk#NoTrayIcon FileRead, hoge, %1% clipboard = %hoge% return
ClipFileAdd.ahk
#NoTrayIcon FileRead, hoge, %1% clipboard = %clipboard% `n %hoge% return
MakeFile
ファイル作成のためのメニュー。 Shift+Kに割り当てている。
KC_main = { ; PPcメイン窓
\K ,%M_makefile,H
}
M_makefile = { ** comment **
howm = %Ob D:\bin\xyzzy\xyzzy.exe -e (howm-create2dir) %1
PlainFile = *set name=%1\%"PlainFile"%E %: *makefile "%'name'" %: editor "%'name'" %: *jumppath "%'name'" /entry
-- =
txt = *set name=%1\%"テキストファイル"%{%|.txt%} %: *makefile "%'name'" %: editor "%'name'" %: *jumppath "%'name'" /entry
VBS = *set name=%1\%"VBScript"%{%|.vbs%} %: *makefile "%'name'" %: editor "%'name'" %: *jumppath "%'name'" /entry
JS = *set name=%1\%"JScript"%{%|.js%} %: *makefile "%'name'" %: editor "%'name'" %: *jumppath "%'name'" /entry
py = *set name=%1\%"JScript"%{%|.py%} %: *makefile "%'name'" %: editor "%'name'" %: *jumppath "%'name'" /entry
-- =
ディレクトリ(&D) = *makedir %1\%E
}
howm-create2dir.l
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;本体
(defvar *temp-howm-dir* nil)
(defun make-howm-create2dir-file (howm-dir)
(let* ((filename (format-date-string "%Y-%m-%d-%H%M%S.howm"))
(filepath (merge-pathnames filename howm-dir))
(directory (directory-namestring filepath)))
(if (not (file-directory-p directory))
(create-directory directory))
(find-file filepath)
(if (eq (point-max) (point-min))
(progn
(insert (format-date-string "= \n\n[%Y-%m-%d %H:%M]\n"))
(goto-char (+ (point-min) 2))))
))
(defun howm-create2dir ()
(interactive)
(if si:*command-line-args* (setq *howmdir* (pop si:*command-line-args*)))
(make-howm-create2dir-file *temp-howm-dir*)
(howm-create2dir-mode))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;キーバインド
(defun hateda-heading1 ()
(interactive "*")
(save-excursion
(goto-bol)
(insert "*")
(fix-selection-point)))
(defun hateda-heading2 ()
(interactive "*")
(save-excursion
(goto-bol)
(insert "**")
(fix-selection-point)))
(defun hateda-num-list ()
(interactive "*")
(save-excursion
(goto-bol)
(insert "+")
(fix-selection-point)))
(defun hateda-list ()
(interactive "*")
(save-excursion
(goto-bol)
(insert "-")
(fix-selection-point)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;モードの設定
(defun howm-create2dir-mode ()
(interactive)
(kill-all-local-variables)
(setq buffer-mode 'howm-create2dir-mode)
(setq mode-name "howm Create2dir")
(make-local-variable 'regexp-keyword-list)
(setq hateda-regexp-keyword-list
(compile-regexp-keyword-list
`(
("^[=].*" t (:color 7 13 :line :bold ))
("^[*][*][^*].*" t (:color 10 15 :line ))
("^[*][*][*][^*].*" t (:color 9 12 :line ))
)))
(setq regexp-keyword-list hateda-regexp-keyword-list)
(use-keymap *howm-create2dir-mode-map*))
(defvar *howm-create2dir-mode-map* nil)
(unless *howm-create2dir-mode-map*
(setq *howm-create2dir-mode-map* (make-sparse-keymap))
(define-key *howm-create2dir-mode-map* '#\C-] 'hateda-heading1)
(define-key *howm-create2dir-mode-map* '#\C-: 'hateda-heading2)
(define-key *howm-create2dir-mode-map* '#\C-+ 'hateda-num-list)
(define-key *howm-create2dir-mode-map* '#\C-- 'hateda-list)
(define-key *howm-create2dir-mode-map* '(#\C-c #\, #\c) 'howm-create2dir))
マスク
*でカーソル上拡張子マスクのトグルShift+*でマスクメニュー
KC_main = { ; PPcメイン窓
'*' ,%M_Mask
':' ,*RotateExecute id,*maskentry *.%T,*maskentry
}
M_Mask = { ** comment **
ディレクトリマスク = *maskentry attribute:d
EXEでマスク = *maskentry *.exe
テキストマスク = *maskentry *.txt,*.howm,*.ini
画像マスク = *maskentry *.jpg,*.jpeg,*.png,*.gif,*.bmp
マスク解除 = *maskentry
}
BackSpace.js
リストファイル内にいれば一つ前へ。そうでなければ親フォルダへ移動するスクリプト。バックスペースに割り当てている。KC_main = { ; PPcメイン窓
BS ,*script %0\Script\BackSpace.js
}
BackSpace.js
//!*script
type = PPx.DirectoryType
if (type == 4){
PPx.Execute("%k\"@^LEFT\"")
}else{
PPx.Execute("%K\"@BS\"")
};
0 件のコメント:
コメントを投稿