Send click to Nox client

Get help with using AutoHotkey and its commands and hotkeys
fufualex
Posts: 1
Joined: 14 Sep 2020, 00:15

Send click to Nox client

14 Sep 2020, 00:25

Hi,

I'm new to AHK I want send click to Nox player without using my real mouse. I also did research of using this 2 method ControlClick or ControlSend but doesn't work.

Below is my original code:

Code: Select all


#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Client
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
DetectHiddenWindows Off
DetectHiddenText On
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1


#IfWinActive NoxPlayer

F7::
Macro1:
Loop
{
    label1:
    /*
    Sleep, 500
    */
    Click, 261, 212 Left, 1
    Loop, 10
    {
        CoordMode, Pixel, Window
        PixelSearch, FoundX, FoundY, 326, 219, 845, 305, 0xFFFFFF, 0, Fast RGB
    }
    Loop, 10
    {
        CoordMode, Pixel, Window
        PixelSearch, FoundX, FoundY, 326, 219, 845, 305, 0xFFFFFF, 0, Fast RGB
    }
    If ErrorLevel
    {
        Goto, label2
    }
    Else If ErrorLevel = 0
    {
        Click, 356, 243 Left, 4
        Click, 356, 243 Left, 4
    }
    label2:
    #continue coding
    /*
    Sleep, 500
User avatar
boiler
Posts: 6237
Joined: 21 Dec 2014, 02:44

Re: Send click to Nox client

14 Sep 2020, 09:35

Is NoxPlayer really in your window title? It’s not for mine, but it may be because I’ve named my Nox windows in their setup. Regardless, the following should correctly identify the window:

Code: Select all

#IfWinActive ahk_class Qt5QWindowIcon ahk_exe Nox.exe
...and use the same WinTitle for ControlClick. I have used PostMessage to click in inactive Nox windows, but ControlClick should also be able to do it when the title is identified correctly as well.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], wineguy, WuffTheCoder and 40 guests