ttvish Posted September 16, 2010 Share Posted September 16, 2010 Hi all, I am new to AutoIt. I am writing a script to check the "Windows Security" alert in win -7. I have to check a box ( Always allow software from xxx) and click "install". I have the below script for that : The hotkeys are Alt + a and Alt + i WinActivate("Windows Security") if WinActive("Windows Security") then Send("!a") Sleep(200) Send("!i") sleep(200) EndIf The window gets highlighted, but the controls are not passed. So I tried to use Controlclick instead of Send. Here is the script: winwait("Windows Security") if not WinActive("Windows Security") then winactivate("Windows Security") WinWaitActive("Windows Security") ControlClick("Windows Security","","DirectUIHWND1") sleep(100) ControlClick("Windows Security","","Button1") sleep(100) Exit The first script works perfectly on Win2k8 machine. I am unable to understand the reason why it refuses to work on Win-7. I am stuck on this since 3 days. Any help is appreciated. Thank you. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 16, 2010 Moderators Share Posted September 16, 2010 ttvish,Welcome to the AutoIt forum. I have Vista, not Win 7, so you may wish to ignore this. I would be appalled if you could automate the "Always allow software from xxx" checkbox, or indeed any other item in the Security GUI. After all, what use is a security window that can be bypassed that easily? Even using #RequireAdmin will probably not permit it - and a good thing too in my opinion. Sorry to sound so negative. I will try harder for your next question. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ttvish Posted September 16, 2010 Author Share Posted September 16, 2010 I understand. But when I installed a Broadcom Bluetooth driver in a W2k8 machine , the script worked fine. I guess W2K8 and Win-7 are mostly similar in security perspective. Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 16, 2010 Share Posted September 16, 2010 Windows Server does not activate UAC like workstation versions do. I know this from experience. Link to comment Share on other sites More sharing options...
leonwang Posted April 9, 2019 Share Posted April 9, 2019 ttvish, I encounter the same issue in win-7 system when runing send("!a") and send("!i") on "Windows Security" window. The script send hotkeys can't work in win-7. Do you have any solution about this issues? Thanks. Link to comment Share on other sites More sharing options...
Earthshine Posted April 9, 2019 Share Posted April 9, 2019 Win7 and sever 2008 are pretty similar codebase. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
jdelaney Posted April 10, 2019 Share Posted April 10, 2019 (edited) turn off UAC, or add in this to your script: #requireadmin Edited April 10, 2019 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
leonwang Posted April 11, 2019 Share Posted April 11, 2019 Jdelaney, I have add #requireadmin in the script. But it doesn't work. The send("!a") and send("!I") script have no effect. Thanks. Link to comment Share on other sites More sharing options...
jdelaney Posted April 11, 2019 Share Posted April 11, 2019 how about controlclick. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
AdamUL Posted April 11, 2019 Share Posted April 11, 2019 Have a look at this post. Adam 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