Jump to content

Alt C not working


Recommended Posts

ControlSend() if you are sending text to an input.

ControlClick() if you are wanting to click (activate) a button.

Link to comment
Share on other sites

On 2.4.2016 at 2:43 AM, willichan said:

ControlSend() if you are sending text to an input.

ControlClick() if you are wanting to click (activate) a button.

Yes, both working in my tests but only when #RequireAdmin is used:

#include <Array.au3>

#RequireAdmin

Run('control.exe sysdm.cpl')
$hWnd=WinWaitActive('[CLASS:#32770]','Computername',5)
ConsoleWrite('Windowstitel:' & @TAB&WinGetTitle($hWnd)&@CRLF)
ConsoleWrite('Buttontext:'  & @TAB&ControlGetText($hWnd,'',115)&@CRLF)
WinActivate($hWnd)
;ConsoleWrite('Send return val: '&ControlSend($hWnd,'',115,'!n')&@CRLF)
ConsoleWrite('Click return val:: '&ControlClick($hWnd,'',115)&@CRLF)

I tested before without and it don't works. I found no solution, so i asked in my home forum and got the hint to try #RequireAdmin and yet it works. The script showed also success for ControlSend and ControlClick before inserting #RequireAdmin but nothing happened.

Edited by AutoBert
Link to comment
Share on other sites

1 hour ago, AutoBert said:

Yes, both working in my tests but only when #RequireAdmin is used:

Makes sense, since local admin rights are needed to rename a PC or add it to a domain.

Link to comment
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
 Share

  • Recently Browsing   0 members

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