I want to adjust script

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
abdohhh
Posts: 113
Joined: 25 Apr 2023, 05:50

I want to adjust script

Post by abdohhh » 08 Dec 2023, 15:56

i want to edit this script if you find any erorr in it without repat the same information without any need for that, the conept of this script is simple when see one of these color inside edge and inside spesfic coordinates just minmize chrome as soon as poosible because i need chrome window to be minmized before screen recorder in my company pc capture it :

Code: Select all

SetTimer(MaxWin2, 200)

 MaxaWin2() {


	CoordMode "Pixel", "Screen"
	try  {
		if (PixelSearch(&X2, &Y2, 192, 135, 192, 135 ,0x1FA189,20))

    		WinMinimize "ahk_exe chrome.exe"
	}
try  {
		if (PixelSearch(&X2, &Y2, 192, 135, 192, 135 ,0x2f72cb,20))

    		WinMinimize "ahk_exe chrome.exe"
	}
 try {
		if (PixelSearch(&X2, &Y2, 192, 135, 192, 135 ,0xC83636,20))

    		WinMinimize "ahk_exe chrome.exe"
	}

}

abdohhh
Posts: 113
Joined: 25 Apr 2023, 05:50

Re: I want to adjust script

Post by abdohhh » 09 Dec 2023, 14:16

Is there any one can help me ?

emp00
Posts: 175
Joined: 15 Apr 2023, 12:02

Re: I want to adjust script

Post by emp00 » 09 Dec 2023, 14:30

@abdohhh Please describe what exactly is the problem with the script? Which "screen recorder" are you referring to?

abdohhh
Posts: 113
Joined: 25 Apr 2023, 05:50

Re: I want to adjust script

Post by abdohhh » 09 Dec 2023, 17:23

@emp00
screen recorder is the program og my company that records the screen when these colors shows on screen so i minimize chrome when see these color to be able to open external links The problem in this script is that it works sometimes, stops from it's self, and doesn't minimize Chrome. I don't know why! i think there's a problem in syntax

Post Reply

Return to “Ask for Help (v2)”