PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: User Tool (on a per Project basis)  (Read 164 times)

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9287
  • Windows 10
    • PlanetSquires Software
User Tool (on a per Project basis)
« on: April 17, 2020, 01:08:17 PM »

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:

Code: [Select]
@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