Firing WinMinimize untill window is minimized

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Heihachi88
Posts: 29
Joined: 09 Aug 2018, 11:24

Firing WinMinimize untill window is minimized

12 Aug 2018, 00:54

Code: Select all

Process, wait, Boostnote.exe, 1
NewPID = %ErrorLevel%
if NewPID = 0
{
	Run, "C:\Users\Alexander\AppData\Local\boost\Boostnote.exe",, Min, PID
	WinWait, Boostnote
	Sleep, 10000
	WinMinimize
}

return
I use Sleep now to successfully minimize the window on startup (this script launches on startup via task scheduler). WinWait is somehow not working. Is it possible to loop WinMinimze untill my window is actually minimized?
iseahound
Posts: 1446
Joined: 13 Aug 2016, 21:04
Contact:

Re: Firing WinMinimize untill window is minimized

12 Aug 2018, 03:03

It looks like an electron app, so just use the --minimized flag.

Code: Select all

Run, % "C:\Users\Alexander\AppData\Local\boost\Boostnote.exe  --minimized"
or without quotes and a percent sign (these two are equal)

Code: Select all

Run, C:\Users\Alexander\AppData\Local\boost\Boostnote.exe  --minimized
Source: https://peter.sh/experiments/chromium-c ... -switches/

Tip: Try to avoid the electron framework, which is the unholy synthesis of Node.js + Chromium.
Heihachi88
Posts: 29
Joined: 09 Aug 2018, 11:24

Re: Firing WinMinimize untill window is minimized

12 Aug 2018, 04:05

Sadly, but --minimized has no effect on it.
YMP2
Posts: 48
Joined: 20 Apr 2014, 06:55

Re: Firing WinMinimize untill window is minimized

12 Aug 2018, 11:02

Have you tried WinWaitActive? It seems to work.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 218 guests