PDA

View Full Version : Customizing Dreamweaver, launch file on Save


compphenom
06-03-2008, 10:02 PM
I need to modify DW (i.e. make an extension) to make dreamweaver launch a batch file each time a user saves a document.

I have written a command which is available through the command menu item which completes this, but it needs to be automated on save.

- Kevin

davidj
06-03-2008, 10:17 PM
why do you want to do this

what does the bat do

compphenom
06-03-2008, 10:20 PM
At the company I am at we have a custom build process in a Java environment. Each time we front end developers make a change to a JSP, CSS or JS file, we have to open a command window and run a build (basically recompile the project)....and then we can see our change. So I thought it would be easier if this was just in a batch file which launched each time we saved our JSP files.

- Kevin

compphenom
06-03-2008, 11:02 PM
Actually, a co-worker of mine and I sort of figured this out. All we had to do was add _afterSave.htm to the command htm file that I created in the \configuration\Commands directory and now it works. I wonder if it is possible to conditionally do it on only JSP files however, and not all files such as JS and CSS.

- Kevin

davidj
06-04-2008, 07:41 AM
im sure your BAT script could filter on file types

compphenom
06-04-2008, 05:16 PM
No, I mean in DW, in the HTML/JS file I created as a command, is there a way in the DW API to do the following:

//get current document's file type
if(DWfile.getFileType == "JSP") {
MM.runCommandLine('C:\\mybatfile.bat');
} else { //do nothing }

I could find nothing in the API like DWfile.getFileType, of course I just made it up.

- Kevin