Request for a script that autostops commands etc. on app focus loss and continue on refocus from where it left off

Ask gaming related questions
User avatar
tobsto occupied
Posts: 140
Joined: 20 Feb 2020, 09:34
GitHub: washingleavesandthen

Re: Request for a script that autostops commands etc. on app focus loss and continue on refocus from where it left off

30 Sep 2020, 04:27

rommmcek wrote:
29 Sep 2020, 15:12
tobsto occupied wrote:
29 Sep 2020, 08:13
not what i need , im talking about setting more than one watch process

Code: Select all

@echo OFF
:: set process_name:
 set process_Acm=ACM.exe & set process_Wer=Werfault.exe
 ::==================================================================
::Launch the App
 start "" "Texmod and Game Autolauncher.exe"
 timeout /t 90
:RUNNING
  timeout /t 5
  tasklist|findstr %process_Wer% > nul && Goto Terminate
  tasklist|findstr %process_Acm% > nul && Goto RUNNING
:Terminate
  taskkill /F /T /IM "cheatengine-x86_64.exe" & taskkill /F /T /IM "Texmod.exe" & taskkill /F /T /IM "ACM.exe"
  taskkill /F /T /IM "Texmod and Game Autolauncher.exe" & taskkill /F /T /IM "Werfault.exe" & exit /b
P.s.: I'm not sure. For that code to work Acm.exe must be running. Once it exits the "TaskKill" commands will be triggered as well as when Werfault.exe appears.
nice...shall give it a whirl
User avatar
tobsto occupied
Posts: 140
Joined: 20 Feb 2020, 09:34
GitHub: washingleavesandthen

Re: Request for a script that autostops commands etc. on app focus loss and continue on refocus from where it left off

30 Sep 2020, 04:48

update> dont work ...wont exit everything on acm.exe exit and wont on werfault.exe execution aka popup
User avatar
tobsto occupied
Posts: 140
Joined: 20 Feb 2020, 09:34
GitHub: washingleavesandthen

Re: Request for a script that autostops commands etc. on app focus loss and continue on refocus from where it left off

30 Sep 2020, 07:23

tobsto occupied wrote:
30 Sep 2020, 04:25
rommmcek wrote:
29 Sep 2020, 15:20
GPU:
Try to fix this batch (it has similar bug as in your code):

Code: Select all

@echo OFF
set /a CountDown=66
:RUNNING
    echo Hi Tobsto, are you free?
    TimeOut /t 3
    set /a CountDown= %CountDown% - 20
    echo No, I'm occupied (currently at %CountDown%%)
    TimeOut /t 3
GOTO RUNNING
    if %CountDown% Lss 30 GoTo FreeTobsto
:FreeTobsto
    echo Ok, I'm free now, I think I get it!
    pause & exit /b
tobsto occupied wrote:
29 Sep 2020, 08:21
p.s those links did NOT help the situation
What did you not understand?
finally !!! a starting point i can start to tinker with , wohoo!!! hype!

p.s those links werent helping me...you ok , but me to me the info contained was just mumbo jumbo tbh :lolno: :crazy:
damn ...once i started to read into the batch the hype died instantly lols...but for real im lost as ever :problem: :think: thought it was a base gpu batch with me just having to change variables ...goddamned it i aint gonna get nowhere with this , been hitting my head against a brick wall over here and it wont budge :headwall:
User avatar
tobsto occupied
Posts: 140
Joined: 20 Feb 2020, 09:34
GitHub: washingleavesandthen

Re: Request for a script that autostops commands etc. on app focus loss and continue on refocus from where it left off

30 Sep 2020, 07:34

Code: Select all

@echo OFF
set VK_LAYER_PATH="" "DOOM;%VK_LAYER_PATH%"
set VK_INSTANCE_LAYERS=VK_LAYER_reshade
@start "" "DOOMx64vk.exe" +devMode_Enable 1 +com_restarted 1 +com_gameMode 1 +com_skipIntroVideo 1 +exec DOOMConfig.cfg 1 +image_usecompression 0 +com_skipKeyPressOnLoadScreens 1
TIMEOUT /t 20
:: set process_name:
 set process_name=DOOMx64vk.exe
 ::=================================================================
::Launch the App
tasklist | findstr /i %process_name% > nul && start /min "" "easy access to campaign.ahk"
cd /D "C:\Program Files\NVIDIA Corporation\NVSMI\"
:GPU
for /f skip^=8^ tokens^=1-3^ delims^=^| %%a in ('"nvidia-smi.exe"') do (
    for /f "tokens=1-6 delims= " %%g in ("%%a") do set u=%%g & set v=%%h) & set w=%%j) & (
    for /f "tokens=1-3 delims= " %%g in ("%%b") do set x=%%g & set y=%%i) & (
    for /f "tokens=1-2 delims= " %%g in ("%%c") do set z=%%g) & goto :breakForLoop
:breakForLoop
set /a u+=0 & set /a v+=0 & set /a w+=0 & set /a x+=0 & set /a z+=0
set /a u=u & set /a v=v & set /a w=w & set /a x=x & set /a z=z
echo %u%, %v%, %w%, %x%, %y%, %z%
pause
timeout /t 5
goto GPU
if %z% Lss 20 TaskKill /F /im %process_name% & goto RUNNING
set /a CountDown=66
timeout /t 3
GOTO RUNNING
    if %CountDown% Lss 30 GoTo GPU
:RUNNING
tasklist|findstr %process_name% > nul &&
    taskkill /F /T /IM "cheatengine-x86_64.exe" & taskkill /F /T /IM "Werfault.exe"
    set /a CountDown= %CountDown% - 20
    timeout /t 1
 & exit /b
