![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| I'm building my first prototype in AA 4.5.2 and I cannot get it to work at all. My first statement is: Start Loop "Each File in C:\Wrapper\BatFiles" I put a file in the folder and run the task but it never gets to the second statement which is a Message Box. |
| |||
| Hello, Could you please tell us do you receive an error? If yes, then please send us screenshot of it so that we can actually see. In addition, please paste the text format of your task so that we can look into it if anything is going wrong. For that, open your task in a Task Editor, go to Tools->Save as text file. It would help us investigate further. |
| |||
| I do not receive an error. Perhaps the Start Loop is working but some of the other statements are not working. Why do I think this? Because when I run this version in Debug mode:
---------------------------------------------------------- 1 Variable Operation : True To $FOREVER$ 2 Loop While $FOREVER$ Equal To "True" 3 Start Loop " Each File in C:\Wrappers\AutoAnywhere\BatFiles" 4 Message Box: "[$FileName$]" 5 Variable Operation : 0 To $GOTBAT$ 6 If $Extension$ Equal To "BAT" Then 7 Variable Operation : 1 To $GOTBAT$ 8 End If 9 If $Extension$ Equal To "bat" Then 10 Variable Operation : 1 To $GOTBAT$ 11 End If 12 If $GOTBAT$ Equal To "1" Then 13 Copy Files "$CurrentDirectory$\$FileName$.$Extension$" to "C:\Wrapper\AutoAnywhere\BatFiles\CobolName.tx t" 14 Delay: (100 ms) 15 Open File "$CurrentDirectory$\$FileName$.$Extension$" 16 Variable Operation : 0 To $ENDJOB$ 17 Comment: COBJOB is a list of COBOL.EXE's read from the .txt file 18 Start Loop " List Variable COBJOB" 19 Variable Operation : $COBJOB$ To $CobolName$ 20 Variable Operation : 0 To $ENDPROG$ 21 Loop While $ENDPROG$ Equal To "0" 22 Delay: (100 ms) 23 If Application Not Running ("$CobolName$") Then 24 Variable Operation : 1 To $ENDPROG$ 25 End If 26 If Application Running ("F3BKDSNP.exe") Then 27 Variable Operation : 1 To $Popup$ 28 Loop While $Popup$ Equal To "1" 29 Activate Window: "COBOL*" 30 Get Text from Window : "COBOL*" Assign to variable "$WindowText$" 31 If $WindowText$ Includes "Do you want to open the report file" Then 32 Click On Command Button : "No" in Window : "COBOL ERROR REPORT" 33 Variable Operation : 0 To $Popup$ 34 Variable Operation : 1 To $ENDJOB$ 35 Variable Operation : 1 To $ENDPROG$ 36 Else 37 Click On Command Button : "OK" in Window : "COBOL" 38 End If 39 End Loop 40 End If 41 End Loop 42 If $ENDJOB$ Equal To "1" Then 43 Exit Loop 44 End If 45 End Loop 46 Delete Files "$CurrentDirectory$\$FileName$.$Extension$" 47 End If 48 End Loop 49 End Loop |
| |||
| Hello, What we suggest is, disable debug mode (in task editor go to Debug->Disable Debugging) and try running the task again. Also remove square brackets [] from message box command and save the command. In addition, insert Delay command after every action or command in task. In Copy files command at, line # 13 extension includes space (CobolName.tx t), remove that space and try again. Hope that helps. |