Sign in to follow this  
Followers 0
nick448

While...WEnd HELP!

5 posts in this topic

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!

Share this post


Link to post
Share on other sites



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


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

I highly suggest you suck my dick

1 person likes this

Share this post


Link to post
Share on other sites

#4 ·  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.

Share this post


Link to post
Share on other sites

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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0