• Welcome to PlanetSquires Forums.
 

User Tool (on a per Project basis)

Started by Paul Squires, April 17, 2020, 01:08:17 PM

Previous topic - Next topic

Paul Squires

Thought that I'd share this little tip because it is working okay for me (so far).

I have one project where I need to run a batch file prior to every compile. I created a User Tool that invokes the batch file before every compile. The problem is that this User Tool will also run for every project, not just the project that I need it for.

A simple solution was to pass the <P> project name to the batch file and test inside the batch file for the incoming parameter. Here is what the first couple of lines of the batch file look like:


@echo off
if %1 NEQ MyProject.wfbe exit 0


The incoming project name parameter is %1. The NEQ (not equal to) command is used to test that parameter against the string MyProject.wfbe. If the strings do not match then terminate the batch file.


Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer