Jump to content
gcue

scite: before/after compilation

Recommended Posts

gcue

i am running the script AFTER the compilation with this line

%scriptdir%\%scriptfile%

is there a way to terminate the script if its running BEFORE the compilation?

Share this post


Link to post
Share on other sites
yucatan

i am running the script AFTER the compilation with this line

%scriptdir%\%scriptfile%

is there a way to terminate the script if its running BEFORE the compilation?

u cant use %scriptdir%\%scriptfile%

use @scriptfullpatch

look in the help file on Macro's

Share this post


Link to post
Share on other sites
gcue

hmm but that line works! (%scriptdir%\%scriptfile%)

i got it from the Run Before/After Tab section in the wrapper

These commands will be executed one at a time as cmdline commands.

The Commandlines can contain the following variables:

%in% , %out%, %icon% which will be replaced by the fullpath\filename.

%scriptdir% same as @ScriptDir and %scriptfile% = filename without extension.

%fileversion% set to the #AutoIt3Wrapper_Res_Fileversion directive value.

%scitedir% will be replaced by the SciTE program directory

maybe i wasnt being clear - sorry

essentially what im trying to do is kill the script before compiling with the wrapper.... (i am already automatically running the script after the compilation)

reason why i want to do this: its not just me being lazy.. i run the script from different PCs from the same location, so i want to kill it before compiling with new changes

Share this post


Link to post
Share on other sites
azure

hmm but that line works! (%scriptdir%\%scriptfile%)

i got it from the Run Before/After Tab section in the wrapper

maybe i wasnt being clear - sorry

essentially what im trying to do is kill the script before compiling with the wrapper.... (i am already automatically running the script after the compilation)

reason why i want to do this: its not just me being lazy.. i run the script from different PCs from the same location, so i want to kill it before compiling with new changes

How about something like running:

TSKILL currentscript.exe

It's a windows command to kill a process.

Share this post


Link to post
Share on other sites
gcue

brilliant!!

actually i used taskkill.exe

many many thanks!

Share this post


Link to post
Share on other sites
DickG

I was trying to do the same thing: Close the app that I am trying to compile. I often forget that it's still running.

After trying lots of things, I finally found what works for me in the Run Before/After when compiling:

taskkill.exe /F /IM "%scriptfile%.exe"

Including the path ("%scriptdir%") does NOT work (because the path is not shown in Task Manager). The /F and /IM parameters are from the Cmd prompt's Help for Taskkill.

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×