UNO Posted March 16, 2007 Share Posted March 16, 2007 I tried to record a sequence of actions when using a secure intranet site. I recorded the code from Au3.Record .The following is the script generated. However it does not play back correctly I have encountered this error when a site also uses javascript alert function(to pop up a message) as it cant send the keys and it pauses. $oIE = _IECreate ("https://XYZ.com",0,1,1,0) ;Intranet site so removing the URL WinWait("Security Alert","Information you exch") If Not WinActive("Security Alert","Information you exch") Then WinActivate("Security Alert","Information you exch") WinWaitActive("Security Alert","Information you exch") Send("{SHIFTDOWN}{TAB}{SHIFTUP}{SPACE}") Also attaching the screenshot of the dialog screen where my script pauses. Any ideas on how to make this work? Thanks in advance.... Link to comment Share on other sites More sharing options...
Shevilie Posted March 16, 2007 Share Posted March 16, 2007 (edited) Try this.. Read with Autoit Info Tool the class or id of the yes button and insert it in the right place $oIE = _IECreate ("https://XYZ.com",0,1,1,0) While _IEPropertyGet($oIE, "busy") If WinExists("Security Alert") Then ControlClick("Security Alert", "", "GET YES BUTTON INFO") EndIf WEnd Edited March 16, 2007 by Shevilie Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
UNO Posted March 16, 2007 Author Share Posted March 16, 2007 (edited) Thanks Shevilie,b ut it didnt workout Posting the image of A3Info tool on the yes button Edited March 16, 2007 by UNO Link to comment Share on other sites More sharing options...
Shevilie Posted March 16, 2007 Share Posted March 16, 2007 (edited) $oIE = _IECreate ("https://XYZ.com",0,1,1,0) While _IEPropertyGet($oIE, "busy") If WinExists("Security Alert") Then ControlClick("Security Alert", "", "Button1") EndIf WEnd Edited March 16, 2007 by Shevilie Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
UNO Posted March 19, 2007 Author Share Posted March 19, 2007 Shevile, It not working out too. Can any other ideas work out? Thanks Link to comment Share on other sites More sharing options...
November Posted March 19, 2007 Share Posted March 19, 2007 Shevile,It not working out too.Can any other ideas work out?ThanksJust a wild guess...Im not sure...Send ALT + YCheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
Shevilie Posted March 19, 2007 Share Posted March 19, 2007 As I understand it, you enter the page and during the loadtime this windows pops up.. $oIE = _IECreate ("https://XYZ.com",0,1,1,0) WinWait("Security") MsgBox(0,0,"Found Window") ControlFocus("Security", "", "Button1") ControlClick("Security", "", "Button1") Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
UNO Posted March 26, 2007 Author Share Posted March 26, 2007 Shevile, It not working out too. I believe AutoIT cant catch the popup in IE Any ideas? Link to comment Share on other sites More sharing options...
Shevilie Posted March 26, 2007 Share Posted March 26, 2007 Does the MsgBox apear ?? Or have you messed with advanced title settings ?? Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
UNO Posted March 26, 2007 Author Share Posted March 26, 2007 no the message box doesnt appears.it just pauses For the time being i am using the following code with a long delay. If WinActive("Security Alert","Information you exch")Then Send("{ENTER}") EndIf But some PCs here have imported the above mentioned certificate.So the security certificate may or may not appear. Link to comment Share on other sites More sharing options...
Shevilie Posted March 26, 2007 Share Posted March 26, 2007 Well Then this should work $oIE = _IECreate ("https://XYZ.com",0,1,1,0) While _IEPropertyGet($oIE, "busy") If WinExists("Security Alert","Information you exch") Then ControlClick("Security Alert","Information you exch", "Button1") EndIf WEndoÝ÷ ØÍ¢Ûaz{kÊÚ+º|¨º·(uë§¶)b¶®±ë-éð)^Ê«±Êâ¦Ø¬©àx+º{aÇ(uæ®¶sdbväW7G2gV÷Cµ6V7W&GÆW'BgV÷C²ÂgV÷C´æf÷&ÖFöâ÷RW6gV÷C²FVà¢×6t&÷gV÷CµvæF÷rW7G2gV÷C²¢b33c·BÒ6öçG&öÄ6Æ6²gV÷Cµ6V7W&GÆW'BgV÷C²ÂgV÷C´æf÷&ÖFöâ÷RW6gV÷C²ÂgV÷C´'WGFöãgV÷C²¢bb33c·BFVà¢×6t&÷gV÷C´6Æ6¶VB'WGFöâgV÷C²¢VÇ6P¢×6t&÷gV÷C´6÷VÆFâb33·B6Æ6²'WGFöâgV÷C²¢VæD`¤VæD Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
UNO Posted March 27, 2007 Author Share Posted March 27, 2007 not yet working. has AutoIT has some issues with catching controls in pop-ups. For example 1)i tried to play in IE7 but the msgbox didnt appear 2)also use the alert function of java and it struggle to send the right key combination i am using the below code with a long delay(not a good approach) If WinActive("Security Alert","Information you exch")Then Send("{ENTER}") EndIf Link to comment Share on other sites More sharing options...
Shevilie Posted March 27, 2007 Share Posted March 27, 2007 (edited) Well did you ran the last code when your script is pausing at the popup ?? And wait did it return ?? Did any MsgBox popup ?? Edited March 27, 2007 by Shevilie Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
LarryK Posted April 3, 2007 Share Posted April 3, 2007 $oIE = _IECreate ("https://XYZ.com",0,1,1,0);Intranet site so removing the URLWinWait("Security Alert","Information you exch")If Not WinActive("Security Alert","Information you exch") Then WinActivate("Security Alert","Information you exch")WinWaitActive("Security Alert","Information you exch")Send("{SHIFTDOWN}{TAB}{SHIFTUP}{SPACE}")The problem in is in the _IECreate function call. The fourth param is $f_wait and it should be set to 0:$oIE = _IECreate("https://XYZ.com",0,1,0,0)WinWait("Security Alert")Send("Y")With the $f_wait set to 1, it's waiting for IE to load the XYZ.com site before continuing. The security window is preventing the site from loading, so _IECreate never returns.Hope this helps,Larry Link to comment Share on other sites More sharing options...
Shevilie Posted April 3, 2007 Share Posted April 3, 2007 Argh my bad... I was sure that it was number 4 that was wait Well thats the problem Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
PeterFromCachet Posted March 5, 2009 Share Posted March 5, 2009 This post helped me figure out how to respond to a server request for a client certificate. Thanks. I needed to respond to the request and then have the script continue to fill in the form and navigate through the site. My script: $oIE = _IECreate() _IENavigate($oIE, "https://www.securesite.com", 0) WinWait("Choose a digital certificate", "", 7) Sleep(500) ; chooses first cert on the list ControlClick("Choose a digital certificate", "", "[iD:1]") Sleep(500) WinWaitActive("Login Screen") ; maximize window SEND("!{SPACE}x") Sleep(1500) ; get pointers to the login form and username and password fields $o_form = _IEFormGetObjByName($oIE, "Login") $o_ClientID = _IEFormElementGetObjByName($o_form, "ClientID") $o_UserID = _IEFormElementGetObjByName($o_form, "UserID") $o_Password = _IEFormElementGetObjByName($o_form, "Password") ; Set field values and submit the form _IEFormElementSetValue($o_ClientID, "MyClientID") _IEFormElementSetValue($o_UserID, "MyUserID") _IEFormElementSetValue($o_Password, "MyPassword") ;submit form - need this for my site SEND("{TAB}") SEND("{TAB}") SEND("{TAB}") SEND("{SPACE}") _IELoadWait($oIE) 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