djcan1

why does my loop doesnt work ?

7 posts in this topic

Hello my fellows, in my script i was shared , the loop doesnt work. I cant find why.Please help me.. Thank you in advance.

yemeksepeti .au3

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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 ? 

Share this post


Link to post
Share on other sites

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.

 


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

15 minutes ago, Jos said:

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

    With $oIE

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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