[FF.au3] Problem with a loop

  • Hello!
    First of all I want to say hello to all and and apologize for the fact that I don't speak in German. I've got a problem with _FFImageClick. Here's my code:

    [autoit]

    While 1 _FFImageClick("button", "alt", true) WEnd

    [/autoit]


    Script works fine, but click only ones on the button. I would like to make him click on the button every time when he find a button on the page. Is it possible? Thanks in advance :).
    Simon


    Here's a translation to german of my message, I hope it will help to understand what I mean.

    Code
    Hallo!Zunächst einmal möchte ich sagen, hallo an alle und und entschuldigen uns für die Tatsache, dass ich nicht in deutscher Sprache zu sprechen. Ich habe ein Problem mit _FFImageClick. Hier ist mein Code:
     While 1       _FFImageClick ("Button", "alt", true)    WEnd
    Script funktioniert gut, aber Sie, daß nur diejenigen auf den Button. Ich möchte ihn auf die Schaltfläche jedes Mal, wenn er einen Knopf auf der Seite zu finden. Ist es möglich? Vielen Dank im Voraus:).Simon

    Einmal editiert, zuletzt von Szymi_2004 (8. November 2011 um 22:27)

  • Well, here's the whole Code:

    [autoit]

    #include
    If _FFConnect() ThenWhile 1 _FFImageClick("button", "alt", true)WEndEndIf

    [/autoit]


    When I have open my browser with site where is this button script click on it, but only once and only when he finds it immediately (i'm not sure is it clear for you). Anyway the source of site where is the button looks like this:

    PHP
    <a href="page to redirect"><img width="100%" border="0" alt="button" src="here's the URL of image"></a>



    I'll be very grateful for any help!

  • Hi Szymi,

    I recommend you to add the phrase "FF.au3" to the topic headline so that Stilgar or another FF.au3 professional may take notice of your problem. ;)

    I'm not familiar with the FF.au3, so unfortunately I couldn't help you directly.


    Regards
    Greenhorn


  • hi there,
    i am a noob to FF.au3 .. but as the other posters said, the whole code would help us big-time.
    i think you should wait for the page to be loaded by using "If _FFIsConnected() Then ..." or at least a long Sleep, to assure the page is fully loaded.
    ..the same for the loop! if you click the image/button a new page will load. you should throttle the events by adding another Sleep() within the loop.

    why dont you download/save the html code (with a button included) locally for testing and test just a single run/click. (kind of tracking the prob step by step).