newcoding Posted March 8, 2013 Posted March 8, 2013 (edited) Internet Explorer Embedded window/dialog box $oPopup = _IEAttach("Sign In Confirmation -- Webpage Dialog", "embedded") $oForm = _IEGetObjById($oPopup, "signInConfirmationForm") $oID = _IEFormElementGetObjByName($oForm, "idNumber") _IEFormElementSetValue($oID, "123123") $oEXP = _IEFormElementGetObjByName($oForm, "idExpirationDate") _IEFormElementSetValue($oEXP, "06/12/2016") $oSelect = _IEFormElementGetObjByName($oForm, "idType") _IEFormElementOptionselect($oSelect, "State ID #", 1, "bytext"); needed so OK button appears/changes from grayed out Sleep(2000) ;ABOVE CODE WORKS PERFECTLY, but I cannot submit the form ;Using _IEFormSubmit opens a new window and i lose all inputed data as well as login status ;----------------------- ;Make it click the button!!!! ;_IEImgGetCollection ;use next time? ;.FireEvent method use? ;$oElement.fireEvent("onmouseover") $oPopup = _IEAttach("Sign In Confirmation -- Webpage Dialog", "embedded") _IEImgClick($oPopup, "blahblahblah/images/bt-ok.gif"); as well as "blahblahblah/images/bt-d-ok.gif" ;and tried: _IEImgClick($oPopup, "images/bt-ok.gif", "src"); and "images/bt-d-ok.gif" code returns: _IEImgClick, $_IEStatus_NoMatch, I have the source code and exactly what the image is called, ID, name, src, etc, but still same error. source code: <input width="35" type="image" height="24" border="0" name="lastContinueEnable" src="blahblahblah/images/bt-ok.gif" alt="" onclick="submitValue();return false;" style="DISPLAY: none; VISIBILITY: hidden; CURSOR: hand" id="lastContinueEnable"> <input id="lastContinue" width="35" type="image" height="24" border="0" name="lastContinue" src="blahblahblah/images/bt-d-ok.gif" disabled="" style="VISIBILITY: visible"> I have also tried: $oInput = _IEGetObjByName($oPopup, "lastContinueEnable"); and "lastcontinue" tried _IEAction($oInput, "click") returns same nomatch error The OK image i need to click is greyed out until clicking outside form inputs and form has values. I used _IEFormElementOptionselect($oSelect, "State ID #", 1, "bytext") and it makes the button appear clickable. Running this code, I do NOT get the /........../ok.gif image returned. I only get an image link for closing the window. So how is this image being hidden and how can i access it? #include <IE.au3> $oPopup = _IEAttach("Sign In Confirmation -- Webpage Dialog", "embedded") Local $oImgs = _IEImgGetCollection($oPopup) Local $iNumImg = @extended MsgBox(0, "Img Info", "There are " & $iNumImg & " images on the page") For $oImg In $oImgs MsgBox(0, "Img Info", "src=" & $oImg.src) Next Please help me. Let me know if anything else is needed. I'm stuck and this is the last part I need to complete my script to automate part of my job. Edited March 8, 2013 by newcoding
newcoding Posted March 8, 2013 Author Posted March 8, 2013 Hmm, can't edit my post. But I found a dirty way to make it work, not optimal as these commands may get intercepted by another window. Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") 6 tabs and the OK image is selected and can be "clicked" with enter. A more elegant approach may be needed if i want to do anything else on the computer while this is running.
Moderators Melba23 Posted March 9, 2013 Moderators Posted March 9, 2013 newcoding,You do not get "Edit" permissions until you have made 5 posts. Be patient. 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
newcoding Posted March 9, 2013 Author Posted March 9, 2013 I have a solid workaround now. Using: ControlSend("Sign In Confirmation -- Webpage Dialog", "","[CLASSNN:Internet Explorer_Server1]", "{TAB}" & "{TAB}" & "{TAB}" & "{TAB}" & "{TAB}" & "{TAB}" & "{ENTER}") The keys are sent directly to the window. The window comes to forground, but its not too annoying.
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