Jump to content

why does my loop doesnt work ?


djcan1
 Share

Recommended Posts

  • Developers

You need to be much clearer about the issue and what is expected. For example: You have 5 loops in the posted script and state "the loop doesn't work". ... so which one?
When the script is getting stuck you need to insert some debug lines and/or add Opt("TrayIconDebug",1) and hover over the tray icon to find which line the script is running.

Jos 

ps: posting your code in <> is much easier like this:

#include <IE.au3>
#include <AutoItConstants.au3>

$oIE = _IECreate("https://www.yemeksepeti.com/istanbul-uye-ol")

$Mail = _IEGetObjByName($oIE, "Email")
$Sifre = _IEGetObjByName($oIE, "Password")
$SifreT = _IEGetObjByName($oIE, "RepeatPassword")
$Ad = _IEGetObjByName($oIE, "FirstName")
$Soyad = _IEGetObjByName($oIE, "LastName")
$Dtarih = _IEGetObjByName($oIE, "BirthDate")
$Semt = _IEGetObjById($oIE, "s2id_autogen2_search")
$check = _IEGetObjById($oIE, "inputAcceptEula")

WinSetState("Üye, Kayıt Ol - Yemek Sepeti - Internet Explorer", "", @SW_MAXIMIZE)

For $m = 1 To 999

    Sleep(2000)
    _IEPropertySet($Mail, "innerText", "djnss3s10" & $m & "@gmail.com")
    _IEPropertySet($Sifre, "innerText", "159357")
    _IEPropertySet($SifreT, "innerText", "159357")
    _IEPropertySet($Ad, "innerText", "Kerimo")
    _IEPropertySet($Soyad, "innerText", "Mezdan")
    _IEPropertySet($Dtarih, "innerText", "31 12 1990")

    Sleep(2000)
    MouseClickDrag("left", 1358, 346, 1358, 526)
    Sleep(2000)
    MouseClick("left", 659, 437)
    Sleep(2000)
    MouseClick("left", 410, 490)
    Sleep(2000)
    _IEAction($check, "click")


    With $oIE

        $btnEnter = .document.getElementsByTagname("button")

        For $b In $btnEnter

            If $b.innerHTML = "ÜYE OL" Then
                $b.click()
            EndIf
        Next

        While ($oIE.busy)
        WEnd

        Sleep(5000)

        While ($oIE.busy)
        WEnd
    EndWith

    MouseClick("left", 405, 276)
    Sleep(2500)
    MouseClick("left", 219, 524)
    Sleep(5500)
    MouseClick("left", 896, 509)
    Sleep(5500)
Next

 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

_IEPropertySet($Mail, "innerText", "djnss3s10" & $m & "@gmail.com")
    _IEPropertySet($Sifre, "innerText", "159357")
    _IEPropertySet($SifreT, "innerText", "159357")
    _IEPropertySet($Ad, "innerText", "Kerimo")
    _IEPropertySet($Soyad, "innerText", "Mezdan")
    _IEPropertySet($Dtarih, "innerText", "31 12 1990")

this part doesnt work in loop . work only 1 time

Link to comment
Share on other sites

  • Developers

Ok... so where does it it stuck?  (I have given you the steps to take to figure that out)

..  and how do you ever exit this loop?: 

    With $oIE

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

--> IE.au3 T3.0-2 Error from function _IEPropertySet, $_IESTATUS_COMError (-2147024891)
--> IE.au3 T3.0-2 Error from function _IEPropertySet, $_IESTATUS_COMError (-2147024891)
--> IE.au3 T3.0-2 Error from function _IEPropertySet, $_IESTATUS_COMError (-2147024891)
--> IE.au3 T3.0-2 Error from function _IEPropertySet, $_IESTATUS_COMError (-2147024891)
--> IE.au3 T3.0-2 Error from function _IEPropertySet, $_IESTATUS_COMError (-2147024891)
--> IE.au3 T3.0-2 Error from function _IEPropertySet, $_IESTATUS_COMError (-2147024891)

is it about it ? 

Link to comment
Share on other sites

  • Developers

no..

15 minutes ago, Jos said:

When the script is getting stuck you need to insert some debug lines and/or add Opt("TrayIconDebug",1) and hover over the tray icon to find which line the script is running.

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

.. and you also didn't answer this question:

15 minutes ago, Jos said:

..  and how do you ever exit this loop?: 

    With $oIE

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...