Problems with the way Windows handles processess.

meb

New member
Local time
6:03 AM
Messages
1
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

:cool:
 

My Computer

Computer Manufacturer/Model Number
Dell Inspiron 15
OS
Win 7 64x
CPU
Intel Core M370
Memory
8gig
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

View attachment MilesAhead.zip
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Back
Top