Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-23-2011, 02:45 PM
TennUser TennUser is offline
Junior Member
 
Join Date: Jun 2008
Posts: 6
Default Falling through Loop

I am running version 4.5 (since 2008) and have a new problem. We moved the software to a newer computer. I reinstalled AA because the old machine had PS/2 keyboard and mouse drivers. The old machine had Office 2003 and the new machine has Office 2007. Both machines have XP SP3.

The macro takes values from a spreadsheet and "keys" them into a green screen mainframe application. There is a little screen scraping for error messages, but that has been working fine in the past.

I have put in longer delays (400 ms instead of 100ms) to see if that helps. I have put in some paranoia code to display variables when it ends to tell me what line of the spreadsheet it was on when it decided to stop.

Any suggestions?

Thanks
Reply With Quote
  #2 (permalink)  
Old 09-24-2011, 11:01 AM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default

Can you describe the problem more clearly?

do you not enter the loops?

Can you save the ATMN as text and past the critical code in your post?
Reply With Quote
  #3 (permalink)  
Old 09-26-2011, 04:30 PM
forumstaff forumstaff is offline
Senior Member
 
Join Date: Oct 2010
Posts: 521
Default

Hello TennUser,

According to your post, you have moved from Office 2003 to Office 2007 which changes the window title for the windows of the Office applications. May be this is a problem. The script tries to search for the recorded window title name within the loop which has changed in Office 2007.
Though, It will be really helpful for us if you send us the script or copy paste the script here as text.

Thanks & regards
Reply With Quote
  #4 (permalink)  
Old 09-27-2011, 07:58 AM
TennUser TennUser is offline
Junior Member
 
Join Date: Jun 2008
Posts: 6
Default

Here's the script:

1 Comment: For Horizon Sites. Assumes 10 character Branch Name in column 1 and location in column 5
2 Comment: Start with Mainframe session; logged in; started, cursor on mainframe.
3 Prompt For Yes/No: "Are you Ready?
Screen set to 1024x768?
Mainframe session started?

" for File Assign to variable "$Clipboard$"
4 Comment: Open Excel Spreadsheet
5 If $Clipboard$ Not Equal To "YES" Then
6 Comment: Please enter the conditional commands here.
7 Stop The Current Task
8 End If
9 Keystrokes: [F5] in "Pro client*"
10 Prompt For File: "Please browse for spreadsheet file name" for File Assign to variable "$my-list-variable$"
11 Excel : Open Spreadsheet "$my-list-variable$". Active Sheet: Default
12 Prompt Message: "Start Row?" Assign value of Prompt Message Box to Variable: "$StartCell$"
13 Prompt Message: "Stop Row?" Assign value of Prompt Message Box to Variable: "$StopCell$"
14 Excel : Get multiple cells from cell "a$StartCell$" to cell "h$StopCell$"
15 Prompt Message: "Library Name to be entered into LS01 Table?" Assign value of Prompt Message Box to Variable: "$LibraryName$"
16 Keystrokes: [TAB] in "Pro client*"
17 Keystrokes: bp030[ENTER] in "Pro client*"
18 Prompt Message: "Please Enter Billing Account Number" Assign value of Prompt Message Box to Variable: "$BillTo$"
19 Comment: Go to LS01 table and position for data entry
20 Keystrokes: 120LS01[ENTER] in "Pro client*"
21 Keystrokes: LS01[TAB] in "Pro client*"
22 Variable Operation : $StartCell$ To $currentrow$
23 Comment: Move to once cell to the left of where we want to write the SL#
24 Excel : Go to cell "I$currentrow$"
25 Start Loop " Each row in an Excel dataset of Session = Default"
26 Comment: Please enter your commands to loop. Use $Excel Column$ variable for each row in Excel.
27 Delay: (100 ms)
28 Comment: Insert Billing BPID immediately followed by branch code (10 characters) no space then Collection Code then a tab
29 Keystrokes: $BillTo$$Excel Column(1)$$Excel Column(3)$[TAB] in "Pro client*"
30 Delay: (200 ms)
31 Comment: Enter SL then library + branch + text of collection code as description

32 Keystrokes: $Excel Column(5)$ $LibraryName$ $Excel Column(2)$ $Excel Column(4)$[ENTER] in "Pro client*"
33 Mouse Click: Left Button Pressed Down (37,679) in "Pro client*"
34 Delay: (150 ms)
35 Mouse Move: (37,680) To (869,716)
36 Delay: (250 ms)
37 Mouse Click: Left Button Pressed Up (869,716) in "Pro client*"
38 Mouse Move: (869,714) To (964,709)
39 Delay: (150 ms)
40 Keystrokes: [CTRL DOWN]c[CTRL UP] in "Pro client*"
41 If $Clipboard$ Does Not Include "UPDATES TO THE LIBRARY STANDARD TABLES WERE PROCESSED" Then
42 Comment: Please enter the conditional commands here.
43 If $Clipboard$ Includes "STANDARD TABLE ARGUMENT ALREADY EXISTS" Then
44 Delay: (300 ms)
45 Prompt For Yes/No: "Entry alredy exists. Stop?" for File Assign to variable "$YESNO$"
46 If $YESNO$ Equal To "YES" Then
47 Comment: Please enter the conditional commands here.
48 Stop The Current Task
49 End If
50 End If
51 Delay: (200 ms)
52 End If
53 Delay: (1000 ms)
54 Excel : Go to cell "h$currentrow$"
55 Delay: (600 ms)
56 Excel : Set value of Active Cell with "$BillTo$"
57 Delay: (1000 ms)
58 Variable Operation : $currentrow$+1 To $currentrow$
59 Delay: (100 ms)
60 Keystrokes: [TAB] in "Pro client*"
61 Delay: (600 ms)
62 Keystrokes: [TAB] in "Pro client*"
63 Delay: (300 ms)
64 End Loop
65 Keystrokes: [ALT DOWN]f[ALT UP] in "Microsoft Excel*"
66 Keystrokes: [CTRL DOWN]s[CTRL UP] in "Microsoft Excel*"
67 Message Box: "At end of run:

Start Row = $StartCell$
Stop Row = $StopCell$
Current Row = $currentrow$
"


any help is appreciated.

The script will run through and execute for several lines in the spreadsheet then stop. When running it again, it will run one line and stop.


Thanks
Reply With Quote
  #5 (permalink)  
Old 09-27-2011, 01:35 PM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default

as a test,
hard code assignments of the START and STOP rows to values that are what you want.

report back.
Reply With Quote
  #6 (permalink)  
Old 09-28-2011, 02:01 PM
TennUser TennUser is offline
Junior Member
 
Join Date: Jun 2008
Posts: 6
Default

I forced values in for STARTCELL and STOPCELL (which set the Excel rows) and it still failed.
Reply With Quote
  #7 (permalink)  
Old 09-28-2011, 09:11 PM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default

put a message box after line 58 for currentRow

also,
why is line 24 before your loop?
Reply With Quote
  #8 (permalink)  
Old 10-03-2011, 10:10 AM
TennUser TennUser is offline
Junior Member
 
Join Date: Jun 2008
Posts: 6
Default

I finally fixed it by adding a delay before the check of the text in the clipboard.

Thanks
Reply With Quote
  #9 (permalink)  
Old 10-04-2011, 12:03 AM
philkryder philkryder is online now
Senior Member
 
Join Date: Sep 2007
Posts: 458
Default

good for you - which line did you enter the delay at?
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 04:16 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved