Jump to content
Sign in to follow this  

Clicking on button with ControlClick

Recommended Posts


I've bumped on problem on sending controlclick to a minimized client.

I'm trying to use ControlClick on netbalancer software to utilize net performance and I have to click on a few buttons when requirments are met.

There is no controlID on any button, so I used coordinates, it will be run on only one pc with same resolution so using coords is not so hacky solution but now I want to make it work even if client is minimized.

Using same method will only get button highlighted like mouse was howered over it but it wont be clicked.

Do anyone of you have any idea how this can be done or what I'm doing wrong?

Thanks for your time.

Share this post

Link to post
Share on other sites


I installed NetBalancer and got some Classes, but still can't get any button :P

$classes = WinGetClassList(WinGetHandle("[class:WindowsForms10.window.8.app.0.2004eee]" ))
ConsoleWrite($classes & @CRLF)

What are you trying to Click?

Take a look with cmd line, this should probably do what you need without touching anything on UI

How do I silently install NetBalancer?

Run it from the command console as administrator:

NetBalancerSetup.exe /sp- /verysilent /norestart

What are the other command line arguments for NetBalancer Setup?

Right now there are just a few:

/pwd: - sets the password

/priorities_file: - sets the global priorities file

/priorities_file_interval: - sets the global interval at which the priorities file will be re-read

/rules_file: - sets the global rules file

/rules_file_interval: - sets the global interval at which the rules file will be re-read

/serial: - activates NetBalancer during setup

/user_name: - sets the desired user name, that will be shown in About window

API, when?

When it's done.

Where are located all NetBalancer's settings and how to change them?

NetBalancer keeps its settings in a couple of locations, depending on settings type:

  • In registry, at HKEY_CURRENT_USERSoftwareSeriousBitNetBalancer are kept the settings of the GUI and Tray apps.
  • The HKEY_USERSDefaultSoftwareSeriousBitNetBalancer key contains the settings of the NetBalancer's Windows service, except priorities, rules and traffic statistics, which are stored in XML files.
  • The rules are storred in C:ProgramDataSeriousBitNetBalancerRules.xml
  • Priorities are storred in C:ProgramDataSeriousBitNetBalancerPriorities*.xml, where * is the ID of the network adapter, a number that can be negative.
Then there are also some files named C:ProgramDataSeriousBitNetBalancerTraffic*.zip that contain various traffic stats.

You can change any of these settings and files, but first you should stop NetBalancer's service, named "NetBalancerService", otherwise it will replace your own settings on shutdown. After you changed the settings start back the service and NetBalancer will load them (it loads them only at start, and then keeps them in memory.)

Edited by DucViet321

$Money = ControlGetMoney(@Life,"People","Pocket4")If $Money Then $Rich = TrueElse $Risk = True _RunAwayFromPolice("Fastest")EndIf

Share this post

Link to post
Share on other sites

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
Sign in to follow this  

  • Similar Content

    • Yirrlaar
      By Yirrlaar
      #Include <WinAPI.au3> local $ClassName = _WinAPI_GetClassName(WinGetHandle(WinGetTitle("[ACTIVE]"))) ControlClick(WinGetTitle("[ACTIVE]"), "", "[CLASS:"&$ClassName&"; INSTANCE:1]", "primary") When I am running this script it just gives me a ConsoleWrite output of "0x001D04A8"
      When using "AutoIT v3 Window Info" all the info I need for the ControlClick is there and displayed perfectly as if I typed it in normally.
      Upon click the button it should be clicking it, I see the following inn the console window:
      If I replace the $ClassName with the actual ClassName of "WindowsForms10.BUTTON.app.0.3296db7_r14_ad1" it works just fine, any ideas???
    • Tats
      By Tats
      Hi everyone,
      I have a problem with ControlClick function. It doesn't work no matter how I tried all the possible combination of the parameters.
      Below is the scripts of possible parameter combination:
      ;ControlClick("title","text","controlID ","button","clicks","x","y") ;title= Title, Class, Handle ;controlID= Class, ClassNN, Instance ;Title here is empty when I check it with AutoIt Info ControlClick("", "", "[ScreenKeyboard::Button18]", "left", "1", "230","890") ControlClick("", "", "[CLASS:ScreenKeyboard::Button; INSTANCE:18]", "left", "1", "230","890") ControlClick("", "", "[INSTANCE:18]", "left", "1", "230","890") ;Title here is the Class of the window ControlClick("[ScreenKeyboard::SKFrame]", "", "[ScreenKeyboard::Button18]", "left", "1", "230","890") ControlClick("[ScreenKeyboard::SKFrame]", "", "[CLASS:ScreenKeyboard::Button; INSTANCE:18]", "left", "1", "230","890") ControlClick("[ScreenKeyboard::SKFrame]", "", "[INSTANCE:18]", "left", "1", "230","890") ;Title here is the Handle of the window ControlClick("[0x000907A0]", "", "[ScreenKeyboard::Button18]", "left", "1", "230","890") ControlClick("[0x000907A0]", "", "[CLASS:ScreenKeyboard::Button; INSTANCE:18]", "left", "1", "230","890") ControlClick("[0x000907A0]", "", "[INSTANCE:18]", "left", "1", "230","890") Am I coding it correctly?
    • MaximusCZ
      By MaximusCZ
      Hello, and apologies if this have been discussed before, but I googled and couldnt find anything relevant.
      I have a problem where I try to send a control clink into to a window. 
      Part of window I try to send clicks to looks like this . The black border is showing when I mouse over it Au3Info, I get following information:

      I am testing its interaction with code

      The result I get is that it makes control clicks trough first line, opens and closes menus, as expected.
      When It gets to second line, it does not click a single icon. I can tell that coords are correct as the dropdown menus (No view active) gets focused(altough not rolled out). Same behaviour happens if roughly 40<y<60, so I know I am hitting good height. You can look at how it behaves here: output.webm 
      Dropdown 1 focuses at around 8 sec mark, and 13 sec mark it changes to second dropdown, defocusing first one, seemingly not registering any clinks inbetween.
      Have you ever encountered similar behaviour? I need to click the Key button, first on second line, with controlclick (or any other way not hijacking the mouse). I cant trigger that button by keyboard and There is no other control having control over it.
    • Skysnake
      By Skysnake
      I need to automate a specific GUI from a legacy system written in C.
      The spy tool gives me this

      I use this code
      Local $swintit = WinGetTitle("[active]") ConsoleWrite("active Window " & $swintit & @CRLF) If $swintit = "FILES NOTES" Then ; If $swintit = "FILES NOTES" Then ; got Window, now atomate ConsoleWrite("got Window " & @CRLF) ; now focus, then click :) ;EditPaste ;ControlCommand("FILES NOTES", "", 404, $acno) ; paste acno GUICtrlSetState(404, $GUI_Focus) ControlCommand("FILES NOTES", "", 404, $acno) ; paste acno GUICtrlSetState(401, $GUI_Focus) ControlClick("FILES NOTES", "", 401, $acno) ; click okay EndIf ; If $swintit = "FILES NOTES" Then The idea is to paste the acno value into the edit box, then click an Okay button.
      I get a console write that the active Window is as expected, but my loop completes without ever writing anything into the GUI.
      I also tried the control ID as text "404" - same result
      What am I missing?
    • JNutt
      By JNutt

      I'm trying to use mouseclick in a panel above.  I want to click on a list item, such as 'Estimated'.  (I've given up on trying to use control click for this).  I'm using window info coordinates from 'Control' tab.

      ; click 'Columns' WinActivate("Innovaya Studio with Sage (Archtectural 2017_V1.invx") MouseClick("primary", 292, 88, 1, 1) WinActivate("Select Browsing Properties") Sleep(1000) MouseClick("primary", 27, 70, 0,0) Sleep(2000) Send("{TAB}{TAB}{TAB}{TAB}{TAB}") Sleep(1000) Send("{ENTER}") ControlClick( But when I used the code Autoit doesn't click where the coordinates are.  In the scipts it is the second MouseClick that won't work.  Any ideas?