Jump to content

ThomasQ

Active Members
  • Posts

    76
  • Joined

  • Last visited

ThomasQ's Achievements

Wayfarer

Wayfarer (2/7)

0

Reputation

  1. Thanks man! That works on the $oIE = _IE_Example ("form"). On the page I'm making the script for, it only works for a textarea beneath the radio buttons (it sets the $element.value =3 in the textarea). The text area shares the same name as the radio buttons. I'll do some digging later tonight Thanks again!
  2. Im using IE8, tried it with & without compatibility mode.. When using that one I keep getting this error: ==> The requested action with this object has failed.: $element.selected = TRUE $element.selected = TRUE^ ERROR
  3. Thanks!, But nope, doesn't work mate. Isn't the ID used the same as the Name in the _IEFormElementRadioSelect function? I still can't select radiobuttons on the _IE_Example ("form") page with that last script I posted. Got any other suggestions?
  4. Basicly, I need to finish this script, Without using _IEFormGetObjByName or _IEFormGetCollection, and with knowing only the Name of the radiobuttons. Can anybody help me out?? $oIE = _IE_Example ("form") $oDoc = _IEDocGetObj($oIE) $oArray = $oDoc.getElementsByTagName ("input") For $element In $oArray If $element.Name = "radioExample" Then _IEFormElementRadioSelect ($oDoc,2, "radioExample", 1, "byIndex") msgbox(0,"","Found it") Endif Next
  5. Thanks! Your script does return 4 instances of finding it! But when I Try to read the state like so: _IEFormElementRadioSelect($element, 1, "PID10", -1, "byIndex") I get --> IE.au3 V2.4-0 Error from function _IEFormElementRadioSelect, $_IEStatus_InvalidObjectType Anybody any idea what I'm doing wrong?? Thanks!
  6. Hi All! I'm going a bit mental here.. If got this page I want to automate. The formelements, like buttons, textarea's and radio buttons are being called by Javascript.. Throug searching for Tags on the whole page, I found most elements I was looking for, a lot of wich I can manipulate with for example _IEFormElementGet & SetValue, or _IEAction. I came across these radio buttons I need to automate.. |<SPAN class="v-radiobutton v-select-option"><INPUT id=gwt-uid-1 tabIndex=0 CHECKED type=radio name=PID10 __eventBits="4233"><LABEL for=gwt-uid-1 __eventBits="4233">Customer Id</LABEL></SPAN>|<INPUT id=gwt-uid-1 tabIndex=0 CHECKED type=radio name=PID10 __eventBits="4233"><LABEL for=gwt-uid-1 __eventBits="4233">Customer Id</LABEL> <SPAN class="v-radiobutton v-select-option"><INPUT id=gwt-uid-2 tabIndex=0 type=radio name=PID10 __eventBits="4233"><LABEL for=gwt-uid-2 __eventBits="4233">E-mail</LABEL></SPAN>|<INPUT id=gwt-uid-2 tabIndex=0 type=radio name=PID10 __eventBits="4233"><LABEL for=gwt-uid-2 __eventBits="4233">E-mail</LABEL> |<SPAN class="v-radiobutton v-select-option"><INPUT id=gwt-uid-3 tabIndex=0 type=radio name=PID10 __eventBits="4233"><LABEL for=gwt-uid-3 __eventBits="4233">Naam</LABEL></SPAN>|<INPUT id=gwt-uid-3 tabIndex=0 type=radio name=PID10 __eventBits="4233"><LABEL for=gwt-uid-3 __eventBits="4233">Naam</LABEL> In the example for the function it suggest to use the function like so : IEFormElementRadioSelect ($oForm, "vehicleAirplane", "radioExample", 1, "byValue") or _IEFormElementRadioSelect ($oForm, 3, "radioExample", 1, "byIndex") One of the main things here is that I cannot find any Form on the page ( with _IEFormGetCollection), except an empty one : <form name="hrefFm" method="post" id="hrefFm" action=""></form> All other instances, I didn't need to specify the form itself, just references the the element, even though _IEFormElementGetValue for example seems to reference an element of a formll How do I check these radiobuttons?? If I Have to use _IEFormElementRadioSelect, how do I find the correct Form? All tags of the radiobuttons are found directly off the main page. There are two Iframes, but in there are other tags, no radioboxes. Anybody any idea on how to tackle this problem?? Many Thanks in advance, and guaranteed upvotes for the correct answer! -Thomas
  7. Hi All! I got a bit of a problem. I need to check some checkboxes on a site, wich I can't seem to do (using _IEFormElementCheckboxSelect & _IEAction). I can't even seem to get back the value of the checkboxes. (using _IEFormElementGetValue). Since I can't get the info I need straight from the Page Source, I use _IETagNameAllGetCollection, and then sift my way through the mess it returns! So far I have been succesfull in finding and manipulating buttons, textarea's, some tables, and dropdown select boxes on the site. All of them using the _IEFormElementGett & Set Value function. Through using $oElements = _IETagNameAllGetCollection($oIE), a For $oElement In $oElements / Next loop, and then checking the atrributes of $oElement, using $oElement.tagname, $oElement.id, $oElement.classname, $oElement.innertext & $oElement.Innerhtml. Thanks to this I located on of the checkboxes them self (I think).. TAG nr 165.. This is wat it looks like when the checkbox is checked: This is Unchecked: Notice there is no attribute set to CHECKED, and that it's not even a UNCHECKED or something when it's unchecked on the page. It is not using "value=", so that's probably the reason the _IEFormElementGett & Set Value don't work. Also, after checking a freshly loaded page, abouy 8 TAG objects, wich seem to have something to do with that checkbox, get ID's, wich they previously didn't have.. Does anybody have any idea how I can manipulate those darn Checkboxes? How should I use the _IEFormElementCheckboxSelect on this checkbox? Is there any other way to check/uncheck a checkbox?? Many Thanks in advance!!
  8. Thanks! Your scripts have been a great help! I got the whole Tag concept now, and I feel I'm getting closer! The last script you posted, that searches for Forms, wich he doesn't find in the P_P_ID... object. I've been searching through the tagnames for the innertext Zoeken. This gave me back 6 results, tagnamed: TR, TD, DIV & Span. When I tried to find a link to click using your lines: $oLink = _IETagNameGetCollection($oLi,"a",0) ;take the first link in the LI tag! _IEAction($oLink,"click"), nothing is found either. I expect that the "a" is a tagname for links? Is it smart to search for the innertext "Zoeken"? All the classes that are returned seem to be CSS & Table tagnames, right? There's probably nothing to click there? Should I then search for Forms, wich aren't found in the P_P_etc object. Am I lookin in the wrong object? Many thanks again man!
  9. Hi man, thanks for the example. At least now I know it is possible, and I will read up on the _IETagNameGet function. So far I see that the main page has 262 ID's, (using _IETagNameGetCollection), and the object I need to access has about 200.. How do I Consolewrite a list of those tag's their names, valuies, etc? *EDIT* : Stupid Question, I should have just checked the Example for _IETagNameGetCollection. Never mind! Between posting this thread and now I made a little progress. I haven't been able to get the InnerHTML of the Javascript object with Firebug, but I did get it by checking the object ID, wich I found in the source code: $oDiv = _IEGetObjById ($oIE, "p_p_id_dtghsppdataentry_WAR_dtghsppdataentryportlet_")<BR>$oDivInnerText = _IEPropertyGet($oDiv, "innerhtml")<BR>; ConsoleWrite($oDivInnerText &amp; @LF)<BR> This gives me back the whole string with all the buttons and forms I need to access, for example this button: <TD class=v-formlayout-contentcell width="100%"> <DIV class=v-button role=button tabIndex=0 __eventBits="7165" tkPid="PID44" __uiObjectID="6"><SPAN class=v- button-wrap><SPAN class=v-button-caption>Zoeken</SPAN></SPAN></DIV></TD> They all have tkPid's and _uiObjectID's. Any idea on how to click the "Zoeken" button for example? Many thanks again, since it's for my work, I very much apricatie the quickness of your awnsers!
  10. Hi All! I've been using autoit for my work for two years now. Unfortunately, the latest update on the site I work with, changed the whole structure of the site! I used to be fine getting collection objects of all the form's straigt from the page's source, but now they started using javascript as the interface of the site, and I'm boned! Everything I need is generated within this one certain javascript function they call.. The whole interface is build with Vaadin: http://www.vaadin.com So, Is it possible to use Autoit on those Links & Forms? And if so, How do I do it? Where do I start?? Are there any Diagnostical scripts so I can find my way through the forrest?? Or am I seriously ff'ed? Thanks in advance!! Thomas
  11. Thanks! I've read the OBJ/COM Reference, but I'll check out the MSDN: DHTML Properties too!
  12. Thanks!! I'm fairly new using autoit, and this script is the first time i'm using the .name, .count & .type functions. Where can I read up on this in the help file, what are those functions called? Thank in advance, Thomas
  13. Hi! I've got a question about the _IEFormElementGetCollection function. I know how to use the information in the collection object, and how to use the different form elements. But how can I identiy what kind of form element is what? For example Textelement, radioselect, checkbox select, etc..
  14. Hi! Just got back from vacation, and started on my script again. But no, I meant an Collection object, like the one you get with the _IETableGetCollection function. Thanks in advance!
  15. Hi All! With the function stringinstr you can find a given substring in a string. You can also set wich occurence of that substring you want found, for instance the 2nd or 3d, etc.. How do I count these substrings in a string, e.q. How do I return the total number of occurences of a substring in a string? Thanks in advance! Thomas
×
×
  • Create New...