![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
I am running into an issue and was hoping someone could help. I have a script that I run and it works fine for a random amount of time from 1 minute to multiple hours and then bugs. The problem is that the script keeps looping but all the commands within that loop just stop executing for no reason. The Replaying Task bar just goes in order from 1 to 801 over and over again showing it is doing each step of the loop but it doesn't actually execute any of them. Here is the basic script Note: Line 1 here is actually line 10 in the complete script. Before line 1 here I have it highlight a portion of a webpage one time which it does correctly that contains a price and a seller name. The lines here are the start of the repeating part of the script that works properly for a random amount of time then for no reason stops working correctly. 1 Loop while $Prompt-Assignment$ Not Equal to "grje89043rergR" 2 Keystrokes: [CTRL DOWN]c[CTRL UP] in "Currently Active Window" 3 Loop While $Clipboard$ Does Not Include "12.58" 4 Keystrokes: [CTRL DOWN]c[CTRL UP] in "Currently Active Window" 5 If $Clipboard$ Includes "12.59" Then 6 Exit Loop 7 End If 8 End Loop 9 If $Clipboard$ Includes "12.60" Then 10 If $Clipboard$ Does Not Include "JJSmith" Then 11 ---Actions go here--- 12 End If 13 End If 14 Read From Text file : '\\NDServer\F\file.txt' Delemiter: 'Newline' Header: 'No' Session: 'Default' 15 Start Loop " Each row in a CSV / Text file of Session = Default" 16 Variable Operaion : $Filedata Column(1)$ to $Prompt-Assignment$ 17 End Loop 18 If $Prompt-Assignment$ Includes "12.60" Then 19 If $Clipboard$ Does Not Include "JJSmith" Then 20 ---Actions go here--- 21 End If 22 End If 23 Keystrokes: [CTRL DOWN]c[CTRL UP] in "Currently Active Window" Lines 23 to 800 repeat the code from lines 9 to 22 over and over to avoid delay when the 12.58 condition is met while looking for the 12.60 which would have to occur within 3 seconds if it is going to occur at all based on the site and what is happening. --- Loop commands seem to take about 140ms to go from the End Loop to the beginning of the loop again, and this was too much time and just repeating the lines over and over in a row solved that time problem since going from one check to the next as more lines only takes 4-5ms. 801 End Loop When the above script stops working it no longer copies anything to the clipboard (I can check it in Notepad.) It no longer loops between lines 3 and 8 like it's supposed to even though the last copy of the clipboard doesn't contain 12.58 (can see this in the Replaying Task bar where it shows the line number it is on.) It doesn't appear to read from the text file. Nothing happens other than the Replaying Task going through all the lines from 1 to 801 without the lines actually doing anything. Any idea on what would be causing this? |
| |||
|
Hello, Can you please try inserting 300 ms of delay after every copy action? We suggest clearing the clipboard using 'Clear Clipboard' command before every copy action also provide 300 ms of delay after 'Clear Clipboard' command. Text format would appear something like this, 1 Loop while $Prompt-Assignment$ Not Equal to "grje89043rergR" Clear Clipboard Delay [300 ms] 2 Keystrokes: [CTRL DOWN]c[CTRL UP] in "Currently Active Window" Delay [300 ms] 3 Loop While $Clipboard$ Does Not Include "12.58" Clear Clipboard Delay [300 ms] 4 Keystrokes: [CTRL DOWN]c[CTRL UP] in "Currently Active Window" Delay [300 ms] 5 If $Clipboard$ Includes "12.59" Then 6 Exit Loop 7 End If 8 End Loop Hope this helps. |
| |||
|
With 600ms of delay (300 after the clear and 300 after the copy) the script won't work due to it taking far too long to execute. Why would the rest of the script stop working that has nothing to do with the clipboard being copied if it is a clipboard timing problem? When I look at the clipboard by pasting in notepad it does not meet the criteria for lines 3-8 but it doesn't loop there when it stops working properly. As an example, I was just running the script when it bugged again and the clipboard contained only: Kajeriac 11.81 Now the above text on the clipboard does not meet the criteria to exit the loop from lines 3-8 in the script. It should get stuck in that loop unless the clipboard contains either 12.58 or 12.59 and it contained neither of those numbers. The script skipped right over those lines even without the clipboard containing the proper data to exit that loop. Why would the program do this, and why wouldn't it copy the very next time it got to a copy command even if a single copy failed? What other solutions are there to the problem other than adding a large amount of delay to the script? It can work for hours without bugging sometimes and it doesn't make sense that it works most of the time then just has this bug occur randomally. I may be able to add 50ms maximum after copying to the clipboard, but I couldn't do 50ms after a clear then another 50ms after the copy. Adding 100ms of additional time is huge with my application and would cause it to fail. |
| |||
|
Hello, This is strange as we never faced such issue before. We need to actually see this issue to suggest viable solution. Can you please provide your contact number by submitting a support case from, Automation Anywhere - Open A Support Case Alternatively, you can reach us at 1-888-484-3535 x 3. |
![]() |
| Thread Tools | |
| Display Modes | |
| |