Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automated process manipulation; close tray app
#3
It almost works but I have two problems:

1) ShutDownProcess kills the process without doing cleanup (orphan systray icon left)
I would prefer to shutdown the process regularly, ie. by simulating the Quit command from systray icon context menu
Probably it is done by PostMessage hwnd WM_COMMAND ? ?
Now I need to know how can I trigger which WM params are used on Quit menu item invoke

2) siz command isnot working tho hwnd has apaprently valid value and the window is visible




Code:
Copy      Help
int pid = ProcessNameToId("pushbullet_client")
if pid
    ShutDownProcess pid 1
    rep() 0.1; if(!ProcessNameToId("pushbullet_client")) break ;;waits
    run "C:\Program Files (x86)\Pushbullet\pushbullet.exe"
    wait 0 WA "Pushbullet"
    int hwnd = win("Pushbullet" "HwndWrapper[pushbullet_client.exe;*" "pushbullet_client")
    if hwnd
        siz 800 1100 hwnd 3
        clo hwnd


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)