my script isnt closing another script Topic is solved

Ask gaming related questions (AHK v1.1 and older)
duduzera1
Posts: 21
Joined: 05 Jul 2021, 02:17

my script isnt closing another script

05 Jan 2022, 14:39

This script i wrote isnt closing "5AMULETO.exe"
It used to work, same script... when it was unpaused by pressing prnt scr it closed the file
ive also tried "5AMULETO.exe" (with the """"), and it still doesnt work
help !!!! :D

Code: Select all

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
SetNumLockState, AlwaysOn
SetCapsLockState, AlwaysOff
DetectHiddenWindows, On

pause
Suspend

WinClose, 5AMULETO.exe

If WinActive("ahk_class Qt5QWindowOwnDCIcon")

Loop
{
	imagesearch,x,y,0,0,1920,1080, *25 amulet.png
	if errorlevel=0
	{
		send {Insert}
		sleep 200
	}
	imagesearch,x,y,0,0,1920,1080, *25 ring.png
	if errorlevel=0
	{
		send {Delete}
		sleep 200
	}
	
}

WinClose, 5AMULETO.exe

PrintScreen::

pause
Suspend
return
User avatar
YoucefHam
Posts: 372
Joined: 24 Aug 2015, 12:56
Location: Algeria
Contact:

Re: my script isnt closing another script  Topic is solved

05 Jan 2022, 15:50

duduzera1 wrote:
05 Jan 2022, 14:39
This script i wrote isnt closing "5AMULETO.exe"
It used to work, same script... when it was unpaused by pressing prnt scr it closed the file
ive also tried "5AMULETO.exe" (with the """"), and it still doesnt work
help !!!! :D
.................
Try to use WinTitle

Code: Select all

WinClose, ahk_exe 5AMULETO.exe
:wave: There is always more than one way to solve a problem. ;)
User avatar
mikeyww
Posts: 27191
Joined: 09 Sep 2014, 18:38

Re: my script isnt closing another script

05 Jan 2022, 23:18

When you pause the script, by definition, the subsequent commands do not execute.

An infinite loop without a break or hotkey interruption will continue to repeat, because that is how a loop works. Subsequent commands will not be reached.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 29 guests