gcue Posted January 15, 2009 Share Posted January 15, 2009 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? Link to comment Share on other sites More sharing options...
yucatan Posted January 15, 2009 Share Posted January 15, 2009 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 @scriptfullpatchlook in the help file on Macro's Link to comment Share on other sites More sharing options...
gcue Posted January 15, 2009 Author Share Posted January 15, 2009 hmm but that line works! (%scriptdir%\%scriptfile%)i got it from the Run Before/After Tab section in the wrapperThese 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 directorymaybe i wasnt being clear - sorryessentially 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 Link to comment Share on other sites More sharing options...
azure Posted January 15, 2009 Share Posted January 15, 2009 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. Link to comment Share on other sites More sharing options...
gcue Posted January 15, 2009 Author Share Posted January 15, 2009 brilliant!! actually i used taskkill.exe many many thanks! Link to comment Share on other sites More sharing options...
DickG Posted May 11, 2015 Share Posted May 11, 2015 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now