Autohotkey 像素仅在中间区域搜索?

Autohotkey 像素仅在中间区域搜索?,autohotkey,Autohotkey,所以我在玩Ragna游戏,我想在平衡我的角色的同时享受一段时间。我的脚本做得很好,但是我如何才能只搜索/攻击中间区域 这是照片 您应该了解PixelSearch参数的含义: 资料来源: 所以你现在正在做的是创建一个从0,0到screenWidth,screenHeight的框。当然,您可以将其更改为硬编码值,或者根据分辨率进行一些计算,例如选择中间的200x200px框: leftBound := A_ScreenWidth / 2 - 100 rightBound := A_Scre

所以我在玩Ragna游戏,我想在平衡我的角色的同时享受一段时间。我的脚本做得很好,但是我如何才能只搜索/攻击中间区域

这是照片


您应该了解PixelSearch参数的含义:

资料来源:

所以你现在正在做的是创建一个从0,0到screenWidth,screenHeight的框。当然,您可以将其更改为硬编码值,或者根据分辨率进行一些计算,例如选择中间的200x200px框:

leftBound   := A_ScreenWidth  / 2 - 100
rightBound  := A_ScreenWidth  / 2 + 100
topBound    := A_ScreenHeight / 2 - 100
bottomBound := A_ScreenHeight / 2 + 100

PixelSearch, X, Y, leftBound, topBound, rightBound, bottomBound, 0x00FF00, 0, fast

我不知道中间到底是什么坐标。我怎么知道确切的中间坐标呢?好吧,假设你想在显示器中间选择一个200x200px的矩形,这个例子就可以了。屏幕宽度/2当然在显示器的中间,对吗?PixelSearch,X,Y,0,0,%A_屏幕宽度/2%,A_屏幕高度/2%,0x00FF00,0,fastim不是真正的全屏..在游戏窗口模式下使用CoordMode,Pixel,Relative,1024 X 768怎么样?我不确定,试试看。我想它应该像你期望的那样工作,用WindowSpy测量坐标。右键单击任务栏中的任何AHK脚本并选择它,打开WindowSpy。//我建议你再看看
PixelSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ColorID [, Variation, Fast|RGB]
leftBound   := A_ScreenWidth  / 2 - 100
rightBound  := A_ScreenWidth  / 2 + 100
topBound    := A_ScreenHeight / 2 - 100
bottomBound := A_ScreenHeight / 2 + 100

PixelSearch, X, Y, leftBound, topBound, rightBound, bottomBound, 0x00FF00, 0, fast