2015年5月16日土曜日

SyntaxHighlighterのテスト

SyntaxHighlighterでうまくハイライトできるかな?

を、以前 google+ に投稿したフォルダを開くスクリプトでテスト。

css themesは"RDark"を使用。


openFolder.mel
1
2
3
4
5
6
7
8
9
10
11
global proc string openFolder()
{
    string $sceneName = `file -q -sn`;
    if(!`size $sceneName`) error("File Name Untiled.");
     
    string $path = toNativePath(`dirname $sceneName`);
    string $explorer=(`getenv "SystemRoot"`+"/explorer.exe");
    system ("start "+$explorer+" /n,"+$path);
    return $path;
     
}
maya2014以降@windows7

この部分のbrushは"php"
melの変数をハイライトしてくれている。


folderOpen.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
folderOpen();
 
function folderOpen()
{
    try{
        activeDocument.path.execute();
    }
     
    catch( err ){
        alert ( err, "folderOpen.jsx", true);
    }
     
}
photoshopCS6(64bit)@windows7

こっちのbrushは"js"




0 件のコメント:

コメントを投稿