// After Effects Shortcut Keys reference window. This script // will locate the shortcut prefs file for After Effects or have you find it, // then load it into a docable palette for easy reference for when you // need to remember that one hotkey you used once or twice, eleven months ago. Just a convience // script so you don't have to hunt through files to find the shortcuts keys file everytime // you forget a key. If you were unaware of the pref file, then you are about // to learn a butt load of hotkeys that could save your live. Ok maybe not your // life, but maybe your job. ;) // warning to user to put script into ScriptUI Panels folder and also show the paths to shortcut pref file /*{ alert("WARNING!!!!!!\n" + "\n" + "Make sure this script is in your \"ScriptUI Panels\" folder and you run it from the \"Window\" menu!\n" + "\n" + "If you goofed and you didn't do the above, just hit cancel on the next screen, put things where they should be and relaunch script.\n" + "\n" + "Shortcut pref file default locations are:\n" + "\n" + "Mac = Users > \"username\" > Library > Preferences > Adobe > After Effects > 8.0\n" + "\n" + "Pc = C > Documents and Settings > \"username\" > Application Data > Adobe > After Effects > 8.0\n" + "\n") } */ { // aeKeysSetup Object function aeKeysSetup(thisObj) { var aeKeysData = new Object(); aeKeysData.scriptName = "Shortcut Keys"; aeKeysData.version = "1.0"; aeKeysData.strHelp = "?"; aeKeysData.onWindows = ($.os.indexOf("Windows") != -1); aeKeysData.prefVersion = parseInt(app.version).toString() + ".0"; aeKeysData.strAbout = "About AE Shortcut Keys\n" + "\n" + "Assembled by: David Torno\n" + "March, 2008\n" + "\n" + "Additional resource's, help and inspiration by...\n" + "- TONS of thanks to Paul Tuersley, he truely is the man!\n" + "- redefinery.com\n" + "- Lloyd Alvarez\n" + "- aescripts.com\n" + "- aenhancers.com\n" + "- Dan Ebberts and motionscript.com\n" + "- The world Wide Web and various books which helped make my brain turn to mush, which then resulted in me sort of understanding this Javascript thingy\n" + "\n" + "\n" + "For more info about boring old me, visit...\n" + "\n" + "http://www.sydefxink.com\n" + "http://mactex.blogspot.com\n" ; // Build the interface function aeKeysSetup_buildUI(thisObj) { var pal = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Shortcut Keys Reference", myFile, {resizeable:true}); if (pal != null) { // Open file and read contents (hopefully) if (aeKeysData.onWindows) { var myFile = new File("~/Application Data/Adobe/After Effects/"+aeKeysData.prefVersion+"/Adobe After Effects "+ aeKeysData.prefVersion+" Shortcuts"); } else { var myFile = new File("~/Library/Preferences/Adobe/After Effects/"+aeKeysData.prefVersion+"/Adobe After Effects "+ aeKeysData.prefVersion+" Shortcuts"); } // if the file ain't there then let the user point the way if(myFile.exists == false) { var myFile = fileGetDialog("Find the file",""); } if (myFile != null && myFile.exists){ // open file var fileOk = myFile.open("r", "TEXT", "????"); if (fileOk){ // how many lines to skip in the document. for (var a = 1; a <=204; ++a) { myFile.readln(); } // a texy array var textArray = new Array(); while (!myFile.eof){ textArray[textArray.length] = myFile.readln(); } // close file before exiting myFile.close(); var res = "group { \ orientation:'row', alignment:['left', 'fill'], spacing:5, \ dropDownList: DropDownList {alignment:['fill','fill'] }, \ aboutbutton: Group { \ alignment:['left','top'], alignChildren:['left','top'], \ help: Button { text:'" + aeKeysData.strHelp + "', alignment:['left','top']}, \ },\ }"; pal.margins = [10,10,10,10]; pal.grp = pal.add(res); // Workaround to ensure the text color is black, even at darker UI brightness levels var winGfx = pal.graphics; var darkColorBrush = winGfx.newPen(winGfx.BrushType.SOLID_COLOR, [0,0,0], 1); pal.grp.dropDownList.graphics.foregroundColor = darkColorBrush; for (var x = 0; x < textArray.length; ++x) { pal.grp.dropDownList.add("item", textArray[x]); } pal.grp.dropDownList.preferredSize.height = 10; pal.grp.dropDownList.selection = 0; pal.grp.aboutbutton.help.onClick = function () {alert(aeKeysData.strAbout, aeKeysData.strAboutTitle);} pal.layout.layout(true); pal.grp.minimumSize = pal.grp.size; pal.layout.resize(); pal.onResizing = pal.onResize = function () {this.layout.resize();} return pal; } } } } var aeKeysPal = aeKeysSetup_buildUI(thisObj); if ((aeKeysPal != null) && (aeKeysPal instanceof Window)) { aeKeysPal.center(); aeKeysPal.show(); } } aeKeysSetup(this); }