# ====================================================== # Below are the customizations I have done which I suspect may be of use # if "new users" ever read the archives... # If not, I've spent 15 minutes etching how this works into my brain, # so it does ME some good. ;-) #====================================================== # Basic stuff, derived purely from SciTEDoc.html - it details ALL # of the settings. These are just useul examples built from the docs. # commands below will show up in the SciTE Tools menu if added to # your SciTE.properties or SciTEUser.properties menu. # Avoid using the SciTEGlobal.properties file since it may be # overwritten in an upgrade. # Commands will show up with the number as a Ctrl key shortcut # and the name value as the displayed name. For example, # using the settings below you would see # Command Prompt Here Ctrl+7 # Explore This Directory Ctrl+8 # Start/Browse Ctrl+9 # in the menu. # Open command prompt in this directory # 1. works if directory follows active file; # if not, comment out command.7.* line # and uncomment the currently commented version # If using alternate method, will NOT switch drives # automatically # 2. If running on Win9x/Me, change the word # "cmd" to "command" for the correct command processor command.name.7.*=Command Prompt Here command.7.*=cmd /K #command.7.*=cmd /K CD $(FileDir) command.subsystem.7.*=1 #Open directory of current file in explorer command.name.8.*=Explore This Directory command.8.*=c:\windows\explorer.exe "$(FileDir)" command.subsystem.8.*=2 #Generic "START" Command # works for any highlighted file/path # Allows rapid browse to a URL or shell execution of console commands # 1. Note that this actually "captures" the output of # cmd.exe; to avoid this, set the subsystem to 1. # you will see a command prompt window flash open briefly # 2. If running on Win9x/Me, change the word # "cmd" to "command" for the correct command processor # to URL browse, simply select the ENTIRE address and # select this command. command.name.9.*=Start/Browse command.9.*=cmd /c start $(CurrentSelection) command.subsystem.9.*=0 # Specialty commands below. Will be of zero value to people # who don't use these specific tools, but show how WSH scripts # and pseudo-protocol monikers can be easily used. Commented # out since they won't do you any good anyway as-is. # EXAMPLE 1 - USING A CSCRIPT-HOSTED WSH SCRIPT HELPER # line below is the name that shows up in the menu; # "4" identifies the command, and Ctrl+4 thus is a shortcut to it. # command.name.4.*=Tidy File # # below is the actual command. TO use a "helper" WSH script which # gives back console output, you want to have the following 3 items # in the command: # 1 - Specify cscript as the host EXPLICITLY to ensure it runs in a console # 2 - provide the FULL path to the helper script - if it has spaces in it, # it will likely need quote marks surrounding it. # 3 - Provide the "$(FilePath)" argument if the script will act on the file. # You can use other replaceable parameters as detailed in SciTEDoc.html. # command.4.*=cscript $(SciteDefaultHome)\scripts\vbstidy.vbs "$(FilePath)" # # Set the subsystem to 0. This ensures that console output is captured and # returned in the output window: # command.subsystem.4.*=0 # # General notes on cscript-based WSH scripts as helpers... # + A quick shortcut to getting the argument into the script is to just # refer to Wscript.Arguments(0). To get the ENTIRE set of arguments if # you supply more than one, use the WScript.Arguments collection as covered # in the WSH documentation from http://msdn.microsoft.com/scripting. # # + Use WScript.Echo for all your output; this allows it to be captured. # # + for advanced processing of files you are editing, you can simply set # SciTE to save the file automatically when you run a tool by setting # are.you.sure.for.build=0 (setting to 1 will prompt you to save). # You can make SciTE reload the file automatically by using # load.on.activate=1 if you are saving modifications done by the script # back to the file, but it is MUCH better to wscript.echo line by line; # that way you can confirm that the script did what you wanted and just # copy/paste back to the script window so you aren't "stuck" with bad # changes. #TLViewer command # # TLViewer (http://home.sprintmail.com/~mpryor/tlviewer.htm) # is a Typelib browser which allows easy browsing to an object via # its ProgID or CLSID; it does this via a pseudo-URL.# command.name.1.*=TLViewer # # The technique below - moniker & selection - works # for ANY shell-usable moniker, such as ftp://, http://, mailto://, # telnet://, https://, javascript://# command.1.*="progid4:$(CurrentSelection)" # # For general moniker use - if a selection will include an entire # URL including the moniker, you can just use "$CurrentSelection)" as # the command value; this will correctly load # http://www.scintilla.org # telnet://127.0.0.1 # mailto:spam@viking.restaurant.uk # and so on... # # And of course use subsystem 2 as documented in SciTEDoc.html.#command.subsystem.1.*=2