JohnnyDepth Posted July 5, 2015 Posted July 5, 2015 (edited) Hello!I am writing a simple script(should be simple) that logs me into a certain website. I am trying to write a subroutine that waits until the page is finished loading before attempting to type in the log-in information. I am testing this by determining if the page is a specific color(once the page is the specific color, I know it has finished loading) This function is not working and I was hoping someone could help me out.Subroutine:Func PlexLogInLoaded() $varLoaded = 0 $LogInColor = 0 WinWaitActivate("Plex Manufacturing Cloud - Login - Internet Explorer") $LogInColor = PixelGetColor(1293, 697) If $LogInColor == 0xFFFFBB Then $varLoaded = 1 EndIf EndFuncIn the main script I have this:Call PlexLogInLoaded() While $varLoaded == 0 Sleep(500) Call PlexLogInLoaded() WEnd Edited July 5, 2015 by JohnnyDepth
JohnOne Posted July 5, 2015 Posted July 5, 2015 Get rid of both of your Call functions (remove the physical word is all) and be sure $varLoaded is declared outside of function. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
water Posted July 5, 2015 Posted July 5, 2015 Welcome to AutoIt and the forum!Which browser do you use? AutoIt comes with an UDF for IE plus you will find UDFs for FF and Chrome in the Example Scripts section. Much more reliable than to wait for a color to appear. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now