Peter2004 Posted May 11, 2021 Share Posted May 11, 2021 My Step is simple, 1) Open IE 2) When prompt with "Security Alert", click a specific button 3) then it will load into another page, prompt for password. The issue is the "Security Prompt" always stays behind, image below. I cannot get it to focus and hence the script hang / stop. But when i click on the security prompt, the script able to continue. hey guys, will need a simple solution to bring the security prompt box up (instead of IE). Thanks. Quote #include <IE.au3> #include <MsgBoxConstants.au3> Global $oIE = _IECreate("https://hvpn.sg") WinWaitActive ('Security Alert') WinActivate ('Security Alert') sleep (200) ControlClick ("Security Alert","","[CLASS:Button; INSTANCE:1]","Primary") sleep (20) WinWaitActive ('Security Alert') WinActivate ('Security Alert') ControlClick ("Security Alert","","[CLASS:Button; INSTANCE:1]","Primary") WinActivate ('hvpn.sg - Internet Explorer') WinWaitActive ('hvpn.sg - Internet Explorer') sleep (500) Link to comment Share on other sites More sharing options...
Nine Posted May 11, 2021 Share Posted May 11, 2021 Can you show the au3info.exe tool of that security alert window ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
major_lee Posted May 11, 2021 Share Posted May 11, 2021 2 hours ago, Nine said: Can you show the au3info.exe tool of that security alert window ? Yes. Also to consider Function ControlFocus (autoitscript.com) For a fast simple button "ok" click I would consider. Local $hWnd = WinGetHandle("Security Alert", "") ControlSend($hWnd, "", "", "{ENTER}") I can't tell what is going on their so idk really. Link to comment Share on other sites More sharing options...
Nine Posted May 11, 2021 Share Posted May 11, 2021 9 minutes ago, major_lee said: Yes. I meant show it here ! “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
major_lee Posted May 11, 2021 Share Posted May 11, 2021 (edited) 3 minutes ago, Nine said: I meant show it here ! Oh, I was just agreeing, I am not sure i can help.I can't tell what is going on there so idk really. Edited May 11, 2021 by major_lee Link to comment Share on other sites More sharing options...
Nine Posted May 11, 2021 Share Posted May 11, 2021 Oh you are not OP. major_lee 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Peter2004 Posted May 12, 2021 Author Share Posted May 12, 2021 Does this help? thanks alot for all the assistance given. Link to comment Share on other sites More sharing options...
Peter2004 Posted May 12, 2021 Author Share Posted May 12, 2021 4 minutes ago, Peter2004 said: Does this help? thanks alot for all the assistance given. Link to comment Share on other sites More sharing options...
Peter2004 Posted May 12, 2021 Author Share Posted May 12, 2021 Sorry, Above Image i think i screenshot for button 3 - "Do not allow....", The script and I needs to click on button 1 - "Add this site to your trusted ....." Link to comment Share on other sites More sharing options...
spudw2k Posted May 12, 2021 Share Posted May 12, 2021 (edited) I suspect the WinWaitActive lines before WinActivate are the problem (waiting for window to active). What if you put the WinActivate lines first (before WinWaitActivate)? Also, it seems like the best solution to overcome this would be to add the site as a trusted site in IE; that way you wouldn't even have to worry about the security alert window. Is that not an option? Edited May 12, 2021 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Peter2004 Posted May 14, 2021 Author Share Posted May 14, 2021 (edited) Thanks for the suggestion. However, this is a work-station and i am not the admin ,therefore unable adjust the setting as it is locked by Admin. This is the only way, to click. Because i amd trying out any difference between swapping the command to which is first, WinActivate / WinWaitActivate, but no luck, issue remains. On 5/12/2021 at 9:57 AM, spudw2k said: I suspect the WinWaitActive lines before WinActivate are the problem (waiting for window to active). What if you put the WinActivate lines first (before WinWaitActivate)? Also, it seems like the best solution to overcome this would be to add the site as a trusted site in IE; that way you wouldn't even have to worry about the security alert window. Is that not an option? Edited May 14, 2021 by Peter2004 Link to comment Share on other sites More sharing options...
JockoDundee Posted May 14, 2021 Share Posted May 14, 2021 Why do you think you would be able to automate a security question on a machine which you don’t have full rights on? major_lee 1 Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Peter2004 Posted May 17, 2021 Author Share Posted May 17, 2021 This security question is just one part of the whole automation process. I may not have a full admin rights but the process for using the laptop is the same as a user. I have do the same process in order to use the laptop and i believe using Autoit can automate such process by minimize clicks, which increase productivity. And i also believe that the windows focus issue i am having may not be related to the Admin rights. On 5/14/2021 at 11:09 PM, JockoDundee said: Why do you think you would be able to automate a security question on a machine which you don’t have full rights on? Link to comment Share on other sites More sharing options...
Solution JockoDundee Posted May 17, 2021 Solution Share Posted May 17, 2021 1 minute ago, Peter2004 said: ...and i believe using Autoit can automate such process... Well, it often can. However, there are well known limitations in regards to interacting with system tools and prompts when not running with elevated permissions. For instance, even though a regular user may launch Task Manager and do various things, all interactions cannot be automated when logged in as a regular user, though it can for an authorized user. Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Peter2004 Posted May 28, 2021 Author Share Posted May 28, 2021 I see. Thanks for the advice on the admin rights. On 5/17/2021 at 10:00 AM, JockoDundee said: Well, it often can. However, there are well known limitations in regards to interacting with system tools and prompts when not running with elevated permissions. For instance, even though a regular user may launch Task Manager and do various things, all interactions cannot be automated when logged in as a regular user, though it can for an authorized user. 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