Jump to content

[..] Copy / Paste


Recommended Posts

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#133

I 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,259

The 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

oula quelqu'un qui parle français cool :unsure:

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

[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 ?

<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 by wowtop
Link to comment
Share on other sites

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

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

My browser is for get infos on webpage, continue to use IE with AutoIt !

I will see by my side what i can do ...Posted Image

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

Try like this ! Posted Image

$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.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...