rundak Posted April 25, 2019 Posted April 25, 2019 Hello, I am a rookie with AutoIt and need some help from you. My problem is: My program creates an array from values in excel spreadsheet. Then copies each value from array (cell by cell) to ERP program in loop. It works quite good but from time to time our ERP system slows down and loop doesn't work correctly. When system slows down the AutoIt program runs with constant speed and omits some cells in ERP program. Therefore the program tries to paste value (next value from array) to a field where is different data type becasue execution was to fast. What I need is a way to force the AutoIt program to wait for a ERP program cell activation and after that send value from array. Sleep() is not a solution. It should work quite fast bacause I have to enter 500 rows x 7 columns. Loop (created based on other topic forum): For $i = 0 To UBound($aResult) - 1 For $j = 0 To UBound($aResult, 2) - 1 Send($aResult[$i][$j]) Sleep (50) Send ("{TAB}") Sleep(50) Next Next Please notice that ERP window is activated only once then only ERP cells change by TAB key and this is to fast. Hope my problem is clear. Thank you in advance for clue.
water Posted April 25, 2019 Posted April 25, 2019 Welcome to AutoIt and the forum! We need more information to help you! Which ERP are we talking about? 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
rundak Posted April 25, 2019 Author Posted April 25, 2019 Hello @water Thanks for the answer. The name of ERP system is iScala created by Epicor company.
water Posted April 25, 2019 Posted April 25, 2019 I hoped to get "SAP" as a reply, because there is an UDF available to automate the SAP GUI. Do you know if iScala provides an automation interface? 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
rundak Posted April 26, 2019 Author Posted April 26, 2019 There is no automation interface in iScala.
FrancescoDiMuro Posted April 26, 2019 Posted April 26, 2019 @rundak Did you check the AutoItWindowsInfoTool? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
rundak Posted April 26, 2019 Author Posted April 26, 2019 @FrancescoDiMuro I was not aware that exist such tool Thanks for letting me know. It seems to be very useful but I think I found a solution for my problem without sleep() function, using ControlGetText() and ControlGetFocus() functions. Full speed of entering data. For $i = 0 To UBound($aResult) - 1 For $j = 0 To UBound($aResult, 2) - 1 Send("{DELETE}") Send($aResult[$i][$j]) Local $sText = StringReplace(ControlGetText("[ACTIVE]", "", ControlGetFocus("[ACTIVE]")),".","","","") ; Variable which contains current value of cell If $sText <> $aResult[$i][$j] Then ; Checks if data was enterd from array to a cell in ERP system Do $sText = StringReplace(ControlGetText("[ACTIVE]", "", ControlGetFocus("[ACTIVE]")),".","","","") ; In this loop AutoIt Program "waits" for value appearing in ERP system Until $sText = $aResult[$i][$j] EndIf Send ("{TAB}") Next Next FYI: Before AutoIt automation this work took 4 hours. . Now it takes 5 minutes. Thank you for your help.
FrancescoDiMuro Posted April 26, 2019 Posted April 26, 2019 @rundak Happy to have helped Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
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