minimize/hide a process

Get help with using AutoHotkey and its commands and hotkeys
ZippyDSMlee
Posts: 9
Joined: 04 Oct 2016, 21:19
Facebook: https://www.facebook.com/ZippyDSMlee

minimize/hide a process

29 Dec 2016, 23:15

So I am trying to minimize/hide a process but I am missing something


Code: Select all

#SingleInstance, force

Loop
{
Sleep 50000 ; This time is set for every 7 minutes.
Process, Exist, wmrecorder.exe
If (ErrorLevel = 0)
 {
SetWinDelay, -1
Run, % "D:\users-zippydsmlee-win8,1\WMR16\wmrecorder.exe",,Hide
WinWait, ahk_pid %pid%
WinMinimize

 }
 Else
 {
 Sleep 500000
 }
}
Return

Incoherence is mew friend =0-o=
JJohnston2
Posts: 193
Joined: 24 Jun 2015, 23:38

Re: minimize/hide a process

30 Dec 2016, 02:59

Looks like your pid variable would be null at the WinWait statement since you didn't add it as an argument to the Run command.
just me
Posts: 7303
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: minimize/hide a process

30 Dec 2016, 03:20

Also, if there's actually a comma , in your path, you need to escape it.

Edit: Overlooked the %.
ZippyDSMlee
Posts: 9
Joined: 04 Oct 2016, 21:19
Facebook: https://www.facebook.com/ZippyDSMlee

Re: minimize/hide a process

30 Dec 2016, 03:53

whats the minimum needed for a hide or minimize command in ahk? I might be trying to over complicate it ><
Incoherence is mew friend =0-o=

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], boiler, hasantr, mikeyww, robertmiller, Xtra and 48 guests