anixon Posted June 19, 2007 Share Posted June 19, 2007 This code opens the nominated website and gets the windows properties but my question is how do you get the properties for a window/s that are already open CODE#include <Inet.au3> #include <IE.au3> Dim $webpage = "www.bigpond.com.au" $oIE = _IECreate($webpage) _IELoadWait($oIE) $title = _IEPropertyGet ($oIE, "Title") msgbox(0,"",$Title) Help is always appreciated Ant.. Link to comment Share on other sites More sharing options...
DaleHohm Posted June 19, 2007 Share Posted June 19, 2007 See _IEAttach 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...
anixon Posted June 20, 2007 Author Share Posted June 20, 2007 See _IEAttachDaleThanks Dale I ran every example of _IE today and totally missed the relevance of _IEAttach boy do I fee sheepish.Thanks for the directionAnt.. Link to comment Share on other sites More sharing options...
anixon Posted June 20, 2007 Author Share Posted June 20, 2007 (edited) This is where I have got with the code but I am having trouble selecting the Current Password Field. CODE#include <Inet.au3> #include <IE.au3> Dim $oFormName = "Admin & services - Change password" dim $oPassword = "OLD_PASSWORD" If WinExists($oFormName) Then MsgBox(0,""," Window Exists") $oIE = _IEAttach ("Admin & services - Change password") $title = _IEPropertyGet ($oIE, "title") MsgBox(0, "", $title) $oForm = _IEFormGetObjByName($oIE, $oFormName) $oQuery = _IEFormElementGetObjByName($oForm, $oPassword) Exit Else MsgBox(0,""," Windows does not exist") Exit EndIf This part of is the web pages code for the page that has been attached showing the field id name etc CODE<table summary=""> <tr> <td> <label class="label" for="currentPassword">Current password:*</label> </td> <td class="spacer"> </td> <td class="innerheaderbutton centeralign"> <input id="currentPassword" type="password" maxlength="12" name="OLD_PASSWORD" size="20" value="" accesskey="" /> </td> <td> </td> <td> </td> </tr> <tr> <td> <label class="label" for="newPassword">New password:*</label> </td> <td class="spacer"> </td> <td class="innerheaderbutton centeralign"> <input id="newPassword" type="password" maxlength="12" name="NEW_PASSWORD" size="20" value="" accesskey="" /> </td> <td class="spacer"></td> <td class="normaltext" rowspan="2">Please read the password hints below.</td> </tr> <tr> <td> <label class="label" for="confirmPassword">Confirm new password:*</label> </td> <td class="spacer"> </td> <td class="innerheaderbutton centeralign"> <input id="confirmPassword" type="password" maxlength="12" name="CONFIRMED_PASSWORD" size="20" value="" accesskey="" /> </td> </tr> How do I select the currentPassword aka Password aka OLD_PASSWORD Thanks Ant.. Edit: I have the problem solved which put simply the Name of the Window and the name of the Form for that Window are not the same so _IEAttach attaches to the window not the form. I found the name of the form opening the source for the Window and doing a search for "Form Method". This is the code that works: CODE#include <Inet.au3> #include <IE.au3> Dim $oFormName = "TandCForm" Dim $oPassword = "OLD_PASSWORD" If WinExists("Admin & services - Change password") Then MsgBox(0,""," Window Exists") $oIE = _IEAttach ("Admin & services - Change password") $oForm = _IEFormGetObjByName($oIE, $oFormName) $oQuery = _IEFormElementGetObjByName($oForm, $oPassword) _IEFormElementSetValue($oQuery, "a") Exit Else MsgBox(0,""," Windows does not exist") Exit EndIf Edited June 20, 2007 by anixon 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