nick448 Posted March 30, 2012 Share Posted March 30, 2012 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)WEndI keep recieving this error when trying to run the scriptC:\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 errorWEnd^C:\Temp\landport2.au3 - 2 error(s), 0 warning(s)PLEASE HELP! Link to comment Share on other sites More sharing options...
guinness Posted March 30, 2012 Share Posted March 30, 2012 I highly recommend you read the Forum Rules as this appears to be a means to auto-logging into a website. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
nick448 Posted March 30, 2012 Author Share Posted March 30, 2012 I highly suggest you suck my dick Skitty 1 Link to comment Share on other sites More sharing options...
ileandros Posted March 30, 2012 Share Posted March 30, 2012 (edited) It works for me this way butSnipIf 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. Edited March 30, 2012 by Melba23 Code removed I feel nothing.It feels great. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 30, 2012 Moderators Share Posted March 30, 2012 nick448,If you want to come into this forum you need to behave. Language like that is not permitted. 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. 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. M23 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: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts