Problems with the way Windows handles processess.


  1. meb
    Posts : 1
    Win 7 64x
       #1

    Problems with the way Windows handles processess.


    Well here they are, I'm a little hard of english; but I tried to phrase them the best I could:
    In Windows 7 Ultimate 64X is their anyway to have another follow in the foot steps of 'explorer.exe' i.e. meaning that it will start or restart another whens starts.


    I run an auto text completion program; every so often it goes idle and I have to manually end the process and restart it.. Is their anyway to have the operating system do for me?



    Sincerely,
    Matthew Edward Becker

      My Computer


  2. Posts : 205
    Windows 7 Home Premium
       #2
      My Computer


  3. Posts : 5,092
    Windows 7 32 bit
       #3

    The code is untested. The way it should work is you click on the window of the program you wish to kill and restart to make it the active window. Then press hotkey Control Shift F12. Of course the program must be running in the tray to catch the hotkey press. You should be prompted you wish to restart the program. If you click Yes the program is closed. After 3 seconds it is run. There won't be any command line arguments as they cannot be gotten consistently enough to depend on that behavior.

    Anyway give the script a try. The atatched file MilesAhead.ahk should be in the same folder as this script. Save this script with an ahk extension. Maybe Restart.ahk

    Go to AutoHotkey for free ahk tools.

    Code:
    #Include MilesAhead.ahk
    ppath := ""
    pname := ""
    ;for now use Control Shift F12 as hotkey
    ^+F12::
    ppath := WinGetProcessPath("A")
    if (ErrorLevel)
    {
      SoundPlay,*16
      return
    }
    pname := _FileName(ppath)
    Process,Exist,%pname%
    If (! ErrorLevel)
    {
      SoundPlay,*16
      return
    }
    MsgBox,4,Application Restarter,Restart %ppath%  ??
    If MsgBox Yes
    {
      Process, Close,%pname%
      Sleep, 3000
      Run,%ppath%
    }
    return
    MilesAhead.zip
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:03.
Find Us