Windows 10: How to run task when app is open and close it when app is closed?

Discus and support How to run task when app is open and close it when app is closed? in Windows 10 Support to solve the problem; Hi there, I'd like to know how I can run a specific file (a single executable that runs in the background by default/AHK script) the moment a... Discussion in 'Windows 10 Support' started by CntrlAltDel, Mar 1, 2018.

  1. How to run task when app is open and close it when app is closed?


    Hi there,

    I'd like to know how I can run a specific file (a single executable that runs in the background by default/AHK script) the moment a specific program launches and close when that app is closed

    Windows 10 Pro x64

    Kind regards

    :)
     
    CntrlAltDel, Mar 1, 2018
    #1

  2. App with no name preventing shutdown.

    When you open the task manager it says there are no apps running. When you then close task manager and immediately try to shut down (or restart) the computer, it says there is an unnamed app preventing you from shutting down.
     
    mickmack_68, Mar 1, 2018
    #2
  3. Task Bar APPS

    My computer is slow at start up. When I open task manage it shows multiple apps running. Many of the apps have my name next to them and shows they are running. Example, the task bar shows 6 Chrome apps running. Can I delete these or close them?
     
    GeraldBenoit, Mar 1, 2018
    #3
  4. dalchina New Member

    How to run task when app is open and close it when app is closed?

    Use this statement to test for the presence/ absence of the process in an appropriate loop.

    How to run task when app is open and close it when app is closed? [​IMG]


    Within an endless loop:

    In loop 1:
    if the positive test is true launch the program (whatever that may be)
    In loop2:
    If the process ceases to exist, close the program.


    How to run task when app is open and close it when app is closed? [​IMG]


    Autohotkey comes with extensive help. It's easy to try things with it, but some simple things may take multiple attempts.

    If unfamiliar, just try a single statement at a time- e.g. a script which launches your program, then closes it.
    Then move on to IfWinexist
    etc.
    There's an active forum dedicated to Autohotkey.
     
    dalchina, Mar 1, 2018
    #4
Thema:

How to run task when app is open and close it when app is closed?

Loading...
  1. How to run task when app is open and close it when app is closed? - Similar Threads - run task app

  2. How to get an app to snap to the place it was when I closed it?

    in Windows 10 Customization
    How to get an app to snap to the place it was when I closed it?: I use the snap to side or quadrant of screen frequently. I would very much like if Windows would remember where they were snapped when I closed them so that next time I open the app it opens where it was at. As a work around I will manually position the window "close" to...
  3. Close process when a separate process closes

    in Windows 10 Software and Apps
    Close process when a separate process closes: So I use task scheduler to run a specific file (c:\Newfile.exe) when a specific program is being started (c:\Program.exe). I'd like to know how I can close "Newfile.exe" when "Program.exe" closes. I know this can't be done with task scheduler, does anyone know of a way to...
  4. WHEN OPENING A FILE FOLDER AND CLOSING IT

    in Windows 10 Network and Sharing
    WHEN OPENING A FILE FOLDER AND CLOSING IT: WHEN I OPEN A FILE FOLDER AND THEN SUCCESSIVE FOLDERS CONTAINED WITHIN THE FIRST ONE I FIND THAT IN ORDER TO CLOSE OUT I MUST CLOSE MULTIPLE FOLDERS. I WANT TO MAKE IT SO THAT I CAN CLOSE ONE FOLDER AND BE DONE WITH IT. I AM SEARCHING FOR A SETTING TO FIX THIS ISSUE....
  5. return to start screen when closing an app

    in Windows 10 Customization
    return to start screen when closing an app: How can I get windows 10 to return to the start screen instead of the desktop when I close an app? Seems strange that we are forced to use the desktop after win 10 has being touted as the next big thing! Answers anyone? Please?...
  6. mikrosoft programs close when opened

    in Windows 10 Software and Apps
    mikrosoft programs close when opened: so i have gotten a problem with my microsoft programs, like calculator, the mail program, and one note(these are the one i have tryed) i have had this problem for over 2 months now. it dosn't have huge effekts on y life but, it has some annoying parts....
  7. Some apps opens then closes immediately.

    in Windows 10 Software and Apps
    Some apps opens then closes immediately.: I don't know where to report problems with applications from Windows Store but - Facebook, Instagram and Messenger doesn't work after April Update. All of these apps opens then closes immediately. Anybody else have a similar problem? *Confused Windows Apps Troubleshooter...
  8. MS Edge runs in the background when Closed ..

    in Browsers and Email
    MS Edge runs in the background when Closed ..: I have tryed everything to prevent it from running in the Background and when it is running in the Background there are 2 files associated with the name [Runtime broker] under MS Edge.. any way to close these when i close Edge.. or should i leave it like it is? :P 107449
  9. edge&xbox app close when opening; cortana responds ONLY @1st

    in Windows 10 Software and Apps
    edge&xbox app close when opening; cortana responds ONLY @1st: I didnt find a subforum that really fit problem, so if its in the wrong place my apologies &feel free to move it. I have a toshiba laptop upgraded to windows 10. Suddenly about a week ago my start menu, Cortana, & several other windows apps (calculator, etc) stopped opening...
  10. All apps close when I close laptop lid - why?

    in Windows 10 Support
    All apps close when I close laptop lid - why?: The Low battery action is set to Hibernate, and Battery notification is On for both battery and plugged in modes. Mike