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. ms edge running even when the app is closed

    in Windows 10 Software and Apps
    ms edge running even when the app is closed: Recently, pc encountered a very strange error where ms edge keeps playing even though it's not been opened. I know that edge keeps running in the background but it keeps on starting abruptly where and everytime it starts i see youtube is running on the app and can even hear...
  3. ms edge running even when the app is closed

    in Windows 10 Gaming
    ms edge running even when the app is closed: Recently, pc encountered a very strange error where ms edge keeps playing even though it's not been opened. I know that edge keeps running in the background but it keeps on starting abruptly where and everytime it starts i see youtube is running on the app and can even hear...
  4. ms edge running even when the app is closed

    in Windows 10 Drivers and Hardware
    ms edge running even when the app is closed: Recently, pc encountered a very strange error where ms edge keeps playing even though it's not been opened. I know that edge keeps running in the background but it keeps on starting abruptly where and everytime it starts i see youtube is running on the app and can even hear...
  5. Apps open when closing another window

    in Windows 10 Gaming
    Apps open when closing another window: I have been dealing with a recent issue on multiple devices after upgrading to windows 11. I am very confused if this is the apps themselves or windows 11 just being buggy. But when I keep multiple windows open. Eventually after closing 1 of them, another app on my computer...
  6. Apps open when closing another window

    in Windows 10 Software and Apps
    Apps open when closing another window: I have been dealing with a recent issue on multiple devices after upgrading to windows 11. I am very confused if this is the apps themselves or windows 11 just being buggy. But when I keep multiple windows open. Eventually after closing 1 of them, another app on my computer...
  7. Apps closing when laptop lid is closed

    in Windows 10 Performance & Maintenance
    Apps closing when laptop lid is closed: I recently purchased a Microsoft Surface and all my open apps force close when the laptop lid has been closed overnight. I've checked all previous solutions posted on this site and nothing works. Very Annoying, can someone help resolve asap? ? It really shouldn't be this...
  8. Automatically close certain apps when a specific app opens

    in Windows 10 BSOD Crashes and Debugging
    Automatically close certain apps when a specific app opens: Hello everyone, I'm trying to make it so some apps close when a specific app opens because the apps running in background take an accessive amount of memory on my computer and affect the performance of my computer. I'm thinking of a program that may be on Powershell or a...
  9. Apps are closed automatically when I running game

    in Windows 10 Customization
    Apps are closed automatically when I running game: When a game is opened, Windows optimized the gaming performance by closing apps and suspending processes to optimize the performance. Adobe Acrobat Reader is closed when I opened my game. Is there any way to not allow Windows to close specific apps or disable this feature?...
  10. Run a task when i open an app

    in Windows 10 BSOD Crashes and Debugging
    Run a task when i open an app: Hi I wanted to run a task when i open an app and end it when i close it Here is a task made my friend This start a app when another is started https://superuser.com/questions/745318/how-to-start-a-program-when-another-one-is-started I wanted to incorperate this task...