Cooler Posted July 16, 2019 Share Posted July 16, 2019 Hi Friends, I created a script, which takes number of entries from the excel sheet as count and it will run the loop according to the count value. Loop is running good. Loop limits and all it's taking fine. For example if the loop limit is $count = 50. while executing the script will automatically quit anywhere, once it crossed 30th iteration. My doubt here is, Why its happening? Is RAM size matters, or any junk memory is creating, or any thing i want to clear in starting or in between of the loop. Give some idea about this friends...! ☺️Thanks...! Link to comment Share on other sites More sharing options...
Earthshine Posted July 16, 2019 Share Posted July 16, 2019 Post your script for help. How are we supposed to know what’s wrong with your script when we can’t see it? My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Cooler Posted July 16, 2019 Author Share Posted July 16, 2019 Yup sure...! expandcollapse popupFor $j = 1 To $count MouseMove(500,500) Sleep(2000) MouseClick("left",500,500) Send ("{DOWN}") Sleep(500) MouseClick($MOUSE_CLICK_RIGHT) Send ("p") Sleep(500) WinActivate("Properties") WinWaitActive ("Properties") Sleep(1000) $hndl7 = WinGetHandle("Properties") ;Writing the report in Excel Sleep(500) ;getting the required handles $Part = ControlGetText($hndl7, "", "Edit3") $Doc = ControlGetText($hndl7, "", "ComboBox2") $Docu = ControlGetText($hndl7, "", "Edit34") $Finish = ControlGetText($hndl7, "", "ComboBox24") WinClose("Properties") ;writing them into excel $eBook.Sheets(2).Select _Excel_RangeWrite ( $eBook, $eBook.Activesheet, $Part , "B"&$a ) _Excel_RangeWrite ( $eBook, $eBook.Activesheet, $Doc , "C"&$a ) _Excel_RangeWrite ( $eBook, $eBook.Activesheet, $Docu , "E"&$a ) _Excel_RangeWrite ( $eBook, $eBook.Activesheet, $Finish , "F"&$a ) ;clearing the variables used to store handles from properties $Part = "" $Doc = "" $Docu = "" $Finish = "" $a = ($a + 1) Next Link to comment Share on other sites More sharing options...
Nine Posted July 16, 2019 Share Posted July 16, 2019 It is simple debugging. Put multiple ConsoleWrite to check the values of the variables. Follow the flow and you will find it by yourself. Earthshine 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Cooler Posted July 17, 2019 Author Share Posted July 17, 2019 Yeah i did that bro. Its running fine for less loop count. But for loop count more than 50, it'll stop after 40th count. My RAM is less. So there mignt be chance of system program manager's speed is not match with script's running speed. Thus I kept winwait and cursor status wait. Now working fine. B n touch my friend...! Thanks! 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