Jump to content

Recommended Posts

Posted

I am attempting to use a game controller / joystick to interface to a control window. The control window has some button controls that I can successfully "click" with

   Local $hWnd = WinWaitActive("Control Window", "", 10)
   ControlClick($hWnd, "", "[ID:38]")

 

The problem is the button needs to be held down for a few hundred milliseconds to properly register in the software (it appears to have a software denounce of some kind).

Is there a way to use the above command and "hold it" for a period of time???

If there is not a more elegant solution, I will just have to get creative and manipulate the window and mouse cursor / MouseDown Sleep MouseUp etc.

Posted
3 hours ago, JupiterAV said:

needs to be held down for a few hundred milliseconds to properly register

Maybe it is your code if you can show us...

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Posted (edited)
On 11/23/2018 at 5:16 PM, JupiterAV said:

   Local $hWnd = WinWaitActive("Control Window", "", 10)
   ControlClick($hWnd, "", "[ID:38]")

The above code is it.... I have run just the above code on its own to troubleshoot.

****************************************************************

AUINFO

>>>> Window <<<<
Title:    Control Window
Class:    ThunderRT6MDIForm
Position:    -4, -4
Size:    1608, 878
Style:    0x17CF0000
ExStyle:    0x00040100
Handle:    0x000203D8

>>>> Control <<<<
Class:    ATL:6077E570
Instance:    1
ClassnameNN:    ATL:6077E5701
Name:    
Advanced (Class):    [CLASS:ATL:6077E570; INSTANCE:1]
ID:    38
Text:    HOME
Position:    911, 310
Size:    57, 25
ControlClick Coords:    26, 10
Style:    0x54012001
ExStyle:    0x00000000
Handle:    0x000207C8

*****************************************************************

There are three "controls" / buttons in the window that need to be "clicked" 

one is ID: "38" , it works fine as it is not "debounced" ID: 36 and ID:37 do not work. Using the mouse, the buttons for 36 & 37 needs to be pressed for a few hundred milliseconds (almost a full second) to register correctly.

MouseClickDownDelay & SendKeyDownDelay do not appear to affect the "ControlClick()" function.

 

Edited by JupiterAV
  • Moderators
Posted

@JupiterAV What precisely are you trying to automate with this joystick control?

 

***In case you missed it, this is a Moderator stepping into a thread***

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...