willichan Posted April 2, 2016 Share Posted April 2, 2016 ControlSend() if you are sending text to an input. ControlClick() if you are wanting to click (activate) a button. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
AutoBert Posted April 3, 2016 Share Posted April 3, 2016 (edited) 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 April 3, 2016 by AutoBert Link to comment Share on other sites More sharing options...
willichan Posted April 3, 2016 Share Posted April 3, 2016 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. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now