dont work for shit .... :think:
User avatar
rommmcek
Posts: 1123
Joined: 15 Aug 2014, 15:18

Re: Request for a script that autostops commands etc. on app focus loss and continue on refocus from where it left off

02 Oct 2020, 15:58

tobsto occupied wrote:
30 Sep 2020, 04:48
update> dont work ...wont exit everything on acm.exe exit and wont on werfault.exe execution aka popup
These two lines are for exiting.

Code: Select all

taskkill /F /T /IM "cheatengine-x86_64.exe" & taskkill /F /T /IM "Texmod.exe" & taskkill /F /T /IM "ACM.exe"
taskkill /F /T /IM "Texmod and Game Autolauncher.exe" & taskkill /F /T /IM "Werfault.exe" & exit /b
Which process does not exit?
If it is not present in above lines then it cannot exit, so you have to add the command to do that.
May be there should be added some TimeOut after each TaskKill command...
I cannot test things like these for you!
User avatar
rommmcek
Posts: 1123
Joined: 15 Aug 2014, 15:18

Re: Request for a script that autostops commands etc. on app focus loss and continue on refocus from where it left off

02 Oct 2020, 16:01

tobsto occupied wrote:
30 Sep 2020, 07:23
damn ...once i started to read into the batch the hype died instantly lols...
rommmcek wrote:
28 Sep 2020, 10:34
2. If statement is outside the loop of :GPU label and goto GPU command. That means the loop will repeat for ever no matter what was the condition in If statement, doing nothing.
So do it and it will work!
rommmcek wrote:
28 Sep 2020, 10:34
So you have to uncomment one of the lines.
why did you uncomment three lines? And note:
rommmcek wrote:
25 Sep 2020, 11:04
May be your OS doesn't support += operator
tobsto occupied wrote:
30 Sep 2020, 04:25
to me the info contained was just mumbo jumbo
Be more precise! Which example was for you just "mumbo jumbo"?
User avatar
tobsto occupied
Posts: 140
Joined: 20 Feb 2020, 09:34
GitHub: washingleavesandthen

Re: Request for a script that autostops commands etc. on app focus loss and continue on refocus from where it left off

03 Oct 2020, 02:00

rommmcek wrote:
02 Oct 2020, 15:58
tobsto occupied wrote:
30 Sep 2020, 04:48
update> dont work ...wont exit everything on acm.exe exit and wont on werfault.exe execution aka popup
These two lines are for exiting.

Code: Select all

taskkill /F /T /IM "cheatengine-x86_64.exe" & taskkill /F /T /IM "Texmod.exe" & taskkill /F /T /IM "ACM.exe"
taskkill /F /T /IM "Texmod and Game Autolauncher.exe" & taskkill /F /T /IM "Werfault.exe" & exit /b
Which process does not exit?
If it is not present in above lines then it cannot exit, so you have to add the command to do that.
May be there should be added some TimeOut after each TaskKill command...
I cannot test things like these for you!
all of em wont exit ..none ..niente ..nadda

lemme reiterate ...those mentioned lines are indeed bound to running

what i need is for everything in running to be killed IF : ACM.exe exits OR Werfault.exe window pops up


and the last script you posted dont do that matter of fact it wont kill anything , somethings bugged ... :|

p.s this has nothing to do with not being able to test it for me since you dont have said app :problem:
User avatar
tobsto occupied
Posts: 140
Joined: 20 Feb 2020, 09:34
GitHub: washingleavesandthen

Re: Request for a script that autostops commands etc. on app focus loss and continue on refocus from where it left off

03 Oct 2020, 02:08

rommmcek wrote:
02 Oct 2020, 16:01
tobsto occupied wrote:
30 Sep 2020, 07:23
damn ...once i started to read into the batch the hype died instantly lols...
rommmcek wrote:
28 Sep 2020, 10:34
2. If statement is outside the loop of :GPU label and goto GPU command. That means the loop will repeat for ever no matter what was the condition in If statement, doing nothing.
So do it and it will work!
rommmcek wrote:
28 Sep 2020, 10:34
So you have to uncomment one of the lines.
why did you uncomment three lines? And note:
rommmcek wrote:
25 Sep 2020, 11:04
May be your OS doesn't support += operator
tobsto occupied wrote:
30 Sep 2020, 04:25
to me the info contained was just mumbo jumbo
Be more precise! Which example was for you just "mumbo jumbo"?
all of it lols , but now honestly PLEASE !!!!!!!! help me out on this one shits not a joke no more , im serious h e l p me o u t here , im NOT as experienced nor do i code for shit you shouldve noticed this for months now lols , but serioulsy man help me the fuck out and i mean with a full batch , ive already posted one but that ones obviously containing garbage and dont do shit considering the gpu core threshold feature , fuck ill wait if i have to cause i REALLY need this function :lolno: :crazy: :thumbdown: :headwall: :headwall: :headwall: :headwall: :headwall:
User avatar
tobsto occupied
Posts: 140
Joined: 20 Feb 2020, 09:34
GitHub: washingleavesandthen

Re: Request for a script that autostops commands etc. on app focus loss and continue on refocus from where it left off

13 Oct 2020, 14:22

yep still need help on this my dude shall be waiting no rush but just letting you know im counting on ya , since i need your smarts to get this going , im just way to fucking stupid to figure this out aka a working script , thanks :think:
User avatar
tobsto occupied
Posts: 140
Joined: 20 Feb 2020, 09:34
GitHub: washingleavesandthen

Re: Request for a script that autostops commands etc. on app focus loss and continue on refocus from where it left off

25 Oct 2020, 03:19

any news? really need this bad my dude , thanks

Return to “Gaming”

Who is online

Users browsing this forum: Andy-E, gtr, Killedog and 13 guests