azcn2503 Posted July 2, 2013 Share Posted July 2, 2013 I'm running the following script to assist with a Selenium QA project: While true WinWait("Authentication Required") If WinExists("Authentication Required") Then WinActivate("Authentication Required") If WinActive("Authentication Required") Then Send("username{TAB}") Send("password{Enter}") EndIf EndIf Sleep(1000) WEnd Can anybody see why this eventually crashes? It slowly creeps up on CPU usage until it maxes out one core and becomes unresponsive. Link to comment Share on other sites More sharing options...
water Posted July 2, 2013 Share Posted July 2, 2013 I don't think this piece of code can max out the CPU. There is always a Sleep of 1 second. Add AutoItSetOption("TrayIconDebug", 1) "If enabled shows the current script line in the tray icon tip to help debugging." 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...
orbs Posted July 2, 2013 Share Posted July 2, 2013 (edited) i launched your script. i opened a notepad text and saved it by the name "Authentication Required.txt", so it is detected by your script, which then just writes "username" and "password" to the notepad every 1 second. all as expected. it's been running for 10 minutes now, no impact over CPU. i imagine the blame must be on the form you send your keys to. Edited July 2, 2013 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
azcn2503 Posted July 2, 2013 Author Share Posted July 2, 2013 Thanks for the responses. Perhaps it is an issue with Firefox. I'll try the debug option and report back if I have some better info. It could be my machine too, it's getting a little old now Link to comment Share on other sites More sharing options...
water Posted July 2, 2013 Share Posted July 2, 2013 But the task manager should clearly show which process eats up all the CPU. 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