freelancesam Posted July 25, 2008 Share Posted July 25, 2008 Im using _IENavigate to go to a wepage which redirects to an SSL page. When it redirects to the page a popup comes up asking whether to allow non secured content. This isn't important but the page wont redirect unless I answer it, so is there a way to just click yes, no or close the box? Link to comment Share on other sites More sharing options...
Andreik Posted July 25, 2008 Share Posted July 25, 2008 Try to set delay time and then Send("ENTER}") For example: Sleep(1000) Send("{ENTER}") When the words fail... music speaks. Link to comment Share on other sites More sharing options...
freelancesam Posted July 25, 2008 Author Share Posted July 25, 2008 (edited) is that the only way to do it?? this script needs to be as quick and reliable as possible edit: just tried that, it doesn't work because the ssl page is a redirected page, so it won't let me do anything until the page has loaded. Is there a way i can run some sort of if / then statement where if it detects the box it sends the enter key? Edited July 25, 2008 by freelancesam Link to comment Share on other sites More sharing options...
Andreik Posted July 25, 2008 Share Posted July 25, 2008 is that the only way to do it?? this script needs to be as quick and reliable as possibleFortunately it`s no only way, maybe someone can help you more.What is title of box? When the words fail... music speaks. Link to comment Share on other sites More sharing options...
freelancesam Posted July 25, 2008 Author Share Posted July 25, 2008 im not sure what you mean by "title" but the header caption thing is "Security Information". Link to comment Share on other sites More sharing options...
Andreik Posted July 25, 2008 Share Posted July 25, 2008 Try something like that: If WinExists("Security Information") Then WinActivate("Security Information") WinWaitActive("Security Information") Send("{ENTER}") EndIf When the words fail... music speaks. Link to comment Share on other sites More sharing options...
freelancesam Posted July 25, 2008 Author Share Posted July 25, 2008 Try something like that: If WinExists("Security Information") Then WinActivate("Security Information") WinWaitActive("Security Information") Send("{ENTER}") EndIf where can i put that?? I need it to be running that all the time while the iexplorer window is created Link to comment Share on other sites More sharing options...
Andreik Posted July 25, 2008 Share Posted July 25, 2008 where can i put that?? I need it to be running that all the time while the iexplorer window is createdAdlibEnable() When the words fail... music speaks. Link to comment Share on other sites More sharing options...
freelancesam Posted July 26, 2008 Author Share Posted July 26, 2008 is there another way?? this works, but while the script is running, the keyboard keeps pressing enter, regardless of whether it finds the window. Link to comment Share on other sites More sharing options...
DaleHohm Posted July 26, 2008 Share Posted July 26, 2008 There is an example of this in the Snippets database in the IE section... see my sig. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Varian Posted July 26, 2008 Share Posted July 26, 2008 (edited) Create a new Script that is started automatically from your Main script. Here is sample code. Opt('WinTitleMatchMode', 4) While 1 ;Starts perpetual Loop Sleep(1000) ;Slows Down Loop to Ease Load on CPU If WinExists("Security Information") Then WinActivate("Security Information") WinWaitActive("Security Information") ControlSend("Security Information", "", "{ENTER}") ExitLoop EndIf If not ProcessExists("MainScriptName") Then Exit ;Kills This script If the Main Script is Exited Wend Hope this helps. EDIT::: You could just make this a function and use it in your Main script as well. Edited July 26, 2008 by Varian Link to comment Share on other sites More sharing options...
yyfy105 Posted July 26, 2008 Share Posted July 26, 2008 This is a good idea from Varian. I just add some information: Winwaitactive("Security Alert") Controlclick("Security Alert", "" , "Button1") Button1 means you can use the "AutoIT Windows Info" under the start -> program ->AutoIT V3 folder to get the name of the control. Create a new Script that is started automatically from your Main script. Here is sample code. Opt('WinTitleMatchMode', 4) While 1;Starts perpetual Loop Sleep(1000);Slows Down Loop to Ease Load on CPU If WinExists("Security Information") Then WinActivate("Security Information") WinWaitActive("Security Information") ControlSend("Security Information", "", "{ENTER}") ExitLoop EndIf If not ProcessExists("MainScriptName") Then Exit;Kills This script If the Main Script is Exited Wend Hope this helps. EDIT::: You could just make this a function and use it in your Main script as well. Link to comment Share on other sites More sharing options...
Varian Posted July 26, 2008 Share Posted July 26, 2008 Thanks for that correction. ControlSend requires a ControlID, which is probably not present in this case.Also, if this Security Dialog pops up more than once, just remove the ExitLoop line so that the sciptwill run until the Main Program is no longer running.This is a good idea from Varian.I just add some information: Winwaitactive("Security Alert") Controlclick("Security Alert", "" , "Button1") Button1 means you can use the "AutoIT Windows Info" under the start -> program ->AutoIT V3 folder to get the name of the control. Link to comment Share on other sites More sharing options...
DaleHohm Posted July 26, 2008 Share Posted July 26, 2008 (edited) Or you could look at the Snippets database as I suggested and it's all written for you already... Edited July 26, 2008 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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