Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

ControlSend Stopped work


  • Please log in to reply
3 replies to this topic
valcrist
  • Members
  • 27 posts
  • Last active: Sep 29 2017 09:16 PM
  • Joined: 09 Sep 2013
Hello everyone.
Yesterday i create a simple script to send a couple of controlsends to the Nox App Player, an android emulator for windows.
 
Today i add a few functions of the code, didnt mess with any bind that had controlsend on it, just add functions that arent even been used.
But after the changes the controlsend stoped working.
The program at first was just:
SetTitleMatchMode,2
F9::
{
ControlSend,,T,Nox
Sleep, 100
ControlSend,,F,Nox
return
}
 
Then i added some functions to get some info of the windows and now the controlsend dont work.
I use W7 x64 and the script is on adm mode.
Already tryed use every possible "ahk_" control that is listed on documentation and none work.
And the funny thing is that i backed up the code to the original (when the controlsend worked) and it just dont want to work anymore.
 
Any help out there?
 
Thanks in advance.


Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012

A few things to check:

 

1) Are you sure you have reloaded your script after saving it in your editor?

2) Are you editing the correct script? Sometimes people copy and paste a script to a new location, edit one copy, but launch the old one.

3) Do you have any other scripts running at the same time? Try suspending/pausing/exiting those and seeing if the problem with this controlsend script persists.

4) Has the Nox App Player been updated on your system between the time the script worked and when it didn't?



valcrist
  • Members
  • 27 posts
  • Last active: Sep 29 2017 09:16 PM
  • Joined: 09 Sep 2013

So, ended every autohotkey process that was open, created a new Autohotkey script on desktop, and the code is just this:

 
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

SetTitleMatchMode,2
SetKeyDelay, 2

F9::
{
	ControlSend,,t, Nox
	return
}

The first 4 lines were automatic generated.

Neither the system or program were updated.

The script is running on adimin mode.

But i can ControlSend to the notepad, but i cant to the Nox.

When i try press the bind F9 the lines are executed but any bind press is show on key history.

On saturday the code was running, i went to sleep. On sunday add a few functions them the script stoped, and now NO SCRIPT can ControlSend to the Nox.

 

There is any other way to send key press to an inactive window?



valcrist
  • Members
  • 27 posts
  • Last active: Sep 29 2017 09:16 PM
  • Joined: 09 Sep 2013

Well, using the window spy i saw what class was the window using, i can do WinMinimize and ControlClick, but i cant use either ControlSend or PostMessage.

 

This work

SetTitleMatchMode,2

F1::
{
	ControlClick,x100 y200, ahk_class Qt5QWindowIcon
	return
}

but when i try

SetTitleMatchMode,2

F2::
{
	ControlSend,,L,ahk_class Qt5QWindowIcon
	return
}

Nothing happens...

 

Anyone have any ideas?

 

Thanks in advance.