JohnnyDepth Posted July 5, 2015 Share 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 Link to comment Share on other sites More sharing options...
JohnOne Posted July 5, 2015 Share 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. Link to comment Share on other sites More sharing options...
water Posted July 5, 2015 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
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