Jump to content

BodeleyTunes

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by BodeleyTunes

  1. Getting a bit of a basic error, it cant find the form? --> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch --> IE.au3 V2.4-0 Error from function _IELinkGetCollection, $_IEStatus_InvalidDataType
  2. OK, It seems to be inside a frame called "form1" but its also nested in loads of tables and the odd DIV. Do I have to also mention them to zoom in on this pesky "detail" link? I have a screenshot of how the DOM is laid out below with the "detail" link hightlighted... So far I have tried this: $oframelistings = _IEFrameGetObjByName($oIE, "form1") $colLinks = _IELinkGetCollection($oframelistings) For $oLink in $colLinks If String($oLink.innerText) = "Detail" Then _IEAction($oLink, "click") ExitLoop EndIf Next
  3. I've been trying to use firebug, this is all new to me I barely know what DOM is, but I'll go away and research thanks! Jon.
  4. Is there a way I can run a few tests on it to see if Im looking at the right part. Eg. frames etc. I also tried this earlier but to no avail. $oFormListings = _IEFormGetObjByName($oIE, "form1") $oDivs = _IETagNameGetCollection($oIE, "DIV") For $oDiv In $oDivs If String(_IEPropertyGet($oDiv, "InnerText")) = $sSearch Then _IEAction($oDiv, "click") _IELoadWait($oIE) ExitLoop EndIf Next
  5. OK I tried it but nothing happend, no error message or anything. I forgot to to say that the text of the link "detail" is not unique, its a big list of cars you can click on as below, so maybe it got confused? This is what I just tried. $colLinks = _IELinkGetCollection($oIE) For $oLink in $colLinks If String($oLink.innerText) = "Detail" Then _IEAction($oLink, "click") ExitLoop EndIf Next
  6. I have a list of cars in an auction, I want to click on the "Detail" text link which then shows the details of each car in the list. The site uses a lot of java script and forms. How can I click on the detail link in the html below: <TD class=VehicleList>1219<BR>4192</TD> <TD class=overG bgColor=#ffcc33 width=15 align=right> <DIV style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ffcc33; FONT-WEIGHT: bold"><A onclick=sendNextPage(); href="predtslct01_en.jsp?type=0&amp;display=list&amp;conferenceid=6&amp;holdingid=1219&amp;auctionid=4192" target=_self>Detail</A> </DIV></TD></TR></TBODY></TABLE></TD> <TD> Can anyone help!? Im stuck again! So far I have tried IEget tags and obj by name etc and not got close to homing in on the links or even counting through the links to find an index? Cheers, Jon.
  7. Need to click the select button which then selects the highlighted entries in a listbox on the left and moves them over the listbox on the right. This button doesn't have a name or an ID, so how do I zone in on it to click it? It does have a value of "select>>" but I dont know how to single out this button by using it's value... Here is the element I need to zone in on and click: <[b]input class="slctbtn"[/b] style="width: 85px; cursor: hand;" onclick="AddSelect( document.form1.elements, 'slct0', 'slct1[]' )" type="button" [b]value="select>>"[/b]/> I've zoned in on the Frame, then the Form (form1) then normally I would zone in on this single button using it's name or ID but there is none. I'm sure there is an easy way to do this but I'm a dumb newb still. Thanks! Jon.
  8. OK done a botch-job of a fix thats seems to work! Anyone know of a cleaner way of doing things? This seems to get it to work though... $oIE = _IECreate ("http://auctionsearch/search") $oForm = _IEFormGetCollection ($oIE, 0) $oMake = _IEFormElementGetObjByName ($oForm, "Maker") _IEFormElementOptionselect ($oMake, "TOYOTA", 1, "ByValue") Sleep(1000) _IEAction($oMake,"focus") send("{SPACE}") I added the focus and then got it to send "space" key strike which selects the correct make as its already been highlighted. Cheers, Jon.
  9. OK I'm still struggling here. It's definitely doing something, I see the list box flicker and it moves down to "Toyota" but it doesnt actually physically select/click on the item, its not going blue as it should do when you click on the list box! Help!
  10. Hi everyone, Complete newby here, I am probably doing something so stupid it's untrue, I can't program or script for tofee so I'm trying to get my head around one basic thing at a time. Anyway, I'm trying to get autoIT to login to a webpage for an auction site. I've got it to login fine. The search box for the site has a list box with car makers in it. I simply want to be able to automate the action of "clicking" on or selecting the value "TOYOTA" in the list box. I have kind of got it to do this but it doesnt click on the box, it just kind of highlights it ready to be clicked on (grey outline around the list option rather than blue solid to show its been clicked on). This is what I have so far... Func _makeselect () $oIE = _IECreate ("http://auctionnsearch/search/") $oForm = _IEFormGetCollection ($oIE, 0) $oMake = _IEGetObjByName ($oForm, "Maker") _IEFormElementOptionselect ($oMake, "TOYOTA", 1, "byvalue") EndFunc Here is a sample of the source code of the page... <!-- Auction days Start --> <form name="vehicle_search" method="GET" action="/search/results/"> <table width="96%" style="border-style: dotted; border-width: 1px; border-collapse: collapse"> <tr> <td width="25%" valign="top"><h2 class="title_head">(1) Choose Maker</h2></td> <td width="25%" valign="top"><h2 class="title_head">(2) Choose Model</h2></td> <td width="75%" valign="top"><h2 class="title_head">Latest vehicles you searched</h2></td> </tr> <tr> <td valign="middle"> <select id="maker" multiple="true" onchange="get_models(this)" name="company" style="font-family:Tahoma;padding:5px; margin:0 0 10px 10px; width:220px; height:200px"> <option value="" selected>--------- Select a maker ---------</option> <optgroup label="- A -"> <option value="ALPHA ROMEO" style="font-family:Tahoma">ALPHA ROMEO (131)</option> <option value="ASTON MARTIN" style="font-family:Tahoma">ASTON MARTIN (5)</option> <option value="AUDI" style="font-family:Tahoma">AUDI (545)</option> <option value="AUTO BIANCHI" style="font-family:Tahoma">AUTO BIANCHI (1)</option> </optgroup> <optgroup label="- B -"> <option value="BENTLEY" style="font-family:Tahoma">BENTLEY (39)</option> <option value="BMW" style="font-family:Tahoma">BMW (1990)</option> <option value="BMW ALPINA" style="font-family:Tahoma">BMW ALPINA (1)</option> <option value="BUICK" style="font-family:Tahoma">BUICK (3)</option> </optgroup> <optgroup label="- C -"> <option value="CADILLAC" style="font-family:Tahoma">CADILLAC (56)</option> <option value="CATERPILLAR" style="font-family:Tahoma">CATERPILLAR (2)</option> <option value="CATERPLLAR" style="font-family:Tahoma">CATERPLLAR (1)</option> <option value="CHEVROLET" style="font-family:Tahoma">CHEVROLET (326)</option> <option value="CHRYSLER" style="font-family:Tahoma">CHRYSLER (354)</option> <option value="CHRYSLER JEEP" style="font-family:Tahoma">CHRYSLER JEEP (18)</option> <option value="CITROEN" style="font-family:Tahoma">CITROEN (52)</option> </optgroup> <optgroup label="- D -"> <option value="DAEWOO" style="font-family:Tahoma">DAEWOO (28)</option> <option value="DAIHATSU" style="font-family:Tahoma">DAIHATSU (5383)</option> <option value="DAIMLER" style="font-family:Tahoma">DAIMLER (7)</option> <option value="DODGE" style="font-family:Tahoma">DODGE (9)</option> <option value="DODGE " style="font-family:Tahoma">DODGE (4)</option> <option value="Daewoo" style="font-family:Tahoma">Daewoo (4)</option> <option value="Daihatsu" style="font-family:Tahoma">Daihatsu (12)</option> </optgroup> <optgroup label="- E -"> <option value="EUROPEAN FORD" style="font-family:Tahoma">EUROPEAN FORD (20)</option> </optgroup> <optgroup label="- F -"> <option value="FERRARI" style="font-family:Tahoma">FERRARI (53)</option> <option value="FIAT" style="font-family:Tahoma">FIAT (65)</option> <option value="FORD" style="font-family:Tahoma">FORD (142)</option> </optgroup> <optgroup label="- G -"> <option value="GM" style="font-family:Tahoma">GM (21)</option> <option value="GM MATIZ" style="font-family:Tahoma">GM MATIZ (1)</option> </optgroup> <optgroup label="- H -"> <option value="HANIX" style="font-family:Tahoma">HANIX (1)</option> <option value="HINO" style="font-family:Tahoma">HINO (154)</option> <option value="HITACHI" style="font-family:Tahoma">HITACHI (1)</option> <option value="HONDA" style="font-family:Tahoma">HONDA (9351)</option> <option value="HUMMER" style="font-family:Tahoma">HUMMER (32)</option> <option value="HYUNDAI" style="font-family:Tahoma">HYUNDAI (194)</option> <option value="Honda" style="font-family:Tahoma">Honda (24)</option> <option value="Hyundai" style="font-family:Tahoma">Hyundai (24)</option> </optgroup> <optgroup label="- I -"> <option value="ISUZU" style="font-family:Tahoma">ISUZU (502)</option> </optgroup> <optgroup label="- J -"> <option value="JAGUAR" style="font-family:Tahoma">JAGUAR (175)</option> <option value="JAPANESE FORD" style="font-family:Tahoma">JAPANESE FORD (22)</option> </optgroup> <optgroup label="- K -"> <option value="KATO" style="font-family:Tahoma">KATO (2)</option> <option value="KIA" style="font-family:Tahoma">KIA (139)</option> <option value="KOBELCO" style="font-family:Tahoma">KOBELCO (1)</option> <option value="KOMATSU" style="font-family:Tahoma">KOMATSU (5)</option> <option value="KUBOTA" style="font-family:Tahoma">KUBOTA (6)</option> <option value="Kia" style="font-family:Tahoma">Kia (16)</option> </optgroup> <optgroup label="- L -"> <option value="LAMBORGHINI" style="font-family:Tahoma">LAMBORGHINI (5)</option> <option value="LANCIA" style="font-family:Tahoma">LANCIA (3)</option> <option value="LAND ROVER" style="font-family:Tahoma">LAND ROVER (73)</option> <option value="LEXUS" style="font-family:Tahoma">LEXUS (199)</option> <option value="LINCOLN" style="font-family:Tahoma">LINCOLN (24)</option> <option value="LORAIN" style="font-family:Tahoma">LORAIN (1)</option> <option value="LOTUS" style="font-family:Tahoma">LOTUS (5)</option> </optgroup> <optgroup label="- M -"> <option value="MASERATI" style="font-family:Tahoma">MASERATI (32)</option> <option value="MAYBACH" style="font-family:Tahoma">MAYBACH (3)</option> <option value="MAZDA" style="font-family:Tahoma">MAZDA (3500)</option> <option value="MERCEDES BENZ" style="font-family:Tahoma">MERCEDES BENZ (2212)</option> <option value="MG" style="font-family:Tahoma">MG (12)</option> <option value="MINI" style="font-family:Tahoma">MINI (118)</option> <option value="MITSUBISHI" style="font-family:Tahoma">MITSUBISHI (4869)</option> <option value="MITSUOKA" style="font-family:Tahoma">MITSUOKA (26)</option> <option value="Mazda" style="font-family:Tahoma">Mazda (7)</option> <option value="Mitsubishi" style="font-family:Tahoma">Mitsubishi (3)</option> </optgroup> <optgroup label="- N -"> <option value="NISSAN" style="font-family:Tahoma">NISSAN (11615)</option> <option value="Nissan" style="font-family:Tahoma">Nissan (15)</option> </optgroup> <optgroup label="- O -"> <option value="OPEL" style="font-family:Tahoma">OPEL (105)</option> <option value="OTHER" style="font-family:Tahoma">OTHER (4)</option> <option value="OTHER TECHNICS" style="font-family:Tahoma">OTHER TECHNICS (16)</option> <option value="Others" style="font-family:Tahoma">Others (8)</option> <option value="other" style="font-family:Tahoma">other (809)</option> </optgroup> <optgroup label="- P -"> <option value="PEUGEOT" style="font-family:Tahoma">PEUGEOT (218)</option> <option value="PONTIAC" style="font-family:Tahoma">PONTIAC (1)</option> <option value="PORSCHE" style="font-family:Tahoma">PORSCHE (279)</option> </optgroup> <optgroup label="- R -"> <option value="RENAULT" style="font-family:Tahoma">RENAULT (67)</option> <option value="ROLLS ROYCE" style="font-family:Tahoma">ROLLS ROYCE (4)</option> <option value="ROVER" style="font-family:Tahoma">ROVER (42)</option> </optgroup> <optgroup label="- S -"> <option value="SAAB" style="font-family:Tahoma">SAAB (22)</option> <option value="SATURN" style="font-family:Tahoma">SATURN (1)</option> <option value="SMART" style="font-family:Tahoma">SMART (78)</option> <option value="SPORT CABRIOLET" style="font-family:Tahoma">SPORT CABRIOLET (3)</option> <option value="SSANGYONG" style="font-family:Tahoma">SSANGYONG (108)</option> <option value="SUBARU" style="font-family:Tahoma">SUBARU (4602)</option> <option value="SUMITOMO" style="font-family:Tahoma">SUMITOMO (1)</option> <option value="SUZUKI" style="font-family:Tahoma">SUZUKI (7294)</option> <option value="Samsung" style="font-family:Tahoma">Samsung (2)</option> <option value="Ssangyong" style="font-family:Tahoma">Ssangyong (26)</option> <option value="Subaru" style="font-family:Tahoma">Subaru (6)</option> <option value="Suzuki" style="font-family:Tahoma">Suzuki (14)</option> </optgroup> <optgroup label="- T -"> <option value="TADANO" style="font-family:Tahoma">TADANO (3)</option> <option value="TCM" style="font-family:Tahoma">TCM (2)</option> <option value="TOYOTA" style="font-family:Tahoma">TOYOTA (20443)</option> <option value="TVR" style="font-family:Tahoma">TVR (1)</option> <option value="Toyota" style="font-family:Tahoma">Toyota (30)</option> </optgroup> <optgroup label="- U -"> <option value="UNKNOWN" style="font-family:Tahoma">UNKNOWN (1)</option> </optgroup> <optgroup label="- V -"> <option value="VOLKSWAGEN" style="font-family:Tahoma">VOLKSWAGEN (1000)</option> <option value="VOLVO" style="font-family:Tahoma">VOLVO (412)</option> </optgroup> <optgroup label="- -"> <option value="トヨタ" style="font-family:Tahoma">トヨタ (6)</option> </optgroup> </select> </td> Thanks in advance!! Jonathan.
×
×
  • Create New...