Jump to content

Recommended Posts

Posted

I have this script that opens up an IE session, logs into a website, and scrolls down the page. When it scrolls down the page I want IE to close and the whole process to restart. I tried using Task Scheduler in Windows but doesnt work the way i want it to.

Dim $user = "******"

Dim $pass = "*****"

While 1

#include <IE.au3>

; Create a browser window and navigate to hotmail

$oIE = _IECreate("http://www.landport.net/r/sva/login.lpa")

;select the username field

MouseMove(136, 282, 1)

MouseClick(136, 282, 1)

Sleep(1500)

;Sends Username and Password Variables

Send($user)

Send("{TAB}")

Sleep(1500)

Send($pass)

Send("{ENTER}")

Sleep(1500)

;makes IE FullScreen

Send("{F11}")

Sleep(2500)

;Scrolls Down the Page

MouseClickDrag("left", 1269, 24, 1272, 186, 1)

Sleep(60000)

MouseClickDrag("left", 1272, 186, 1272, 344, 1)

Sleep(60000)

MouseClickDrag("left", 1272, 344, 1272, 644, 1)

Sleep(45000)

Send("{F11}")

ProcessClose("iexplore.exe")

$PID = ProcessExists("iexplore.exe") ; Will return the PID or 0 if the process isn't found.

If $PID Then ProcessClose($PID)

WEnd

I keep recieving this error when trying to run the script

C:\Program Files (x86)\AutoIt3\Include\WinAPIError.au3(29,1) : ERROR: missing Wend.

Func

^

C:\Temp\landport2.au3(4,1) : REF: missing Wend.

While

^

C:\Temp\landport2.au3(34,1) : ERROR: syntax error

WEnd

^

C:\Temp\landport2.au3 - 2 error(s), 0 warning(s)

PLEASE HELP!

Posted

I highly recommend you read the Forum Rules as this appears to be a means to auto-logging into a website.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

It works for me this way but

Snip

If you want to make it restart then add a finishing command and make it a fuction (Func _restart() )

But since you using auto login, as guinnes said, check the forum rules under automating site logins.

Edit: I think you should take care of what your saying...

ileandros,

Nothing personal, but why help him at all. :oops:

Edited by Melba23
Code removed

I feel nothing.It feels great.

  • Moderators
Posted

nick448,

If you want to come into this forum you need to behave. Language like that is not permitted. :bye:

And I was just about to lock this thread anyway as it deals with a site log-in which is specifically forbidden under the Forum Rules as you were told. :oops:

I suggest you read those rules over the next 7 days when you will be unable to post. If and when you return, watch how you go or you will find that your next stay here will be a very short one indeed. :doh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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