wowtop Posted April 20, 2011 Share Posted April 20, 2011 Hi all,i'm looking for a autoit script. For me, i want to copy and paste values come from a website.But some functions doesn't work because answers are not in the html source. ( _IEBodyReadHTML & _INetGetSource )Example : link : http://eu.battle.net/wow/fr/character/dalaran/turrican/statistic#133I want to collect to an array : Quêtes achevées,6 696,Nombre moyen de quêtes achevées par jour,4 256,Quêtes journalières achevées,2 443,Nombre moyen de quêtes journalières achevées chaque jour,3,Quêtes abandonnées,259The start code is :#include <IE.au3> #include <Array.au3> #include <String.au3> #include <inet.au3> $url = "http://eu.battle.net/wow/fr/character/dalaran/turrican/statistic#133" $oIE = _IECreate () _IENavigate ($oIE, $url) _IELoadWait ($oIE)after i want to select the IE window, select value, copy & paste this values in $aArray.Please help me, thanks Link to comment Share on other sites More sharing options...
wakillon Posted April 20, 2011 Share Posted April 20, 2011 (edited) Hi, Prêtre Elfe de la nuit de niveau 85 ! Is it a game ? Edited April 20, 2011 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
wowtop Posted April 20, 2011 Author Share Posted April 20, 2011 (edited) No it's for my website, i'm looking to scan player stats to add on.http://www.wow-top.com/I've already scan guilds stats and some player's stats but i've trouble with value not in the html source Edited April 20, 2011 by wowtop Link to comment Share on other sites More sharing options...
wakillon Posted April 20, 2011 Share Posted April 20, 2011 Et ça c'est quoi ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
wowtop Posted April 20, 2011 Author Share Posted April 20, 2011 oula quelqu'un qui parle français cool donc en résumé et désolé pour mon anglais pourri, je cherche justement ce style de données pour pouvoir les scanner et mettre à jour ma base de données des joueurs. si j'ai bien suivi le message sur le jeu, c'est dans le cas où l'on veut créer des boots ingame, hors moi c'est juste pour le site. Cela va il contre les conditions du site (si oui désolé). Et éventuellement j'ai une question, comment obtiens tu cette source xml ? (merci) Link to comment Share on other sites More sharing options...
Jayson Posted April 20, 2011 Share Posted April 20, 2011 Clique droit sur la page et regarde la source. Tout y est inscrit ! Link to comment Share on other sites More sharing options...
wakillon Posted April 20, 2011 Share Posted April 20, 2011 Pending advice from a moderator speak English so that everyone understands. Then it's my browser who get me this info, and I think we'll have to find the good "form" and with _IEPropertyGet, find the text for the values you want. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
wowtop Posted April 20, 2011 Author Share Posted April 20, 2011 (edited) [fr] si je vous jure que ni sous ie, ni sous mozilla je n'ai cette partie de code et que j'ai plutôt : [en] i swear, i have not the same source on IE or Mozilla , i have : [fr] Quel version de IE utilisez vous (ou mozilla) ? [en] witch ie or mozilla use you ? expandcollapse popup<li id="cat-summary" class="table"> <a name="ssummary"></a> <h4>Statistiques récemment mises à jour</h4> <dl> <dt>Plus grand nombre de réputations exaltées</dt><dd> 56 </dd> </dl> <dl class="odd"> <dt>Victimes apportant de l'expérience ou de l'honneur</dt><dd> 235 131 </dd> </dl> <dl> <dt>Mascottes possédées</dt><dd> 119 </dd> </dl> <dl class="odd"> <dt>Plus grand nombre de réputations honorées ou supérieures</dt><dd> 58 </dd> </dl> <dl> <dt>Nombre total de factions rencontrées</dt><dd> 66 </dd> </dl> <dl class="odd"> <dt>Nombre total de victoires honorables</dt><dd> 57 097 </dd> </dl> <dl> <dt>Recettes de cuisine connues</dt><dd> 204 </dd> </dl> <dl class="odd"> <dt>Plus grand nombre de réputations révérées ou supérieures</dt><dd> 57 </dd> </dl> <dl> <dt>Montures possédées</dt><dd> 117 </dd> </dl> <dl class="odd last"> <dt>Nombre total de victimes</dt><dd> 523 045 </dd> </dl> </li> </ul> <span id="search-error" class="table"> Search Error </span> <div id="statistic-list" class="statistic-list"></div> </div> <script type="text/javascript"> $(document).ready(function () { DynamicMenu.init({ "section": "statistic" }); StatisticHandler.init(); }) </script> </div> <span class="clear"><!-- --></span> </div> <script type="text/javascript"> //<![CDATA[ var MsgProfile = { tooltip: { feature: { notYetAvailable: "Cette fonction n’est pas encore disponible" }, vault: { character: "Cette section n’est accessible que si vous êtes connecté avec ce personnage.", guild: "Cette section n’est accessible que si vous êtes connecté avec un personnage membre de cette guilde." } } }; //]]> </script> Edited April 20, 2011 by wowtop Link to comment Share on other sites More sharing options...
wakillon Posted April 20, 2011 Share Posted April 20, 2011 I use Iron ( chromium familly )A right click on a element of a webpage and a console open with usefull infos on it ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
wowtop Posted April 20, 2011 Author Share Posted April 20, 2011 I find that doesn't work with IE but with Firefox, that doesn't work with source right clic, but when i save the webpage, codesource include the missing part. I'm looking for testing your browser but i don't know if my autoi script work with. Very Thanks with your help Link to comment Share on other sites More sharing options...
wakillon Posted April 20, 2011 Share Posted April 20, 2011 I find that doesn't work with IE but with Firefox, that doesn't work with source right clic, but when i save the webpage, codesource include the missing part.I'm looking for testing your browser but i don't know if my autoi script work with.Very Thanks with your helpMy browser is for get infos on webpage, continue to use IE with AutoIt !I will see by my side what i can do ... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
wowtop Posted April 20, 2011 Author Share Posted April 20, 2011 thanks to you. I'm looking to understand why the missing part disappear with IE or FF Link to comment Share on other sites More sharing options...
wakillon Posted April 21, 2011 Share Posted April 21, 2011 Try like this ! $oIE = ObjCreate ( "InternetExplorer.Application" ) $oIE.Visible = 1 $oIE.Navigate ( "http://eu.battle.net/wow/fr/character/dalaran/turrican/statistic#133" ) ; Do Sleep ( 100 ) Until Not $oIE.Busy Sleep ( 2500 ) $oInputs = $oIE.document.GetElementsByTagName ( "LI" ) ; Quêtes achevées $oNbInputs = $oIE.document.GetElementsByTagName ( "LI" ).length For $i = 0 To $oNbInputs -1 $oInput = $oInputs.item ( $i ) If StringInStr ( $oInput.innerText, 'Quêtes achevées' ) <> 0 Then ;ConsoleWrite ( "->--- Input innertext : " & $oInput.innerText & @crlf ) $_innerText = StringSplit ( $oInput.innerText, @CR ) ConsoleWrite ( "!->-- $_innerText : " & StringStripWS ( $_innerText[2], 7 ) & @Crlf ) EndIf Next AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
wowtop Posted April 22, 2011 Author Share Posted April 22, 2011 Thanks Wakillon, I think you're a god. That work perfectly Link to comment Share on other sites More sharing options...
wakillon Posted April 22, 2011 Share Posted April 22, 2011 (edited) Si t'as d'autres questions n'hesites pas ! Glad to help you ! Edited April 22, 2011 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts 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