Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automated process manipulation; close tray app
#2
http://www.quickmacros.com/forum/showthr...rocessesEx


Function RestartProcessNotepad
Code:
Copy      Help
str ProcessName="notepad"

run F"{ProcessName}.exe"
int pid=ProcessNameToId(ProcessName)
if pid
,2
,ShutDownProcess pid 1 ;; or clo "process window"
,rep() 0.1; if(!ProcessNameToId("ProcessName")) break ;;waits
,mes "CLOSED, Click OK to relaunch"
,run F"{ProcessName}.exe"

You'll have to figure out what your process name is for the program. Use Task Manager for that.

Function CreateScheduledTaskNotepad
Code:
Copy      Help
ScheduleMacro "RestartProcessNotepad" "17:00" "" "" 0 1 ;;run every day at 5p

Above uses QM to create the task in Windows Task Scheduler.


Messages In This Thread
RE: Automated process manipulation - by TheVig - 06-17-2018, 02:25 PM
RE: Automated process manipulation - by Ethereal - 06-17-2018, 03:22 PM
RE: Automated process manipulation - by Gintaras - 06-18-2018, 05:49 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)